Search
Other Advanced Module Manager questions
Forum

AMM is broken post Joomla 4 migration: Duplicate entry '199' for key 'PRIMARY'

Jonathan Roseland's Avatar Jonathan Roseland
I'm harrowing through the hell of migrating my +1000-page website from J3 to J4. I've removed all old/unneeded plugins that the J4 update dashboard was warning me about.

The J4 update dashboard told me that my Regular Labs extensions were fine for the update - I had AMM 9.5.5. But upon the J4 update going through I got the error message:
Your installed version of Advanced Module Manager is not compatible with Joomla 4.
Please check if there is a version of Advanced Module Manager available for Joomla 4 and install that.
The Advanced Module Manager plugin has been disabled!
Your installed version of Modules Anywhere is not compatible with Joomla 4.
Please check if there is a version of Modules Anywhere available for Joomla 4 and install that.
The Modules Anywhere plugin has been disabled!
As you can see on my development/testing site here
www.limitlessmindset.com/4/
The pages load blank, reloading loads the pages looking pretty normal but stacked up with hundreds of modules - which must be because AMM is disabled.

I have tried following the Regular Labs' instructions and reinstalling Advanced Module Manager Pro and it doesn't work. I get the error messages:
The Regular Labs Library v22.12.18594 has been successfully reinstalled
Regular Labs Conditions v22.12.18594 has been successfully installed
×
Warning
Duplicate entry '199' for key 'PRIMARY'
Package Install: There was an error installing an extension: com_advancedmodules
×
danger
Error installing package
I do need Advanced Module Manager/Modules Anywhere - my website has thousands of modules, embedded on hundreds of different pages. I can't go through and reassign ALL my modules. I want my module assignments to migrate as Regular Labs promises they will here docs3.regularlabs.com/advancedmodulemana...m-joomla3-to-joomla4

Thanks for your help, will leave AMM 5-star feedback on JED as soon as we get this fixed.
Peter van Westen's Avatar Peter van Westen ADMIN
So something seems off in your database.
To see if I can find the source of the issues you are facing, I would need to get access to your system.

Can you give me (super) admin, (s)ftp and database (PhpMyAdmin) access to both these setups?
- Your setup from before the upgrade to Joomla 4 (or at least from before you re-installed Advanced Module Manager on the J4 site).
- And the setup after re-installing AMM.

You can use the 'Confidential information' button in the forum editor to hide sensitive information.
Please post a rating at the Joomla! Extensions Directory
Jonathan Roseland's Avatar Jonathan Roseland
Sure can. My setup before the upgrade was Joomla 3.10 and the most recent version of free AMM and setup after upgrade is 4.2.6.

Credentials are in the confidential tab

Confidential information:
(hidden)


Thanks for getting back to me so promptly!
Peter van Westen's Avatar Peter van Westen ADMIN
I am not sure I am getting the correct access.
On the J4 setup, the Regular Labs Conditions extension is installed and has items.
These are stored in database tables with '_conditions' in the name.

However, when I go to your phpMyAdmin, and open the database connected to your site (..._limitle1), I don't see any of those database tables.
So not sure what is going on there...
Please post a rating at the Joomla! Extensions Directory
Jonathan Roseland's Avatar Jonathan Roseland
Hey Peter - I think you've got the wrong databases

Confidential information:
(hidden)

Does that clarify things?
Jonathan Roseland's Avatar Jonathan Roseland
And I should add that the J3 testing site there is a bit bloated with old extensions and plugins, as I'm sure you'll notice. Before running the J4 update I cleared out all those old ones that the J4 dashboard was telling me wouldn't migrate. So the issue is with Regular Labs/AMM by my estimation, NOT all the old extensions' tables that you'll see there in the
Confidential information:
(hidden)
database.
Jonathan Roseland's Avatar Jonathan Roseland
Did you get a chance to look at this 👆
Peter van Westen's Avatar Peter van Westen ADMIN
I was indeed looking at the wrong table. Got confused due to the DB username.

