Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.4] Fix System - Page Cache plugin ignore Exclude URLs parameter #42871

Merged

Conversation

joomdonation
Copy link
Contributor

Pull Request for Issue #42477.

Summary of Changes

There is a bug in System - Page Cache plugin causes Exclude URLs never works as explained in original issue. This PR just fixes that issue. Plus I change the code for checking URLs exclusion to use the same code like in Joomla 3 because:

  • It is easier to read
  • It is faster because it uses early return, so it not having to loop over all array elements.

Testing Instructions

  1. Uses Joomla 4.4
  2. Create a menu item to link to a Joomla article, set it's alias to something like test-page-cache-exclusion (this alias will will be configured in Exclude URLs parameter)
  3. Edit System - Page Cache plugin, look at Advanced tab, enter Alias of the menu item which you created above into Exclude URLs parameter. Make sure Status set to Enabled, save it.

Actual result BEFORE applying this Pull Request

The page is always being cached. To see that, you can access to that menu item for the first page. Then try to edit code in the file components/com_content/tmpl/article/default.php , add some random string to it. Then access to the menu item again, you do not see any change (because the system uses a cached version of the page)

Expected result AFTER applying this Pull Request

The page is not being cached as expected. To see that, you can access to that menu item for the first page. Then try to edit code in the file components/com_content/tmpl/article/default.php , add some random string to it. Then access to the menu item again, you will see the change you applied.

Link to documentations

Please select:

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

@TLWebdesign
Copy link

I have tested this item ✅ successfully on 1deb336


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

@Hackwar
Copy link
Member

Hackwar commented Feb 26, 2024

I have tested this item ✅ successfully on eb2b1c4


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

@Hackwar
Copy link
Member

Hackwar commented Feb 26, 2024

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Feb 26, 2024
@laoneo laoneo merged commit 76f6773 into joomla:4.4-dev Mar 4, 2024
3 of 4 checks passed
@laoneo
Copy link
Member

laoneo commented Mar 4, 2024

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Mar 4, 2024
@laoneo laoneo added this to the Joomla! 4.4.4 milestone Mar 4, 2024
@joomdonation joomdonation deleted the fix_page_cache_ignore_exclude_urls branch March 7, 2024 06:54
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.

None yet

6 participants