Skip to content

Enhance com_menus filters to support URL-based query parameters#47485

Closed
bharath110520 wants to merge 1 commit intojoomla:5.4-devfrom
bharath110520:fix-dropdown-filter-url
Closed

Enhance com_menus filters to support URL-based query parameters#47485
bharath110520 wants to merge 1 commit intojoomla:5.4-devfrom
bharath110520:fix-dropdown-filter-url

Conversation

@bharath110520
Copy link
Copy Markdown

@bharath110520 bharath110520 commented Mar 28, 2026

Pull Request resolves #47445.

I read the Generative AI policy and my contribution is compatible with the policy and GNU/GPL 2 or later.


Summary of Changes

Enhances the com_menus administrator view to support URL-based filter parameters.

Currently, filter interactions rely on POST requests and session state, so filter values are not reflected in the URL. This change updates filter handling to use URL query parameters, improving usability and enabling shareable filtered views.

Key improvements include:

  • Converting filter submissions to GET-based URL updates
  • Supporting nested parameters (e.g., filter[search])
  • Handling multi-value fields and preventing duplicate parameters
  • Preserving URL hash
  • Preventing multiple overrides
  • Maintaining POST behavior for toolbar actions (delete, ordering, etc.)

Testing Instructions

  1. Go to Administrator → Menus → Manage

  2. Change filters such as:

    • Dropdown filters (e.g., Site / Administrator)
    • Search field (press Enter or click search button)
    • Column sorting
  3. Verify that:

    • The URL updates with corresponding query parameters
    • Reloading the page preserves filter state
    • Opening the URL in a new tab retains filters correctly
  4. Test toolbar actions:

    • Delete
    • Ordering

    Confirm that these actions still work correctly using POST requests.


Actual result BEFORE applying this Pull Request

  • Filter interactions used POST and session state
  • Filter values were not reflected in the URL
  • Reloading or sharing the URL did not preserve filter state

Expected result AFTER applying this Pull Request

  • Filter state is reflected in the URL using query parameters
  • Reloading or sharing the URL preserves filter state
  • URL remains clean and consistent
  • Toolbar actions continue to function correctly using POST

Link to documentations

No documentation changes for guide.joomla.org needed

No documentation changes for manual.joomla.org needed


AI usage

I have read the Generative AI policy.

This contribution was created with assistance from AI tools, but I have fully reviewed, tested, and validated the code.

I confirm that:

  • The code is understood and verified by me
  • It complies with GNU/GPL v2 or later
  • No proprietary or copyrighted code is included
  • The implementation has been tested and behaves as expected

@BeginnerJoomlaCom
Copy link
Copy Markdown

For PRs: Complete the Pull Request template and include test instructions.

@bharath110520 Please read: #47215

@LadySolveig
Copy link
Copy Markdown
Contributor

LadySolveig commented Mar 28, 2026

As you yourself have already mentioned here #47445 (comment), this PR is, if anything, an enhancement.
Please read this to help you choose the right branch
https://github.com/joomla/joomla-cms?tab=readme-ov-file#which-branch-should-my-pull-request-target

Please take another close look at whether this is consistent with the rest of the codebase and check whether this behavior actually occurs in other places as well and is expected here.
Implementing this via an inline script is definitely incorrect.

Thank you for your time and your try.
You might want to take some time beforehand to familiarize yourself more thoroughly with the current code of the project and other ressources.

@brianteeman
Copy link
Copy Markdown
Contributor

This is obviously wrong

@bharath110520
Copy link
Copy Markdown
Author

For PRs: Complete the Pull Request template and include test instructions.

@bharath110520 Please read: #47215Thanks for the guidance. I’ve added the test instructions to the PR.

@BeginnerJoomlaCom
Copy link
Copy Markdown

BeginnerJoomlaCom commented Mar 29, 2026

For PRs: Complete the Pull Request template

Please read #47215 carefully, you are missing:

ai

@bharath110520
Copy link
Copy Markdown
Author

Thanks for the clarification. I’ve updated the PR and added the AI usage declaration.

@bharath110520
Copy link
Copy Markdown
Author

As you yourself have already mentioned here #47445 (comment), this PR is, if anything, an enhancement. Please read this to help you choose the right branch https://github.com/joomla/joomla-cms?tab=readme-ov-file#which-branch-should-my-pull-request-target

Please take another close look at whether this is consistent with the rest of the codebase and check whether this behavior actually occurs in other places as well and is expected here. Implementing this via an inline script is definitely incorrect.

Thank you for your time and your try. You might want to take some time beforehand to familiarize yourself more thoroughly with the current code of the project and other ressources.

Thank you for the feedback.

I understand that implementing this via an inline script in the template is not aligned with Joomla’s architecture.

I explored this approach to validate the behavior, but I see that a proper solution would require changes at the core searchtools or framework level to maintain consistency.

I will take some time to better understand the existing implementation and architectural patterns before attempting a revised approach.

Appreciate your guidance.

@brianteeman
Copy link
Copy Markdown
Contributor

Please take another close look at whether this is consistent with the rest of the codebase and check whether this behavior actually occurs in other places as well and is expected here. Implementing this via an inline script is definitely incorrect.

Thank you for your time and your try. You might want to take some time beforehand to familiarize yourself more thoroughly with the current code of the project and other ressources.

@muhme
Copy link
Copy Markdown
Contributor

muhme commented Mar 30, 2026

@bharath-phenix Thank you very much for your contribution!

We have closed the issue with "In Joomla administrator lists (such as Menus, Articles, etc.), filter values are typically stored in the user session rather than in the URL. This behaviour is therefore expected and not considered a bug."

We will go ahead and close this PR.

@muhme muhme closed this Mar 30, 2026
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.4.x] Dropdown filter does not update in URL of administrator (Menus)

8 participants