Problem/Motivation
We are trying to purge only the home page so '/' and when we try that with the path option we get the error 'Exception while trying to invalidate the items: Path invalidations cannot start with slashes.'
Note that in CloudFront we can specific just '/' and that invalidates the home page correctly. Is there a way to do that with the module?
Entering "/" in the Purge Invalidation Form fails because purge core
rejects path expressions starting with a slash.
Steps to reproduce
Setup the module as per the documentation.
- Navigate to Configuration -> Development -> Performance
- Click 'Purge Invalidation Form'
- Select 'Type' of 'Path'
- Enter just / in the 'Item' textarea
- Click 'Purge'
- Confirm the error
Proposed resolution
Treat an empty
expression and the "" keyword as equivalent, both resolving to
the CloudFront invalidation path "/".
Remaining tasks
- Verify the bug and proposed solution.
- Add solution.
- Release new beta version
User interface changes
Potentially adding a new drop-down.
Issue fork cloudfront_purger-3530406
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dmundraUpdating title.
Comment #3
dmundraComment #6
kim.pepperComment #7
kim.pepperComment #8
kim.pepper@dmundra please test out the MR and let me know if it fixes the issue.
Comment #9
dmundraThank you @kim.pepper
Will try to review this soon.