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

Renaming a snippet retains original snippet name/content and prevents deletion #708

Open
sirugh opened this issue Sep 18, 2024 · 0 comments

Comments

@sirugh
Copy link

sirugh commented Sep 18, 2024

I discovered what I think is a pretty bad bug. If you rename a snippet, you are unable to ever delete the original. It is possible I missed something, but this is what I am seeing. I was only able to work around this by upping the priority of the remaining snippets so that it never hits the original

This is the output of my generated VCL after:

  1. Creating a "backendroutesfetch" snippet with priority 30
  2. Renaming that snippet to "snippetfetch".
  3. Changing that snippet to priority 29
# Snippet magentomodule_snippetfetch : 29
if (!req.http.x-commerce) {
    unset beresp.http.Set-Cookie;
    return(deliver);
}

# Snippet magentomodule_backendroutesfetch : 30
if (!req.http.x-commerce) {
    unset beresp.http.Set-Cookie;
    return(deliver);
}

I am unable to delete the "backendroutesfetch" snippet (it doesn't exist in the Magento Admin UI).
I am unable to rename the snippet BACK to the original (it says it already exists)
I am unable to create a new snippet with the name "backendroutesfetch" (I get an error like "backendroutesfetch" already exists").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant