User tests: Successful: Unsuccessful:
Pull Request resolves #47360 .
This pull request (PR) fixes the SQL error "Duplicate entry '14' for key 'acc_content_types.PRIMARY'" which happens when you update the CMS core from any version older than 6.1.0-beta1 to a 6.1.0-beta1 or 6.1.0-beta2 or a recent 6.1. nightly build and you have a 3rd party component which already use a record with type_id = 14 in the #__content_types database table.
For this purpose, this PR
type_id instead of using the auto-increment.type_title, type_alias and table doesn't exist yet.It is not sufficient just to apply the patch with patchtester and use the database checker to fix the structure as that will not fix content.
You either have to run the SQL statement from the "6.1.0-2026-03-10.sql" script for your database type in phpMyAdmin after having applied the patch.
Or you have to use the patched update package or custom update site URL created by Drone for this PR.
The following 4 tests should be executed in the mentioned order to save you some work.
#__content_types database table, e.g. weblinks, or simulate that by adding such a record with type_id = 14 in phpMyAdmin.Result: See section "Actual result BEFORE applying this Pull Request" below.
Result: See section "Expected result AFTER applying this Pull Request" below.
#__content_types database table, e.g. weblinks, or simulate that by adding such a record with type_id = 14 in phpMyAdmin.Result: See section "Expected result AFTER applying this Pull Request" below.
Update from a 6.1.0-beta1 or 6.1.0-beta2 where the error mentioned in the issue did not happen (e.g. a new installation without any 3rd party extension) and the record in the #__content_types already exists to the patched update package or custom update site URL created by Drone for this PR to get the expected result.
Result: See section "Expected result AFTER applying this Pull Request" below.
The database update fails with an SQL error Duplicate entry '14' for key '#__content_types.PRIMARY' in script "6.1.0-2026-01-29.sql".
The database checker then show errors as the later update SQL script have not run either:

Updating any version older than 6.1.0-beta1 works. The SQL error mentioned in the referred issue doesn't happen.
Updating a 6.1.0-beta1 or 6.1.0-beta2 where the issue has happened with the previous update adds the record in the #__content_types table if it doesn't exist yet.
Updating a 6.1.0-beta1 or 6.1.0-beta2 where the issue has not happened doesn't add the record in the #__content_types table again as that record already exists.
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | SQL Administration com_admin Postgresql |
| Labels |
Added:
PR-6.1-dev
|
||
| Title |
|
||||||
| Title |
|
||||||
@richard67 Sorry, but I didn't backup Site1 in that state, but did an "Update Structure" (as mentioned).
@richard67 Should have hovered over the button, but didn't. Next time ....
@dautrich When you use a patched package or custom update URL created by Dronew for a PR, you always get one database error about the CMS version not matching. This is normal. The log of test 2 shows that all SQL updates were executed successfully. The type_id = 10002 is also expected as that is the autoincrement value set for that column after the core records have been installed.
What remains is the parsing error of the schema updates.
Can it be that the database checker was not reloaded after the update so it still had the buffered error from the previous test 1?
I have to check that later.
I have tested this item 🔴 unsuccessfully on ff76b0b
Laragon 8.4.0, Apache 2.4.62, PHP 8.5.2, MySQL 8.4.3
Joomla 6.0.3 site
Test 1 : successfull
Test 2 : almost successfull
Update error message and database shows one error, but update log file says it's OK and content_types table contains the com_modules.module record as last record of this table.
Test 3 : successfull
On a Joomla 6.0.3 site with Weblinks/Route66, update site using drone update packing (including PR 47361) :
Test 4 : successfull
On a new Joomla 6.0.3 site (no extension), update site using drone update packing (including PR 47361)
Thank you for this PR,
Pascal
The error shown in the database checker about not matching CMS version after an update to a patched package created by Drone is normal.
The reason is that these patched packages do not contain the patched version number in the "libraries/src/Version.php" file, they only have their patched version in the "administrator/manifests/files/joomla.xml" file.
So that's a known issue not related to this PR, and it happens always with these patched packages for pull requests.
What remains is that the parsing of the SQL update scripts returns false.
I have to investigate that.
Test 4 : successfull
On a new Joomla 6.0.3 site (no extension), update site using drone update packing (including PR 47361)
@conseilgouz As my testing instructions fir Test 4 say, you shall update from a 6.1.0-beta1 or 6.1.0-beta2, not from 6.0.3.
Not related to the issue with the parseSchemaUpdates result, but can you report back if you have done Test 4 with a 6.0.3 like you wrote, or if that was just a typo?
Sorry, I messed up for test 4 and I checked that on a new Joomla 6.0.3 site.
I'll redo this test as soon as possible.
@dautrich @conseilgouz Regarding the installer::parseSchemaUpdates finished with "false" result error shown in Test 2, could you try the following:
Does it still happen?
To me it looks as if the error from test 1 is cached somewhere, as the logfile from @dautrich 's Test 1 shows that error, which is excepted for that test.
The log from Test 2 shows no error.
So to me it seems it is still the result from Test 1.
Hi,
Test 4 on a new Joomla 6.1.0 beta 1 OK :
one problem in "maintenance database" due to version mistmatch.
@conseilgouz As said before, that is normal when using the patched packages created by Drone for PRs.
So to me your Test 4 seems to be successful.
Remains the issue with the error installer::parseSchemaUpdates finished with "false" result in Test 2.
Could you try if that also happens when logging out and closing browser after Test 1 and before Test 2?
That would be really helpful.
Thanks in advance, and thanks for testing so far.
Test 2 : OK
After Test 1, I closed my browser.
I started it again and, in my admin, I purged the cache.
On test 1 site, I clicked on fix database, Joomla DB shows no more error
After updating site using drone update packing (including PR 47361): no error
I have tested this item ✅ successfully on ff76b0b
In test 2, you need to close your browser and start it again before performing database fix and site update.
I have tested this item ✅ successfully on ff76b0bIn test 2, you need to close your browser an start it again before performing database fix and site update.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47361.
@conseilgouz Thanks a lot. Seems we have a bug with cached results of SQL updates. I will create a new issue for that when I find the time, very likely on weekend.
@dautrich Could you also test it that way?
@richard67 Is it sufficient to repeat Test 2. And if this part is okay, to post a green test result?
@richard67 Is it sufficient to repeat Test 2. And if this part is okay, to post a green test result?
@dautrich Repeat Test 1 to have the right starting condition for Test 2, and between these tests log out and close browser to be sure the local storage is empty.
I have tested this item ✅ successfully on ff76b0b
I repeated tests 1 and 2. As for your advice, I closed my browser after test1 and reopened before test2. Everything worked smoothly: No update errors, update log okay, #__content_types incremented correctly, just 1 database error (because of inconsistent CMS versions between installed version and Drone update package).
| Status | Pending | ⇒ | Ready to Commit |
RTC
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-03-12 15:45:45 |
| Closed_By | ⇒ | HLeithner | |
| Labels |
Added:
RTC
Release Blocker
bug
|
||
thanks
I have tested this item 🔴 unsuccessfully on ff76b0b
### Test 1 - Successful
Update log:
2026-03-11T07:21:58+00:00 INFO 127.0.0.1 update Test logging
2026-03-11T07:21:58+00:00 INFO 127.0.0.1 update Uploading update file
2026-03-11T07:22:03+00:00 INFO 127.0.0.1 update File [ROOT]\tmp\juBC45.tmp downloaded.
2026-03-11T07:22:03+00:00 INFO 127.0.0.1 update Starting installation of new version.
2026-03-11T07:23:03+00:00 INFO 127.0.0.1 update Finalising installation.
2026-03-11T07:23:03+00:00 INFO 127.0.0.1 update Start of SQL updates.
2026-03-11T07:23:03+00:00 INFO 127.0.0.1 update The current database version (schema) is 6.0.1-2025-10-29.
2026-03-11T07:23:03+00:00 INFO 127.0.0.1 update Ran query from file 6.1.0-2025-10-30. Query text: UPDATE
#__mail_templatesSETparams= '{"tags":["messages","message","date",.2026-03-11T07:23:03+00:00 INFO 127.0.0.1 update Ran query from file 6.1.0-2025-11-29. Query text: INSERT INTO
#__extensions(name,type,element,folder,client_id,. 2026-03-11T07:23:03+00:00 INFO 127.0.0.1 update Ran query from file 6.1.0-2026-01-29. Query text: INSERT INTO#__content_types(type_id,type_title,type_alias,table`, .2026-03-11T07:23:03+00:00 INFO 127.0.0.1 update JInstaller: :Install: Error SQL Duplicate entry '14' for key 'b2k3s_content_types.PRIMARY'
2026-03-11T07:23:03+00:00 INFO 127.0.0.1 update End of SQL updates - INCOMPLETE.
2026-03-11T07:23:03+00:00 WARNING 127.0.0.1 jerror JInstaller: :Install: Error SQL Duplicate entry '14' for key 'b2k3s_content_types.PRIMARY'
2026-03-11T07:23:03+00:00 ERROR 127.0.0.1 update An error has occurred while running "installer::parseSchemaUpdates". Code: 0. Message: installer::parseSchemaUpdates finished with "false" result..
2026-03-11T07:23:04+00:00 INFO 127.0.0.1 update Cleaning up after installation.
2026-03-11T07:23:04+00:00 INFO 127.0.0.1 update Update to version 6.1.0-beta2 is complete.
Test 2 - Unsuccesful
Update log:
2026-03-11T07:40:31+00:00 INFO 127.0.0.1 update Test logging
2026-03-11T07:40:31+00:00 INFO 127.0.0.1 update Uploading update file
2026-03-11T07:40:35+00:00 INFO 127.0.0.1 update File [ROOT]\tmp\juB89B.tmp downloaded.
2026-03-11T07:40:36+00:00 INFO 127.0.0.1 update Starting installation of new version.
2026-03-11T07:41:35+00:00 INFO 127.0.0.1 update Finalising installation.
2026-03-11T07:41:35+00:00 INFO 127.0.0.1 update Start of SQL updates.
2026-03-11T07:41:35+00:00 INFO 127.0.0.1 update The current database version (schema) is 6.1.0-2026-02-06.
2026-03-11T07:41:35+00:00 INFO 127.0.0.1 update Ran query from file 6.1.0-2026-03-07. Query text: UPDATE
#__extensionsSETparams= JSON_REPLACE(params, '$.html_height' .2026-03-11T07:41:35+00:00 INFO 127.0.0.1 update Ran query from file 6.1.0-2026-03-07. Query text: UPDATE
#__extensionsSETparams= JSON_REPLACE(params, '$.html_width' ,.2026-03-11T07:41:35+00:00 INFO 127.0.0.1 update Ran query from file 6.1.0-2026-03-10. Query text: INSERT INTO
#__content_types(type_title,type_alias,table,rules, `f.2026-03-11T07:41:35+00:00 INFO 127.0.0.1 update End of SQL updates.
2026-03-11T07:41:35+00:00 INFO 127.0.0.1 update Uninstalling extensions
2026-03-11T07:41:35+00:00 INFO 127.0.0.1 update Deleting removed files and folders.
2026-03-11T07:41:37+00:00 INFO 127.0.0.1 update Cleaning up after installation.
2026-03-11T07:41:37+00:00 INFO 127.0.0.1 update Update to version 6.1.0-beta3-dev+pr.47361 is complete.
Test 3 - Successful
Test 4 - Successful
Testing Environment
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47361.