Reset Category Id count in for Catalog

Questions around the Aimeos bundle for the Symfony framework
Forum rules
Always add your Symfony, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
alex110504
Posts: 4
Joined: 15 Jan 2017, 04:28

Reset Category Id count in for Catalog

Post by alex110504 » 15 Jan 2017, 04:35

Is there a way to reset count of category ID's in catalog? I had initial catalog tree with the root category starting with 1. I deleted the tree in expert admin panel and started creating a new one, however the category id's shifted. The root now starts with 15. Deleted all categories again, ran "index/rebuild" and "admin/cache" jobs, created new list of categories, but this did not help.

Running symfony "aimeos/aimeos-core": "~2016.10"
symfony 3.1.8

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

Re: Reset Category Id count in for Catalog

Post by aimeos » 15 Jan 2017, 14:50

The old data is still in the cache. You have to execute on the command line:

Code: Select all

php bin/console aimeos:cache
The admin/cache job controller removes only expired cache entries.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

alex110504
Posts: 4
Joined: 15 Jan 2017, 04:28

Re: Reset Category Id count in for Catalog

Post by alex110504 » 15 Jan 2017, 15:11

Deleted entire category tree through admin back end, used the suggested command, refreshed the admin back end in browser, added new root node, id is incremented again. Starts with 17 now. I guess I'll live with it. Thanks!

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

Re: Reset Category Id count in for Catalog

Post by aimeos » 15 Jan 2017, 15:21

That's the best way. Otherwise, you would have to reset the MySQL autoinrement value for the mshop_catalog table.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply