If an URL contains encodable characters, Acquia Purge only purges the non-encoded version. It needs to purge the encoded version as well.
Steps:
Given a site where content creators have permission to use the Purge this page button.
There might be a rule which refreshes the first page of the viw
As administrator:
1. Create a view that has a comma in the URL, e.g., a contextual view specifying two taxonomy terms.
2. Create a rule than purges the first page of the view
{ "rules_clear_projects_list" : {
"LABEL" : "Clear projects list",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"TAGS" : [ "caching" ],
"REQUIRES" : [ "rules", "acquia_purge", "workbench_moderation" ],
"ON" : { "workbench_moderation_after_moderation_transition" : [] },
"IF" : [
{ "node_is_of_type" : {
"node" : [ "node" ],
"type" : { "value" : {
"project" : "project",
"project_fusion_map" : "project_fusion_map",
"project_update" : "project_update"
}
}
}
}
],
"DO" : [
{ "expire_rules_action_flush_url" : { "urls" : "projects-planning \r\nprojects-planning\/project-list\/3441,3421\/all\r\nprojects-planning\/project-list\/3408,3421\/all \r\nprojects-planning\/project-list\/3581,3421\/all \r\nprojects-planning\/project-list\/12,3421\/all \r\nprojects-planning\/project-list\/3491,3421\/all \r\nprojects-planning\/project-list\/3407,3421\/all \r\nprojects-planning\/project-list\/16,3421\/all \r\nprojects-planning\/project-list\/11,3421\/all \r\nprojects-planning\/project-list\/10,3421\/all \r\nprojects-planning\/project-list\/13,3421\/all " } }
]
}
}
As anonymous user:
2. Visit that page over http such that it is served through Varnish:
- with a comma in the URL, e.g., /projects-planning/project-list/3441,3421/all
- with the comma encoded, e.g., /projects-planning/project-list/3441%2C3421/all
As content creator:
3. Add content which is subject to being shown on the contextual view.
4. Publish the node
As anonymous user
5. Refresh both versions of the page
Actual result: Only the comma version displays the new content.
Expected result: Both the comma and encoded versions display the new content.
As content creator:
6. Go to the encoded-url version and click Purge this page
As anonymous user
7. Refresh both versions of the page
Actual result: Only the comma version displays the new content.
Expected result: Both the comma and encoded versions display the new content.
Partial workaround: Change the rule to explicitly purge the encoded URLs in the view. However, that does not solve the issue in step 6.
Workaround rule:
{ "rules_clear_projects_list" : {
"LABEL" : "Clear projects list",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"TAGS" : [ "caching" ],
"REQUIRES" : [ "rules", "acquia_purge", "workbench_moderation" ],
"ON" : { "workbench_moderation_after_moderation_transition" : [] },
"IF" : [
{ "node_is_of_type" : {
"node" : [ "node" ],
"type" : { "value" : {
"project" : "project",
"project_fusion_map" : "project_fusion_map",
"project_update" : "project_update"
}
}
}
}
],
"DO" : [
{ "expire_rules_action_flush_url" : { "urls" : "projects-planning \r\nprojects-planning\/project-list\/3441,3421\/all\r\nprojects-planning\/project-list\/3408,3421\/all \r\nprojects-planning\/project-list\/3581,3421\/all \r\nprojects-planning\/project-list\/12,3421\/all \r\nprojects-planning\/project-list\/3491,3421\/all \r\nprojects-planning\/project-list\/3407,3421\/all \r\nprojects-planning\/project-list\/16,3421\/all \r\nprojects-planning\/project-list\/11,3421\/all \r\nprojects-planning\/project-list\/10,3421\/all \r\nprojects-planning\/project-list\/13,3421\/all \r\nprojects-planning\/project-list\/3441%2C3421\/all\r\nprojects-planning\/project-list\/3408%2C3421\/all \r\nprojects-planning\/project-list\/3581%2C3421\/all \r\nprojects-planning\/project-list\/12%2C3421\/all \r\nprojects-planning\/project-list\/3491%2C3421\/all \r\nprojects-planning\/project-list\/3407%2C3421\/all \r\nprojects-planning\/project-list\/16%2C3421\/all \r\nprojects-planning\/project-list\/11%2C3421\/all \r\nprojects-planning\/project-list\/10%2C3421\/all \r\nprojects-planning\/project-list\/13%2C3421\/all " } }
]
}
}
Closed: outdated
1.1
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.