Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#6336 by sixbynine
05 Jul 2018, 07:37
1/ When running aimeos:setup

Capture_2.PNG
Capture_2.PNG (12.19 KiB) Viewed 208 times


2/ When I try to see an order detail in admin panel :

bug_1.PNG
bug_1.PNG (20.81 KiB) Viewed 208 times


3/ When aimeos tries to duplicate a product (only when the product existed before the update), the image typeid of the product is null:

An exception occurred while executing ' INSERT INTO "mshop_media" ( "langid", "typeid", "label", "mimetype", "link", "status", "domain", "preview", "mtime", "editor", "siteid", "ctime" ) VALUES ( NULL, NULL, ... ) ': SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'typeid' cannot be null

What can I do?
#6344 by aimeos
05 Jul 2018, 16:32
sixbynine wrote:The solution I found for 1/ is to remove users_address table (but data is lost!)


You had records in your users_address table that had no releation to the users table any more. We added that constraint so there will be no more dangling address (and also list) records in the future if you delete an user. A migration task that deletes the dangling records might be helpful in this case ...

sixbynine wrote:For 2/ i can now reach a detailed view of the orders but curiously the link for the order is not correct : i.e. for order 260, the href is : https://myproject/admin/default/jqadm/get/order/265


What was the problem why you got an exception?
There are two order related IDs, the invoice ID from mshop_order (260) and the basket ID from mshop_order_base (265). They may differ if you have more records in one table than in the other.

Can you investigate why the type ID for the images is NULL in that case?
#6355 by sixbynine
05 Jul 2018, 20:53
aimeos wrote:
sixbynine wrote:The solution I found for 1/ is to remove users_address table (but data is lost!)

You had records in your users_address table that had no releation to the users table any more. We added that constraint so there will be no more dangling address (and also list) records in the future if you delete an user. A migration task that deletes the dangling records might be helpful in this case ...


Ok ! Sorry ! I did not understand it was a new foreign constraint working in that way. So, it's perfect :)

sixbynine wrote:For 2/ i can now reach a detailed view of the orders but curiously the link for the order is not correct : i.e. for order 260, the href is : https://myproject/admin/default/jqadm/get/order/265

What was the problem why you got an exception?


I'm not sure about the reason I got this exception, could it be related to the product stock plugin?
Because, I have a custom one and I think aimeos:setup re-enabled the original one.

There are two order related IDs, the invoice ID from mshop_order (260) and the basket ID from mshop_order_base (265). They may differ if you have more records in one table than in the other.


Ok, i'll check that too :)

Can you investigate why the type ID for the images is NULL in that case?


I'll check it... I noticed in the previous Aimeos version that sometimes when I duplicated a selection product, the image was suddenly lost. I lost a few images that way and it is maybe related to it.

Thank you a lot a lot.
#6364 by aimeos
06 Jul 2018, 09:33
We've added a setup task that removes the left over user address and list entries first before the contraint is added. Thus, the first problem shouldn't occur any more.
#6394 by sixbynine
09 Jul 2018, 09:56
Thank you very much !

For the "typeid" problem,

-----------------------------2484765858301
Content-Disposition: form-data; name="'image[idx][media.typeid]'.replace( 'idx', idx )"

2
Last edited by sixbynine on 09 Jul 2018, 10:08, edited 2 times in total.