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

Query string version of the homepage is not cleared with rocket_clean_home #3444

Closed
4 tasks
piotrbak opened this issue Dec 24, 2020 · 2 comments · Fixed by #6234
Closed
4 tasks

Query string version of the homepage is not cleared with rocket_clean_home #3444

piotrbak opened this issue Dec 24, 2020 · 2 comments · Fixed by #6234
Assignees
Labels
effort: [XS] < 1 day of estimated development time module: cache priority: low Issues that can wait severity: major Feature is not working as expected and no work around available type: bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@piotrbak
Copy link
Contributor

Before submitting an issue please check that you’ve completed the following steps:

  • Made sure you’re on the latest version
  • Used the search feature to ensure that the bug hasn’t been reported before

Describe the bug
When rocket_clean_home is triggered, the cache of the query string is not removed.

To Reproduce
Steps to reproduce the behavior:

  1. Add a query string to cache in the settings
  2. Cache the homepage with query string domain.com/?test=123
  3. Make sure that it's cached on the SFTP
  4. Update any post to trigger the rocket_clean_home
  5. Confirm on SFTP that the homepage is cleared but the #test=123 is not

Expected behavior
We should clear also the query strings versions, including the cache and ignored query strings. Probably just looking for directories starting with # in the root cache directory and passing them to rrmdir will be fine.

Backlog Grooming (for WP Media dev team use only)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort
@arunbasillal arunbasillal added module: cache needs: grooming priority: low Issues that can wait type: bug Indicates an unexpected problem or unintended behavior labels Dec 28, 2020
@piotrbak piotrbak added the severity: major Feature is not working as expected and no work around available label Feb 5, 2021
@piotrbak
Copy link
Contributor Author

Seems to be the same ones:
#2983

@CrochetFeve0251
Copy link
Contributor

CrochetFeve0251 commented Jun 17, 2022

Reproduce the issue

I was able to reproduce the issue.

Root of the problem

We are not checking for folders starting with the # character when clearing the cache inside rocket_clean_home.

Scope a solution

We need to add a check for # starting folders in rocket_clean_home and delete them if they exist.
For that we can add this code to the rocket_clean_home method:

$param_dirs = glob( $root . '/#*'  );

	if ( $param_dirs ) {
		foreach ( $param_dirs as $dir ) {
			rocket_rrmdir( $dir );
		}
	}

Estimate effort

XS

@CrochetFeve0251 CrochetFeve0251 self-assigned this Jun 17, 2022
@CrochetFeve0251 CrochetFeve0251 added GROOMING IN PROGRESS Use this label when the issue is currently being groomed. effort: [XS] < 1 day of estimated development time and removed needs: grooming GROOMING IN PROGRESS Use this label when the issue is currently being groomed. labels Jun 17, 2022
@piotrbak piotrbak added this to the 3.15.4 milestone Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: [XS] < 1 day of estimated development time module: cache priority: low Issues that can wait severity: major Feature is not working as expected and no work around available type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
4 participants