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

Cronjob PHP Warning #32

Closed
bm1-phillip opened this issue Oct 3, 2018 · 12 comments
Closed

Cronjob PHP Warning #32

bm1-phillip opened this issue Oct 3, 2018 · 12 comments

Comments

@bm1-phillip
Copy link

Ich bekomme beim ausführen diese Fehlermeldung:

Die Ausführung von Task "Extbase-CommandController-Task (extbase)" ist fehlgeschlagen mit folgender Meldung: PHP Warning: explode() expects parameter 2 to be string, object given in /html/typo3/typo3_src-8.7.19/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 1302

@schmitzal
Copy link
Owner

Would you mind trying to get the stack trace to know at which point the error is thrown?

@bm1-phillip
Copy link
Author

Would you mind trying to get the stack trace to know at which point the error is thrown?

Sorry, I'm not a developer, so I do not know how to do that. With a detailed guide, I would possibly do it. Altervativ I can also give you access to the TYPO3.

@schmitzal
Copy link
Owner

Access to the TYPO3 would help.
Are you in the TYPO3 Slack? You could write me there a DM with a temporary admin user.

@bm1-phillip
Copy link
Author

Are you in the TYPO3 Slack? You could write me there a DM with a temporary admin user.

Yes I have, message is out now.

@jonasesr
Copy link

jonasesr commented Nov 5, 2018

Is there a solution by now?
The proglem is, that you call
$folder = $this->resourceFactory->getFolderObjectFromCombinedIdentifier($file->getParentFolder());
in line 73 of /tinyimg/Classes/Command/CompressImagesCommandController.php.
The required argument is a string that looks like this 1:/user_upload/ but it gets a folder object that can't be exploded.

jonasesr pushed a commit to jonasesr/tinyimg that referenced this issue Nov 5, 2018
jonasesr pushed a commit to jonasesr/tinyimg that referenced this issue Nov 5, 2018
@schmitzal
Copy link
Owner

schmitzal commented Nov 12, 2018

Hello Chegaro,

thanks a lot for your merge request. I'll have a look at it, as soon as possible.

Edit: This issue will be fixed in the next release, as I'm removing the whole folder dependency in both Command and Service. I still have to do a few tests with Amazon CDN as this wasn't working with the change and setting up a testing environment is a bit tricky. See #27

Edit 2: Meanwhile you could load version dev-develop if you don't use Amazon CDN, which now comes with this bugfix.

@bm1-phillip
Copy link
Author

bm1-phillip commented Nov 12, 2018

I tried the dev version. The following error message appears:

Warning: Uncaught TYPO3\CMS\Core\Error\Exception: PHP Warning: require_once(/html/typo3/typo3conf/ext/tinyimg/Classes/Service/../../vendor/autoload.php): failed to open stream: No such file or directory in /html/typo3/typo3conf/ext/tinyimg/Classes/Service/CompressImageService.php line 15 in /html/typo3/typo3_src-8.7.20/typo3/sysext/core/Classes/Error/ErrorHandler.php:107 Stack trace: #0 /html/typo3/typo3conf/ext/tinyimg/Classes/Service/CompressImageService.php(15): TYPO3\CMS\Core\Error\ErrorHandler->handleError(2, 'require_once(/h...', '/html/typo3/typ...', 15, Array) #1 /html/typo3/typo3conf/ext/tinyimg/Classes/Service/CompressImageService.php(15): require_once() #2 /html/typo3/typo3_src-8.7.20/vendor/composer/ClassLoader.php(444): include('/html/typo3/typ...') #3 /html/typo3/typo3_src-8.7.20/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/home/www/p4150...') #4 /html/typo3/typo3_src-8.7.20/vendor/typo3/class-alias-loader/src/ClassAliasLoader.php(130): Composer\Autoload\ClassLoader->loadClass('S in /html/typo3/typo3_src-8.7.20/typo3/sysext/core/Classes/Error/ErrorHandler.php on line 107

Fatal error: main(): Failed opening required '/html/typo3/typo3conf/ext/tinyimg/Classes/Service/../../vendor/autoload.php' (include_path='.:') in /html/typo3/typo3conf/ext/tinyimg/Classes/Service/CompressImageService.php on line 15

@schmitzal
Copy link
Owner

Was the close a missclick or is the problem solved?

So you are running a Composer based setup right?

@bm1-phillip
Copy link
Author

The problem based on commit #33
The mistake comes when I execute the cron extbase tinyimg compress.

@schmitzal schmitzal reopened this Nov 12, 2018
@schmitzal
Copy link
Owner

Did you update via composer or just downloaded and replaced it on the server?

@schmitzal
Copy link
Owner

I have updated the develop branch. Running tinyimg on a composer based setup works now like a charm for me.
I'll test it with a non composer setup tomorrow and if positiv release the new version with it fixes and TYPO3 9.5 support.

@schmitzal
Copy link
Owner

Version 1.3.0 is released now. Support for non composer setup has been dropped. Developers have to take care of installing the tinify library themself if the extension is installed via the extension manager.

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

No branches or pull requests

3 participants