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

MAJOR PROBLEM with use of static files in 2.7.0 #14188

Open
rainbowtiger opened this Issue Dec 7, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@rainbowtiger
Copy link

rainbowtiger commented Dec 7, 2018

Bug report

Summary

It's no longer possible to duplicate an existing template, snippet, etc. when these use static files. An error pops up saying there is already a template, snippet, etc. that uses the particular static file name.

Step to reproduce

Create a template that uses a static file. Then, open that template and click the "Duplicate" button. Nothing happens. No warning, nothing. Right-click on the template in the tree and select duplicate, and the usual popup appears, but the Static File field is outlined in red, and the error below says the file already exists. It's impossible to save the new template without changing the name of the file.

Expected behavior

I often create templates that share a common static file, because I use the template to control what TVs appear in the layout for different types of content. My base template is set up to be shared so that I don't end up with a slew of templates that all have the same code in them. The alert is fine, but it should be a warning and not prevent people from creating elements that share the same static file.

Furthermore, for things like snippets (where you wouldn't actually want them to share a common file), the Duplicate button should bring up the same popup with the option to specify a new file, instead of just doing nothing at all.

Environment

MODX 2.7.0.

@rainbowtiger rainbowtiger changed the title MAJOR PROBLEM with use of static files MAJOR PROBLEM with use of static files in 2.7.0 Dec 7, 2018

@JoshuaLuckers

This comment has been minimized.

Copy link
Collaborator

JoshuaLuckers commented Dec 7, 2018

Does it work when you create a new template that links to a static file that is already used by another template?

@JoshuaLuckers

This comment has been minimized.

Copy link
Collaborator

JoshuaLuckers commented Dec 7, 2018

This PR is related:
#14135

@rainbowtiger

This comment has been minimized.

Copy link

rainbowtiger commented Dec 7, 2018

Strangely, yes, I can create a new template and specify an existing static file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment