RTC bug PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
11 Oct 2025

Pull Request for Issue # .

Summary of Changes

This pull request (PR) removes the wrong unique constraint for the "core_type_alias" and "core_content_item_id" column combination from the "#__ucm_content" table for PostgreSQL databases.

For MySQL we do not have that constraint, see https://github.com/joomla/joomla-cms/blob/6.0-dev/installation/sql/mysql/supports.sql#L307-L352 .

It is an old bug we have at least since Joomla 3.2.7. That was the oldest package I had here to check where the constraint exists for PostgreSQL but not for MySQL.

See also PR #46243 for 5.4-dev for the same bug.

As it's not a release blocker it comes too late for 6.0.0, but will then hopefully go into 6.0.1.

Testing Instructions

Important: It needs a PostgreSQL database to reproduce the issue and test the fix.

Have content history enabled and some articles which have multiple tags assigned.

You can achieve this my making a new installation and then installing blog sample data.

Then edit an article which has some tags assigned, e.g. in case of blog sample data the "Your Template" or any other in the "Blog" category.

Change the content of the article and remove some assigned tag and then use the "Save" button.

Check the edit page after it has reloaded.

Actual result BEFORE applying this Pull Request

With a MySQL or MariaDB database, all works. The content changes are shown, and the previously unassigned tag is not shown anymore.

With a PostgreSQL database, the reloaded page shows the previously unassigned tag again. Content changes are shown.

In the error log of the PostgreSQL server you will find:

ERROR:  duplicate key value violates unique constraint "j3ux0_ucm_content_idx_type_alias_item_id"
DETAIL:  Key (core_type_alias, core_content_item_id)=(com_content.article, 6) already exists.
STATEMENT:  INSERT INTO "j3ux0_ucm_content"
	("core_type_alias","core_title","core_alias","core_body","core_state","core_access","core_params","core_featured","core_metadata","core_created_user_id","core_created_by_alias","core_created_time","core_modified_user_id","core_modified_time","core_language","core_publish_up","core_content_item_id","asset_id","core_images","core_urls","core_hits","core_version","core_ordering","core_metakey","core_metadesc","core_catid","core_type_id") VALUES 
	('com_content.article','Your Template','your-template','<p>Templates control the look and feel of your website.</p>\r\n<p>This blog is installed with the Cassiopeia template.</p>\r\n<p>You can edit the options by selecting the Working on Your Site, Template Settings link in the menu which is visible when you log in.</p>\r\n<p>For example you can change the site background colour, highlights colour, site title, site description and title font used.</p>\r\n<p>More options are available in the site administrator. You may also install a new template using the extension manager.</p>\r\n<p>Blablabl.</p>',1,1,'{"article_layout":"","show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"","info_block_show_title":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_hits":"","show_noauth":"","urls_position":"","alternative_readmore":"","article_page_title":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',1,'{"robots":"","author":"","rights":""}',368,'Joomla','2025-10-07 07:57:32',368,'2025-10-07 08:28:15','*','2025-10-07 07:57:32',6,133,'{"image_intro":"images\\/sampledata\\/cassiopeia\\/nasa4-1200.jpg#joomlaImage:\\/\\/local-images\\/sampledata\\/cassiopeia\\/nasa4-1200.jpg?width=1200&height=400","image_intro_alt":"","image_intro_alt_empty":"1","float_intro":"","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/cassiopeia\\/nasa4-400.jpg#joomlaImage:\\/\\/local-images\\/sampledata\\/cassiopeia\\/nasa4-400.jpg?width=400&height=400","image_fulltext_alt":"","image_fulltext_alt_empty":"1","float_fulltext":"float-start","image_fulltext_caption":"www.nasa.gov\\/multimedia\\/imagegallery"}','{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}',0,10,0,'','',8,1)
	RETURNING core_content_id

Expected result AFTER applying this Pull Request

With a PostgreSQL database it works as well as with MySQL or MariaDB, the content changes are shown, and the previously unassigned tag is not shown anymore.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar richard67 richard67 - open - 11 Oct 2025
avatar richard67 richard67 - change - 11 Oct 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Oct 2025
Category Postgresql SQL Administration com_admin
avatar richard67 richard67 - change - 11 Oct 2025
Labels Added: bug PR-6.0-dev
avatar brianteeman brianteeman - test_item - 11 Oct 2025 - Tested successfully
avatar brianteeman
brianteeman - comment - 11 Oct 2025

I have tested this item ✅ successfully on f047879


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46269.

avatar Bodge-IT Bodge-IT - alter_testresult - 11 Oct 2025 - brianteeman: Tested successfully
avatar richard67 richard67 - alter_testresult - 11 Oct 2025 - brianteeman: Tested successfully
avatar richard67
richard67 - comment - 11 Oct 2025

I've restored the previous human test result as the commits which have invalidated the test count were just a rename of the update SQL script (so it doesn't make problems for another PR) and a clean branch update.

avatar Bodge-IT Bodge-IT - test_item - 11 Oct 2025 - Tested successfully
avatar Bodge-IT
Bodge-IT - comment - 11 Oct 2025

I have tested this item ✅ successfully on c2abc10

Thanks Richard, good catch.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46269.

avatar softforge softforge - change - 11 Oct 2025
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-10-11 16:00:37
Closed_By softforge
Labels Added: RTC
avatar softforge softforge - close - 11 Oct 2025
avatar softforge softforge - merge - 11 Oct 2025
avatar softforge
softforge - comment - 11 Oct 2025

Thank you @richard67 and testers

Add a Comment

Login with GitHub to post a comment