Error with custom field in 2024.10

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
columbo
Advanced
Posts: 153
Joined: 09 Oct 2019, 09:42

Error with custom field in 2024.10

Post by columbo » 20 Nov 2024, 23:04

Hi,

we have added custom field "custid" to customer address data (not base data). Worked fine in 2022.10 and 2023.10.

Now after upgrading to 2024.10 we are getting error:
SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "custid"
LINE 2: ...rthday", "longitude", "latitude", "pos", "mcusad."custid""...


in /src/MShop/Customer/Manager/Address/Decorator/MyCustIdAddress.php

Code: Select all

namespace Aimeos\MShop\Customer\Manager\Address\Decorator;
class MyCustIdAddress extends \Aimeos\MShop\Common\Manager\Decorator\Base
{
    private $attr = [
        'custid' => [
	    'internalcode' => 'mcusad."custid"',
            'label' => 'Kundennummer',
            'type' => 'string',
        ],
    ];
...
in shop.php

Code: Select all

'mshop' => [
    'customer' => [
        'manager' => [
            'address' => [
                'decorators' =>[
                    'local' => ['MyCustIdAddress'] 
                ],
            ],
        ],	
    ],
],

is "mcusad" still the correct SQL alias?
https://github.com/aimeos/aimeos-core/b ... stomer.php changed from 2023 to 2024

Thank you

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

Re: Error with custom field in 2024.10

Post by aimeos » 21 Nov 2024, 09:56

This is a bug because until 2025, the implementation should be backwards compatible with your code. A new version of the aimeos/aimeos-core package with the required fix has been released now.

Starting with 2024.10 and later, the recommended code is described here: https://aimeos.org/docs/latest/models/e ... -decorator
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply