Damaged file template
At “Editor/ File and Code Templates”, I have a template for “HTTP Request” that I need to update. For some reason, the template appears twice (with same content) and I cannot apply changes to either copy, nor does the “-” icon gets enabled. I get the same error when I select “Revert to Original Template”. How can I clear this?
Please sign in to leave a comment.
Hi there,
Can you show what you have in the
IDE_CONFIG/options/file.template.settings.xml
file?There is a chance that it has the same entry listed twice…
I forgot to mention I'm using KDE Plasma on Ubuntu, and I installed the IDE through JetBrains Toolbox.
I've looked inside “~/.config/JetBrains/PhpStorm2024.1” and also project's “.idea” directory, and I couldn't find a file with that or a similar name.
I've searched for the template name ("HTTP Request") and I've found many references in global settings directory:
I was thinking it will be there. Similar to this ticket: https://youtrack.jetbrains.com/issue/WI-76942
Backup and try deleting the following files:
Do it while the IDE is closed, of course.
I backed up the entire directory, closed PhpStorm and deleted those files, and I could still see the duplicate templates.
So I copied the template content from the UI and wiped out all the files with “HTTP Request” on their name. After that, I only saw one (empty) template, which I was able to edit normally.
Thank you.
Edit: The files I removed starting with “AGV ” turned out to be Live Templates (luckily I always keep a hundred backup copies of everything). I've no idea of what got corrupted, maybe it had to do with settings sync, I don't know.
It's broken again!
I've restored yesterday's backup, done shortly after fixing the problem, and it's already broken there. I suspect that settings sync is bringing back the damaged templates. So I've disabled sync and deleted cloud data. I'm removing files again. I'll let you know how it works.
File templates were fine for several days, so I re-enabled settings sync. Now the HTTP Request template is damaged once again.
This is so frustrating. I'll just leave it the way it is and, when I need to edit the template in the future, I'll do the manual clean up and disable settings sync once and for all.
Hello,
This is a known issue with the Settings Sync and Templates that is filed here https://youtrack.jetbrains.com/issue/IJPL-148360. Please vote for it to be aware of further updates.