Linking suppliers to products in version 2024.10
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Linking suppliers to products in version 2024.10
Versions:
Laravel: v11.29.0
Aimeos: 2024.10.X
PHP: 8.3.0
OS: Ubuntu 22.04.5
I have a job controller which imports products from an API.
After upgrading to version 2024.10.1 i ran into an issue with linking the supplier to the product.
first i load the product and supplier or create them if they don't exist. After that i run the following code:
This results in the error
This error persist in version 2024.10.2
After downgrading to the previous version i used (2024.07.2) the error didn't persist.
Is there some change i missed? Or is this a bug?
Laravel: v11.29.0
Aimeos: 2024.10.X
PHP: 8.3.0
OS: Ubuntu 22.04.5
I have a job controller which imports products from an API.
After upgrading to version 2024.10.1 i ran into an issue with linking the supplier to the product.
first i load the product and supplier or create them if they don't exist. After that i run the following code:
Code: Select all
$listItem = $this->_supplierManager->createListItem();
$listItem->setRefId($supplier->getId());
$productItem->addListItem('supplier', $listItem, $supplier);
$this->_indexManager->save($productItem);
This results in the error
Code: Select all
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'parentid' cannot be null
After downgrading to the previous version i used (2024.07.2) the error didn't persist.
Is there some change i missed? Or is this a bug?
Re: Linking suppliers to products in version 2024.10
You should use the index or product manager to create the list item:MaHo wrote: ↑28 Oct 2024, 11:22 first i load the product and supplier or create them if they don't exist. After that i run the following code:Code: Select all
$listItem = $this->_supplierManager->createListItem(); $listItem->setRefId($supplier->getId()); $productItem->addListItem('supplier', $listItem, $supplier); $this->_indexManager->save($productItem);
Code: Select all
$listItem = $this->_indexManager->createListItem();
It seems like a bug. Can you confirm that the problem still exists if you run "composer update" to get the latest 2024.10.x version of the Aimeos core package? If yes, can you post a stack trace?MaHo wrote: ↑28 Oct 2024, 11:22 This results in the errorThis error persist in version 2024.10.2Code: Select all
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'parentid' cannot be null
After downgrading to the previous version i used (2024.07.2) the error didn't persist.
Is there some change i missed? Or is this a bug?
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: Linking suppliers to products in version 2024.10
I have upgraded to the latest version of aimeos core 2024.10.4. This did not fix the error. However either using the product or the input manager to create the list items seems to solve this issue .
I have included the stack trace as an attachement because of character limits
I have included the stack trace as an attachement because of character limits
- Attachments
-
- stacktrace.zip
- (16.74 KiB) Downloaded 276 times
Re: Linking suppliers to products in version 2024.10
If it's solved, than fine!
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