Upgrade from 22.4.4 to 22.7.1
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Upgrade from 22.4.4 to 22.7.1
Hi Aimeos-Team,
i have upgraded to 22.7.1 an now the typo3 scheduler breaks with the error message, even if i add a new task:
Class "\Aimeos\Controller\Jobs\Catalog\Import\Csv\Decorator\Standard" not found
I´ve created imports (products/catalog) with the decorator pattern to maintain/transform the imported data.
if I rename my "Mycatalogimport" to "Standard" the class logically found but the expected construct signatur causes exception:
Thank´s!
i have upgraded to 22.7.1 an now the typo3 scheduler breaks with the error message, even if i add a new task:
Class "\Aimeos\Controller\Jobs\Catalog\Import\Csv\Decorator\Standard" not found
I´ve created imports (products/catalog) with the decorator pattern to maintain/transform the imported data.
Code: Select all
class Mycatalogimport extends \Aimeos\Controller\Jobs\Common\Decorator\Base
{
public function __construct(\Aimeos\Controller\Jobs\Iface $controller, \Aimeos\MShop\ContextIface $context, \Aimeos\Bootstrap $aimeos)
{
parent::__construct($controller, $context, $aimeos);
}
So how we must implement decorators in version 22.7?Argument 1 passed to Aimeos\Controller\Jobs\Catalog\Import\Csv\Decorator\Standard::__construct() must implement interface Aimeos\Controller\Jobs\Iface, instance of Aimeos\MShop\Context\Item\Typo3 given, called in C:\wamp3\aimeos\vendor\aimeos\ai-controller-jobs\src\Controller\Jobs.php on line 230
Thank´s!
Re: Upgrade from 22.4.4 to 22.7.1
The implementation of the job controller decorator is still correct but the way the controllers are instantiated has changed. Maybe there has been a problem introduced during that change. Can you check what happens here and why the error occurs?
https://github.com/aimeos/ai-controller ... #L115-L239
https://github.com/aimeos/ai-controller ... #L115-L239
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Upgrade from 22.4.4 to 22.7.1
In line
https://github.com/aimeos/ai-controller ... bs.php#L49
the "incoming" path is catalog/import/csv/decorator and name is empty (coming from createControllers-method)
so the resulting classname in line 53 is \Aimeos\Controller\Jobs\Catalog\Import\Csv\Decorator\Standard that does not exist.
If i change Mydecorator to "Standard.php" the error occures later, in line https://github.com/aimeos/ai-controller ... s.php#L230
I think the instanciate of decorators has "moved" into the instanciation of job controllers,
the createControllers-method iterates the directory, maybe it have to exclude "/Decorator"-subdirs?
If I add
in Line https://github.com/aimeos/ai-controller ... s.php#L259 it seems to work.
https://github.com/aimeos/ai-controller ... bs.php#L49
the "incoming" path is catalog/import/csv/decorator and name is empty (coming from createControllers-method)
so the resulting classname in line 53 is \Aimeos\Controller\Jobs\Catalog\Import\Csv\Decorator\Standard that does not exist.
If i change Mydecorator to "Standard.php" the error occures later, in line https://github.com/aimeos/ai-controller ... s.php#L230
I think the instanciate of decorators has "moved" into the instanciation of job controllers,
the createControllers-method iterates the directory, maybe it have to exclude "/Decorator"-subdirs?
If I add
Code: Select all
&& $entry->getBaseName() !== 'Decorator' "
Re: Upgrade from 22.4.4 to 22.7.1
This shouldn't be the case, "catalog/import/csv" would be correct as $path parameter. Where does the ".../decorator" part comes from?heural wrote: ↑09 Sep 2022, 06:52 https://github.com/aimeos/ai-controller ... bs.php#L49
the "incoming" path is catalog/import/csv/decorator and name is empty (coming from createControllers-method)
so the resulting classname in line 53 is \Aimeos\Controller\Jobs\Catalog\Import\Csv\Decorator\Standard that does not exist.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Upgrade from 22.4.4 to 22.7.1
The decorator-dir comes from my extension (docu https://aimeos.org/docs/latest/config/c ... atorslocal), and it will retrieved in
https://github.com/aimeos/ai-controller ... #L259-L267
But there is a decorator-class, not a job controller. So if i change the line 259 to
the decorator-dir will be excluded.
https://github.com/aimeos/ai-controller ... #L259-L267
But there is a decorator-class, not a job controller. So if i change the line 259 to
Code: Select all
if( $entry->getType() === 'dir' && $entry->isDot() === false && $entry->getBaseName() !== 'Common' && $entry->getBaseName() !== 'Decorator')
Re: Upgrade from 22.4.4 to 22.7.1
Thank you for your help to solve that issue!
We've change the condition according to your suggestion now:
https://github.com/aimeos/ai-controller ... 26c6682f56
The fix is in dev-master and 2022.07.x-dev. Can you confirm that it works now?
Afterwards, we can tag a new version.
We've change the condition according to your suggestion now:
https://github.com/aimeos/ai-controller ... 26c6682f56
The fix is in dev-master and 2022.07.x-dev. Can you confirm that it works now?
Afterwards, we can tag a new version.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Upgrade from 22.4.4 to 22.7.1
Works as expected, thank you.