Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get extension running on TYPO3 11 LTS #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PhilippKuhlmay
Copy link
Contributor

I increased the TYPO3 version inside composer.json file

@PhilippKuhlmay
Copy link
Contributor Author

Will fix #37

@KoenWouters
Copy link
Collaborator

The status report widget gives an error in my installation with the next message:
Class 'TYPO3\CMS\Reports\Report\Status\Status' not found

So this needs to be fixed too.

@PhilippKuhlmay PhilippKuhlmay changed the title Get extension running on TYPO3 11.4 Get extension running on TYPO3 11 LTS Oct 11, 2021
@PhilippKuhlmay
Copy link
Contributor Author

PhilippKuhlmay commented Oct 11, 2021

The status report widget gives an error in my installation with the next message: Class 'TYPO3\CMS\Reports\Report\Status\Status' not found

So this needs to be fixed too.

I fixed it. I added the dependency for typo3/cms-reports inside composer.json. In my system, this package was installed so I didn't get this error. Without this package, I got this error. So the status report widget needs the package typo3/cms-reports.

@KoenWouters can you check this again? Thanks.

Makes this extension ready for TYPO3 11 LTS
@brotkrueml
Copy link

It would be nice, if the PR could be merged, so this extension is compatible with TYPO3 v11 LTS and can be used again in our upgraded installations.

@haassie
Copy link
Contributor

haassie commented Nov 3, 2021

Need to check the added dependency on the report extension. Will try / fix tomorrow and will do a release afterwards.

@KoenWouters KoenWouters self-requested a review November 3, 2021 10:16
@schrej-zz
Copy link

@KoenWouters can we expect an approval and a final version for Typo3 11.x?

@KoenWouters
Copy link
Collaborator

@haassie can you take a look at this?

@saitho
Copy link

saitho commented May 4, 2022

@haassie @KoenWouters Any updates on this? Would be great to see this FriendsOfTYPO3 extension getting a release for last year's TYPO3 CMS 11 version.

@RinyVT
Copy link
Collaborator

RinyVT commented May 5, 2022

I've tested the PR on a fresh CMS11 (with PHP8.1) and I'm getting the following error:
Schermafbeelding 2022-05-05 om 09 43 06

I ran into the same problem with one of my own extensions, it's not possible anymore to do the ExtensionManagementUtility::isLoaded check within Services.php because in CMS11 this file is called earlier in the process when the package manager isn't loaded yet.

@PhilippKuhlmay
Copy link
Contributor Author

Hi @RinyVT
do you have any suggestions how to solve this issue?
Maybe just use the Service.yaml instead of the Service.php file?

@RinyVT
Copy link
Collaborator

RinyVT commented May 6, 2022

@PhilippKuhlmay Indeed,Services.php should be removed and all the registration of widgets should be done within Services.yaml.
Only problem is that we cannot check if the reports and/or seo extensions are installed within Services.yaml and if they're not installed you'll get an error like #39 (comment)

The only thing I can think of right now is to register these widgets by default, and then check in the widget itself if the extensions are installed. If not, show a message in the widget that the particular extension is missing.

@brotkrueml
Copy link

brotkrueml commented May 6, 2022

I ran into the same problem with one of my own extensions, it's not possible anymore to do the ExtensionManagementUtility::isLoaded check within Services.php because in CMS11 this file is called earlier in the process when the package manager isn't loaded yet.

No, the Services.php is the right way, there can be a check if additional extensions, like reports, are available.
Using ExtensionManagementUtility::isLoaded in Services.php is wrong and just worked in v10 by accident. The correct way to handle this is described here:
https://docs.typo3.org/c/typo3/cms-dashboard/main/en-us/Configuration/WidgetRegistration.html#services-php-file

@brotkrueml
Copy link

brotkrueml commented May 6, 2022

The only thing I can think of right now is to register these widgets by default, and then check in the widget itself if the extensions are installed. If not, show a message in the widget that the particular extension is missing.

Not the best solution: A user gets reports extension installed, albeit she/he choose not to use them. So stick to Services.php and check if the extension is installed - and only then register the reports widgets.

@RinyVT
Copy link
Collaborator

RinyVT commented May 6, 2022

@brotkrueml Ah that sounds better! Hadn't seen that documentation, should be a quick fix then :)

The only thing I can think of right now is to register these widgets by default, and then check in the widget itself if the extensions are installed. If not, show a message in the widget that the particular extension is missing.

Not the best solution: A user gets reports extension installed, albeit she/he choose not to use them. So stick to Services.php and check if the extension is installed - and only then register the reports widgets.

No my idea was not to require reports and seo extensions, but to register the widgets by default. And then, if someone tries to add that widget, it displays a message that the required extension for that widget is not installed.
But, not necessary anymore since the/your solution is the best way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants