Upgrading Aimeos 2022.10.1 error

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
DaleWastell
Posts: 4
Joined: 18 Jun 2022, 08:00

Upgrading Aimeos 2022.10.1 error

Post by DaleWastell » 08 Oct 2022, 08:14

Hello all,
This morning I ran "composer update" on my local machine (php8.1.2) and aimeos updated from 2022.07.4 to 2022.10.1

When accessing the site I get the followig error:

Aimeos\Base\Filesystem\Manager\Laravel::__construct(): Argument #2 ($config) must be of type array, null given, called in C:\Development\PHP\mayapur-laravel\vendor\aimeos\aimeos-laravel\src\Aimeos\Shop\Base\Context.php on line 153

If I downgrade again, there is no problem.

Please help me to resolve this so that I can update the server

Thank you in advance

User avatar
aimeos
Administrator
Posts: 7906
Joined: 01 Jan 1970, 00:00

Re: Upgrading Aimeos 2022.10.1 error

Post by aimeos » 08 Oct 2022, 08:18

Make sure, you add the "resource" section to your config/shop.php when upgrading:
https://github.com/aimeos/aimeos-larave ... p#L44-L113

This has been moved from the default config to the config/shop.php but needs to be added manually in case of upgrading.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
DaleWastell
Posts: 4
Joined: 18 Jun 2022, 08:00

Re: Upgrading Aimeos 2022.10.1 error

Post by DaleWastell » 08 Oct 2022, 08:34

Thank you for the prompt reply.
I added the resources section and now I get a SQL error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'mlocsi.rating' in 'field list': SELECT mlocsi."id" AS "locale.site.id", mlocsi."siteid" AS "locale.site.siteid", mlocsi."code" AS "locale.site.code", mlocsi."label" AS "locale.site.label", mlocsi."config" AS "locale.site.config",

It appears that there are tables missing but nothing to migrate...

User avatar
DaleWastell
Posts: 4
Joined: 18 Jun 2022, 08:00

Re: Upgrading Aimeos 2022.10.1 error

Post by DaleWastell » 08 Oct 2022, 08:49

Ok,
as an experiment, I ran php artisan aimeos:setup again and now it seems to work

Thank you

User avatar
peter69
Posts: 95
Joined: 09 Jun 2022, 19:31

Re: Upgrading Aimeos 2022.10.1 error

Post by peter69 » 28 Oct 2022, 05:41

Hi,

I also have the same problem. After upgrading to version 2022.10.2.

I fixed the issue "Argument #2 ($config) must be of type array..." by uncommenting the resource section in config/shop.php.

After that, I got the error "Column not found 'mlocsi.rating'", I solved it by running php artisan aimeos:setup .

However, I got another problem... styles, scripts and product images give 404 error.

Any idea how to solve it?

Regards,

User avatar
aimeos
Administrator
Posts: 7906
Joined: 01 Jan 1970, 00:00

Re: Upgrading Aimeos 2022.10.1 error

Post by aimeos » 28 Oct 2022, 07:04

You need the whole new resource section, not only enabling the one already existing in your ./config/shop.php:
https://github.com/aimeos/aimeos-larave ... p#L44-L113
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
peter69
Posts: 95
Joined: 09 Jun 2022, 19:31

Re: Upgrading Aimeos 2022.10.1 error

Post by peter69 » 28 Oct 2022, 15:13

It worked!!!

Thank you very much!

Post Reply