I am looking at the J3 vs J4 database, but the number of modules in the J3 database does not match the number in the J4 setup.
So have you removed or changed any frontend modules?
If so, then I can't reset the database tables for the modules to the J3 version.

Or do you have a version of the database from after the upgrade to J4 but before the reinstall of AMM?
Please post a rating at the Joomla! Extensions Directory
Jonathan Roseland's Avatar Jonathan Roseland
I ran a backup of the leaner J3 site directly before upgrading to J4 - it's deployed here
Confidential information:
(hidden)

You're welcome to experiment with THIS backup of my website - run the J4 upgrade yourself.

Thanks!
Jonathan Roseland's Avatar Jonathan Roseland
Any luck on this? I need to get my J4 site ready for primetime and deployed today
Peter van Westen's Avatar Peter van Westen ADMIN
I am looking into this. But it takes a long time.
Creating backups, updating, backups, installing, restoring the database tables, installing, etc.

You have a LOT of modules and a lot of data. So it all takes a long time to restore and test-run.
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
The development version should now install without errors.
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Jonathan Roseland's Avatar Jonathan Roseland
You're saying that v9.5.6-dev2532009 should work on my J4 site here
Confidential information:
(hidden)
. Do I need to uninstall the previous version of AMM?
Peter van Westen's Avatar Peter van Westen ADMIN
TO have the conversion from the J3 assignments to J4 assignments be done during installation, you need to make sure the _advancedmodules table is restored to the one from your J3 database.
And delete these tables:
_conditions
_conditions_groups
_conditions_map
_conditions_rules

Then install the dev version of Advanced Module Manager Pro.
Please post a rating at the Joomla! Extensions Directory
Jonathan Roseland's Avatar Jonathan Roseland
OK I'm confused now, so I need to revert back to the J3 version of the site? Delete those tables, upgrade to J4, and reinstall the development version of AMM?

Or can we get the J4 version of my site here www.limitlessmindset.com/4/ working?
Peter van Westen's Avatar Peter van Westen ADMIN
If you revert back to the J3 version of the site, then you don't need to do anything, except upgrade and install the dev version.

The deletion of those tables (and setting back the _advancedmodules table) should only be done if you already installed Advanced Module Manager on the J4 version.

So on your J4 setup:
- just remove those '_conditions' tables
- overwrite the '_advancedmodules' table with the one from your J3 database.
- install the dev version of Advanced Module Manager.
Please post a rating at the Joomla! Extensions Directory
Jonathan Roseland's Avatar Jonathan Roseland
I've reverted to the most recent J3 backup here
Confidential information:
(hidden)

Please double-check the AMM version installed, the database tables you mentioned, and you can then run the J4 upgrade yourself.
Peter van Westen's Avatar Peter van Westen ADMIN
Sorry but that is beyond my support. You will have to do your own upgrades.

If you still have issues with the latest development version, let me know.
Please post a rating at the Joomla! Extensions Directory
Jonathan Roseland's Avatar Jonathan Roseland
I'm asking (and have paid for) your support because your extension was not working as advertised here docs3.regularlabs.com/advancedmodulemana...m-joomla3-to-joomla4 . You've given me confusing instructions a few times now so I'd like you to double-check the J3 testing site and database to make sure that the module reassignment will work the way it's supposed to, then we'll run the upgrade and I'll be done bothering you.
Peter van Westen's Avatar Peter van Westen ADMIN
It looks like your 'reverted to the most recent J3 backup' did not delete any database tables specific to Joomla 4. Including those '_conditions' tables.

So:
- remove those '_conditions' tables
_conditions
_conditions_groups
_conditions_map
_conditions_rules
- install the dev version of Advanced Module Manager.

I already did the upgrade to Joomla 4 and installation of the dev version of AMM on that URL before.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription