bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Reda-Muhamed
Reda-Muhamed
19 Apr 2026

Pull Request resolves #47609

Summary of Changes

The bug happens because the system sends data to the UCM table without the existing ID, creating a duplicate row on every save.

I fixed it inside the CoreContent table class by adding a check to automatically catch the missing ID before saving. This forces an UPDATE instead of a new INSERT.

Testing Instructions

  1. Create a new article, add a tag, and click Save.
  2. Check the #__ucm_content table in your database. You will see 1 row.
  3. Edit the same article and click Save multiple times.
  4. Check the database table again.

Actual result BEFORE applying this Pull Request

You get a new duplicate row in the #__ucm_content table every time you click Save.

Expected result AFTER applying this Pull Request

The existing row is updated correctly, and no duplicate rows are created.

Link to documentations

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

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

avatar Reda-Muhamed Reda-Muhamed - open - 19 Apr 2026
avatar Reda-Muhamed Reda-Muhamed - change - 19 Apr 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Apr 2026
Category Libraries
avatar Reda-Muhamed Reda-Muhamed - change - 19 Apr 2026
The description was changed
avatar Reda-Muhamed Reda-Muhamed - edited - 19 Apr 2026
avatar chmst
chmst - comment - 19 Apr 2026

Tested and works as described. Please update as @richard67 said.

avatar Reda-Muhamed Reda-Muhamed - change - 19 Apr 2026
Labels Added: Updates Requested bug PR-5.4-dev
avatar Reda-Muhamed Reda-Muhamed - change - 19 Apr 2026
Labels Removed: Updates Requested
avatar sertlan
sertlan - comment - 20 Apr 2026

A tag is not adding to an existing article. After saving the article, the tag disappears.

Opened an existing article.
Added a tag.
Saved the article.
The tag has disappeared.

avatar chmst
chmst - comment - 20 Apr 2026

So this is a problem with existing data. If there are already duplicates in the ucm table.

@sertlan could you please check your database again. Tags and articles are mapped in a table .. contentitem_tag_map. Probbaly the new tag is mapped to the wrong contentitem?

avatar sertlan
sertlan - comment - 20 Apr 2026

With the previous version of the CoreContent.php file, the tag is added to the existing article.

avatar Reda-Muhamed
Reda-Muhamed - comment - 20 Apr 2026

With the previous version of the CoreContent.php file, the tag is added to the existing article.

I just tested this locally to be 100% sure. When I create a new article, add tags, and save multiple times, it works perfectly. No duplicate rows are created, and the tags display correctly without disappearing.

@sertlan , the issue you are seeing is because your database already has old duplicate rows from before applying this PR. Because your article already has multiple IDs in the UCM table, the tag saves to one ID, but Joomla tries to read from another. That's why it looks like the tag "disappeared."

avatar sertlan
sertlan - comment - 20 Apr 2026

@Reda-Muhamed A tag is not adding to an existing and new article if it has already been saved once. After saving the article again, the tag disappears.

Created a new article after applying this PR, added tags, and saved it.
Added another tag.
Saved the article.
The added tag has disappeared.

Also, the tags cannot be deleted after saving the article again.

avatar brianteeman
brianteeman - comment - 20 Apr 2026

we had this in another issue see #46734

avatar sertlan
sertlan - comment - 20 Apr 2026

@brianteeman Not exactly the same. This problem only occurs with the new CoreContent.php file. This problem does not occur with the old CoreContent.php file.

Please fix it.

avatar Reda-Muhamed
Reda-Muhamed - comment - 20 Apr 2026

@Reda-Muhamed Created a new article after applying this PR, added tags, and saved it. Added another tag. Saved the article. The added tag has disappeared.

I have tried to delete the old articles with the all tags and i saw this problem, but do not worry, I will try to solve this issue.

avatar chmst
chmst - comment - 20 Apr 2026

This could be even worse as we don't see at the moment where wrong associations between articles and tags are stored. We must proceed very carfully.

avatar Reda-Muhamed
Reda-Muhamed - comment - 20 Apr 2026

@brianteeman Not exactly the same. This problem only occurs with the new CoreContent.php file. This problem does not occur with the old CoreContent.php file.

Please fix it.

This could be even worse as we don't see at the moment where wrong associations between articles and tags are stored. We must proceed very carfully.

To clarify my previous comment: the issue I experienced only happened because i manually deleted rows directly from my local database using raw SQL while trying clean up my old data, but for me i do not see this issue again after set up a completely fresh Joomla installation

avatar sertlan
sertlan - comment - 20 Apr 2026

Another problem with the new CoreContent.php file:

After changing "Title", "Alias", "Article Text", "Meta Description", "Keywords" fields in the article, the values of core_title, core_alias, core_body, core_metakey, core_metadesc, core_modified_time in the ucm_content table do not change.

avatar sertlan
sertlan - comment - 21 Apr 2026

i do not see this issue again after set up a completely fresh Joomla installation

@Reda-Muhamed Fresh Joomla installation is not a solution to this problem, and it is unfair for old and loyal Joomla users. I have Joomla websites since 2013-2017, one of them contains 12,000+ articles and 300+ tags.

avatar Reda-Muhamed
Reda-Muhamed - comment - 21 Apr 2026

@Reda-Muhamed Fresh Joomla installation is not a solution to this problem, and it is unfair for old and loyal Joomla users. I have Joomla websites since 2013-2017, one of them contains 12,000+ articles and 300+ tags.

I see, can you please check it again.
It should work as expected and I tested it.

avatar sertlan
sertlan - comment - 21 Apr 2026

@Reda-Muhamed Tested it. With the new CoreContent.php file these problems (1, 2) still exist.

avatar sertlan
sertlan - comment - 22 Apr 2026

@richard67 @Reda-Muhamed This fix with changes in the CoreContent.php file led to more severe issues.

Issue 1
A tag is not adding to an existing and new article if it has already been saved once.
After saving the article again, the added tag is missing.
Also, tags cannot be deleted when saving an article again, if the article has been saved once.

Issue 2
The values ​​in the ucm_content table are not updated after changing an article.
After changing "Title", "Alias", "Article Text", "Meta Description", "Keywords" fields in the article, the values of core_title, core_alias, core_body, core_metakey, core_metadesc, core_modified_time in the ucm_content table do not change.

Please solve these issues.

avatar chmst
chmst - comment - 22 Apr 2026

@sertlan

Fresh Joomla installation is not a solution to this problem, and it is unfair for old and loyal Joomla users. I have Joomla websites since 2013-2017, one of them contains 12,000+ articles and 300+ tags.

@Reda-Muhamed wants to solve your problem.
He suggested that you install a fresh Joomla just for test.
If you cannot do that, please be patient. We are working on it.

avatar Hackwar
Hackwar - comment - 22 Apr 2026

Unfortunately this is not the right fix for the issue. Please have a look at #47664 instead.

avatar sertlan
sertlan - comment - 23 Apr 2026

The successful fix for this issue in Pull Request #47664.

avatar Reda-Muhamed Reda-Muhamed - close - 23 Apr 2026
avatar Reda-Muhamed
Reda-Muhamed - comment - 23 Apr 2026

I will close this one since PR #47664 is the better fix.

avatar Reda-Muhamed Reda-Muhamed - change - 23 Apr 2026
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2026-04-23 12:42:49
Closed_By Reda-Muhamed

Add a Comment

Login with GitHub to post a comment