Skip to content

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

@sirugh

Description

@sirugh

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").

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions