Skip to content

Conversation

@heelc29
Copy link
Contributor

@heelc29 heelc29 commented Oct 28, 2025

Pull Request for Issue #46371 & #46334 .

Summary of Changes

This reverts PR #37140 as due update of choices #46133 the value for single space is now handle differently.

In J5.4 the parameter featured_categories is saved as string(0) "" and in J6.0 the parameter is saved as string(1) " "

Here is the relevant code for set the filter filter.frontpage.categories

J5.4: var_dump((bool) ''); -> filter not set when "All Categories" selected
bool(false)

J6.0: var_dump((bool) ' '); -> filter is set when "All Categories" selected
bool(true)

// Check for category selection
if ($params->get('featured_categories') && implode(',', $params->get('featured_categories'))) {
$featuredCategories = $params->get('featured_categories');
$this->setState('filter.frontpage.categories', $featuredCategories);
}

Testing Instructions

create menu item Featured Articles and set filter Select Categories to All Categories
visit menuitem in frontend
see also issue #46371 for more information

additional check if issue #33556 still solved

Actual result BEFORE applying this Pull Request

no featured articles are displayed

Expected result AFTER applying this Pull Request

featured articles are displayed

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed

@brianteeman
Copy link
Contributor

This change will not fix existing menu items

@heelc29
Copy link
Contributor Author

heelc29 commented Oct 28, 2025

This change will not fix existing menu items

Do you mean we need an update sql here?

Info: This only affects menu entries that were newly created or re-saved under J6.0

@brianteeman
Copy link
Contributor

yes it will need an update sql - otherwise you have to delete the settings and reselect "all categories" and save

@heelc29 heelc29 marked this pull request as draft October 29, 2025 18:13
@heelc29
Copy link
Contributor Author

heelc29 commented Oct 29, 2025

@richard67 Can you advise me on whether I'm on the right track with the SQL update and offer some support with PostgreSQL?

@richard67
Copy link
Member

@richard67 Can you advise me on whether I'm on the right track with the SQL update and offer some support with PostgreSQL?

@heelc29 On quick view the MySQL files doe not look wrong, but I won't have time before weekend to check deeper and do something for PostgreSQL.

@heelc29
Copy link
Contributor Author

heelc29 commented Oct 29, 2025

@heelc29 On quick view the MySQL files doe not look wrong, but I won't have time before weekend to check deeper and do something for PostgreSQL.

That's fine for me.

REGEXP_REPLACE does not support backreferences in replacement string (mysql 8.0.13)

All categories is always first index
@heelc29 heelc29 marked this pull request as ready for review November 1, 2025 16:46
@ceford
Copy link
Contributor

ceford commented Nov 5, 2025

I have tested this item ✅ successfully on 3bba340


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants