Can't Add new File Template

Answered

Hi there,

for some time (few versions earlier) I haven't been able to add new file templates due to:

"'Template with name 'Groovy Server Page' already exists. Please specify a different template name"

I don't know how it get there but I have two Groovy Server Page templates and I can't change any of the names. The bar with field Name/Extension doesn't appear for any of the templates.

Whit that error I can't do nothing on this Editor config.

How can I fix this? It seems to be a bug.

1
6 comments

Please try to move/rename IDE folders to start with the defaults: https://intellij-support.jetbrains.com/hc/articles/206544519.

Does it resolve the issue?

Could be some corrupted setting or a plug-in installed.

1

Hi Serge, 

The second "Groovy Server Page" does disappeared but now the "add" template button is disabled.

0

Are you in the Files tab? Do you have a project open? Any errors in idea.log (https://intellij-support.jetbrains.com/hc/articles/207241085)?

0

Well,

I can't tell why but now I can add new template. I guess the Intellij Idea was indexing.

Thanks for the support.

0

I ran into the same issue with PhpStorm today and it seems that some file templates I had created manually several versions ago now conflict with built-in file templates because they share the same name. I guess that's a conflict which arises when importing settings from previous versions.

Also, the IDE wouldn't let me delete the duplicate template from within the GUI, seemingly because it confuses the manually created file template with the built-in one which of course cannot be deleted.

Deleting the offending file from the settings folder config/fileTemplates fixed it for me. However, I think that this could be considered a bug in the upgrade process. The upgrade procedure should probably handle this edge case, e.g. by automatically renaming custom file templates which conflict with built-in ones or whatever the developers consider appropriate.

1

In a similar case there was a plugin that caused the issue. By disabling plugins one-by-one I found and removed the culprit.

0

Please sign in to leave a comment.