bug PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
27 Feb 2023

Pull Request for Issue #36980.

Summary of Changes

While fixing the issue of #39944, it became clear that not only the content in the index had the issue that you couldn't reliably unpublish it, but that also the taxonomies had an issue with its state. Taxonomies tried to copy over the state from their input data and used that as state for the taxonomie itself. That means, that unpublished categories would have had been added as unpublished taxonomies to a content item. Now if you wanted to prevent a taxonomie to show up in the frontend, you were able to unpublish (or publish) the taxonomie, thus unsyncing the taxonomie and its datasource. You basically were able to set a category to unpublished, index an article from that category and in the resulting taxonomie, you would then be able to enable that again.

At the same time, the state of the taxonomie was changed back to its datasource when the original content item was indexed again. So you unpublished a taxonomie, then edited an article and those taxonomies would be published again. This PR changes this now.

With this PR, Taxonomies now have their own, exclusive state and are either published or unpublished and that state is preserved across several indexing runs. At the same time, taxonomies are only added to the index when they are published, thus having state = 1. Since only published taxonomies show up in the frontend anyway, this doesn't change anything to existing sites.

Furthermore, this PR ensures that languages and access levels are set properly from the datasource and not just from the given method inputs. This specifically means, that the specific language of a category does not overwrite the "all" language of its parent category for example.

Testing Instructions

  1. Create a category with language "all".
  2. Create a second category inside the first with a specific language, like "english".
  3. Create an article inside the second category with a specific language.
  4. Enable the languagefilter plugin.
  5. Go to the Content Maps of Smart Search and unpublish one of the categories.
  6. Clear index and Reindex
  7. Unpublish one of the categories in the category manager.
  8. Clear index and Reindex

Actual result BEFORE applying this Pull Request

Before the patch, the first category would also have the language "english". After reindexing, the unpublished category in the Content Maps is published again. After the second reindexing, the unpublished category and all its children is still listed as a taxonomy.

Expected result AFTER applying this Pull Request

After the patch, the first category has the correct language "all". After reindexing, the unpublished in Content maps is still unpublished. After the second reindexing, the unpublished category and all its children are not listed as taxonomies 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 joomla-cms-bot joomla-cms-bot - change - 27 Feb 2023
Category Administration com_finder
avatar Hackwar Hackwar - open - 27 Feb 2023
avatar Hackwar Hackwar - change - 27 Feb 2023
Status New Pending
avatar toivo toivo - test_item - 13 Mar 2023 - Tested successfully
avatar toivo
toivo - comment - 13 Mar 2023

I have tested this item successfully on 8f19bc0

Tested successfully in Joomla 4.3.0-beta5-dev of 13 March in PHP 8.1.10


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

avatar viocassel viocassel - test_item - 13 Mar 2023 - Tested successfully
avatar viocassel
viocassel - comment - 13 Mar 2023

I have tested this item successfully on 8f19bc0


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

avatar Quy Quy - change - 13 Mar 2023
Status Pending Ready to Commit
Labels Added: PR-4.3-dev
avatar Quy
Quy - comment - 13 Mar 2023

RTC


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

avatar Hackwar Hackwar - change - 18 Apr 2023
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2023-04-18 12:06:38
Closed_By Hackwar
Labels Added: ? bug
avatar Hackwar Hackwar - close - 18 Apr 2023
avatar Hackwar Hackwar - change - 18 Apr 2023
Status Closed New
Closed_Date 2023-04-18 12:06:38
Closed_By Hackwar
Labels Removed: ?
avatar Hackwar Hackwar - change - 18 Apr 2023
Status New Pending
avatar Hackwar Hackwar - reopen - 18 Apr 2023
avatar Hackwar Hackwar - change - 18 Apr 2023
Title
[4.3] Smart Search: Only add published taxonomies
[5.0] Smart Search: Only add published taxonomies
avatar Hackwar Hackwar - edited - 18 Apr 2023
avatar HLeithner HLeithner - change - 30 May 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-05-30 11:36:02
Closed_By HLeithner
Labels Added: PR-5.0-dev
Removed: PR-4.3-dev
avatar HLeithner HLeithner - close - 30 May 2023
avatar HLeithner HLeithner - merge - 30 May 2023
avatar HLeithner
HLeithner - comment - 30 May 2023

thanks

Add a Comment

Login with GitHub to post a comment