Upgrade from 18.10.11 to 22.7.1

Questions around the TYPO3 integration and plugins
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!
Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Upgrade from 18.10.11 to 22.7.1

Post by Moritz » 14 Oct 2022, 11:33

Also when I purchase something with an logged in user, the user isn't related to the order.
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

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

Re: Upgrade from 18.10.11 to 22.7.1

Post by aimeos » 15 Oct 2022, 14:58

Moritz wrote: 13 Oct 2022, 14:42 The problem is that I do not know the reason why the orders are not displayed.
Due to this ignorance, I also don't know where to investigate.
Add this to your setup TypoScript and reload the page with the account/history plugin:

Code: Select all

plugin.tx_aimeos.settings.madmin.log.manager.loglevel = 7
Then, check the logged SQL statements in the Aimeos Log panel and search for the one that retrieves the orders for the order history. Test that SQL statement e.g. in phpMyAdmin and remove conditions until you found out why it didn't return anything.
Moritz wrote: 13 Oct 2022, 14:42 I can provide you with the results of the upgrade wizard. Debug logging should be enabled there.
DB was v18.10.11 and Aimeos v22.10.1-pre2.
SQLs_upgrade_wizard.zip
Had a look into the executed migrations and found something fishy:

Code: Select all

Migrating: /var/www/typo3/typo3conf/ext/aimeos/Resources/Libraries/aimeos/ai-typo3/setup/TablesMigrateSiteidTypo3.php
Update fe_users "siteid" columns Checking table fe_users_list_type
 -> ALTER TABLE fe_users_list_type CHANGE siteid siteid VARCHAR(255) NOT NULL Checking table fe_users_property_type
 -> ALTER TABLE fe_users_property_type CHANGE siteid siteid VARCHAR(255) NOT NULL Checking table fe_users_property
 -> ALTER TABLE fe_users_property CHANGE siteid siteid VARCHAR(255) NOT NULL Checking table fe_users_list
 -> ALTER TABLE fe_users_list CHANGE siteid siteid VARCHAR(255) NOT NULL Checking table fe_users_address
 -> ALTER TABLE fe_users_address CHANGE siteid siteid VARCHAR(255) DEFAULT NULL Checking table fe_users
 -> ALTER TABLE fe_users CHANGE siteid siteid VARCHAR(255) DEFAULT NULL 
Contrary to the other tables, fe_users.siteid and fe_users_address.siteid are changed to "DEFAULT NULL" instead of "NOT NULL". Are those columns still "DEFAULT NULL" after completing all migrations?
Moritz wrote: 13 Oct 2022, 14:42 Have you an explanation why die category filter are not always expanded anymore?
Before experimenting with v22.10.1-pre2 the full filter tree was shown...
Not aware of any changes there ...
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Upgrade from 18.10.11 to 22.7.1

Post by Moritz » 17 Oct 2022, 08:17

Then, check the logged SQL statements in the Aimeos Log panel and search for the one that retrieves the orders for the order history. Test that SQL statement e.g. in phpMyAdmin and remove conditions until you found out why it didn't return anything.
Here are only select orders without a customer ID?

sql_order_history.png
sql_order_history.png (59.15 KiB) Viewed 1628 times
Contrary to the other tables, fe_users.siteid and fe_users_address.siteid are changed to "DEFAULT NULL" instead of "NOT NULL". Are those columns still "DEFAULT NULL" after completing all migrations?
Currently I use the official v22.10.1 and migrate from v18.10.11 again.
Both field (fe_users.siteid & fe_users_address.siteid) are "DEFAULT NULL".
Not aware of any changes there ...
I compared v22.7.4 with v22.10.1 and there are changes in the tree-partial.php.
https://github.com/aimeos/ai-client-htm ... 1805d9dabe
What was all changed there?
Are all categories still output or only the parents?
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Upgrade from 18.10.11 to 22.7.1

Post by Moritz » 17 Oct 2022, 09:28

I debugged the tree-partial.php and found out that you used $item->hasChildren() in v22.7.4 to check if the node has child categories.
Now you use $item->getChildren()->isEmpty().
But they have different results?

tree-partial.php.PNG
tree-partial.php.PNG (78.66 KiB) Viewed 1627 times
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

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

Re: Upgrade from 18.10.11 to 22.7.1

Post by aimeos » 17 Oct 2022, 09:36

Moritz wrote: 17 Oct 2022, 09:28 I debugged the tree-partial.php and found out that you used $item->hasChildren() in v22.7.4 to check if the node has child categories.
Now you use $item->getChildren()->isEmpty().
But they have different results?
Yes, there's a difference: "$item->hasChildren()" returns true if there are children in the database but not fetched while "$item->getChildren()->isEmpty()" returns only true if there are actually child nodes loaded from the database.

If you want a megamenu or always show e.g. the first category level in your category tree, you must set the level-always setting in the flexform of the plugin to the number of category levels you want to display.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

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

Re: Upgrade from 18.10.11 to 22.7.1

Post by aimeos » 17 Oct 2022, 09:53

Moritz wrote: 17 Oct 2022, 08:17 Here are only select orders without a customer ID?
There was a line missing that prevented the user ID from being used:
https://github.com/aimeos/aimeos-typo3/ ... xt.php#L13

Can you add that line and check if it works now?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Upgrade from 18.10.11 to 22.7.1

Post by Moritz » 17 Oct 2022, 10:59

Awesome!
Both solutions works 👍

Is there anything left to do with the siteid DEFAULT NULL?

EDIT:
Please test if the typeid column in fe_users_list and fe_users_property is changed from INT to VARCHAR:
The typeid column is still INT.
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

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

Re: Upgrade from 18.10.11 to 22.7.1

Post by aimeos » 17 Oct 2022, 11:16

This should change the site ID of fe_users_address to NOT NULL after the site ID migration:
https://github.com/aimeos/ai-typo3/blob ... er.php#L17

Can you please check if the TablesMigrateSiteidTypo3.php task runs before the Customer.php task and if the customer task generates an ALTER TABLE statement?

The fe_users.siteid column will be changed to NOT NULL in the future if you run the database analyzer (but don't remove the foreign key constraints!):
https://github.com/aimeos/aimeos-typo3/ ... f5542183fb
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Upgrade from 18.10.11 to 22.7.1

Post by Moritz » 17 Oct 2022, 11:49

Can you please check if the TablesMigrateSiteidTypo3.php task runs before the Customer.php task and if the customer task generates an ALTER TABLE statement?
Do you mean the "typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-core/setup/Customer.php"?
If yes, the "TablesMigrateSiteidTypo3.php" runs before it.

But i don't know how to get the SQL here:

customer.png
customer.png (46.07 KiB) Viewed 1614 times
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

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

Re: Upgrade from 18.10.11 to 22.7.1

Post by aimeos » 17 Oct 2022, 11:53

If there's any ALTER TABLE statement, it will be printed after the output of "Creating customer schema".

Can you check if the fe_users.siteid and fe_users_address.siteid columns contains any records with siteid of NULL after the migration from 18.10 to 22.10?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply