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

I can't save a template #211

Open
RicarKS opened this issue Feb 8, 2022 · 7 comments
Open

I can't save a template #211

RicarKS opened this issue Feb 8, 2022 · 7 comments
Assignees

Comments

@RicarKS
Copy link

RicarKS commented Feb 8, 2022

I can create a new template in the settings as shown in the picture,
image
but when I finish editing this file and save (ctrl+s)
image
image
if I open the settings again, the file disappears,
image
and when I click apply or ok in the settings , this file will be deleted
idea64_shfiz4ugw1

Here are the steps for all operations
idea64_YScka4Xai5
My native language is not English. I translated the above sentence with the help of Google Translate. If there is any inconsistency, please forgive me

@RicarKS
Copy link
Author

RicarKS commented Feb 8, 2022

My IntelliJ version is 2021.3 build #IU-213.5744.223

@xylo
Copy link
Owner

xylo commented Aug 31, 2022

Thanks for the bug report and sorry for my late reply.
There is definitely something wrong with the plugin in your case. When you go into the settings of Cutstom Postfix Templates you should never see an empty list of templates. It should look like this:
grafik

It seems that in your case the plugin fails already in the initialization (loading of the templates). Normally when the first project is loaded the plugin loads all the templates and tries to update the web template. But since you do not even see the nodes "Java", "Scala", ... in the templates tree after opening the plugin settings, I guess that this procedure fails in your case.

Does the same error occur in IDEA 2022.2.1?

@wolray
Copy link

wolray commented Sep 5, 2022

Yes, it occurs in IDEA 2022.2.1 (Community Edition) (Windows 10, x64).
1662397039680

@xylo
Copy link
Owner

xylo commented Sep 5, 2022

Good question. So the file user.postfixTemplates could be created by the plugin? Then it's not a file permission problem.

So my first guess is that the plugin fails to download https://raw.githubusercontent.com/xylo/intellij-postfix-templates/master/templates/webTemplateFiles.yaml or some of the web template files.

I guess I have to add some try catch blocks and some error messages to identify the cause of the problem.

@wolray
Copy link

wolray commented Sep 6, 2022

The file was created by the plugin, and deleted by it after re-open the settings panel (which is empty like fresh new).
It might be something wrong like you mentioned, and some deleting process in a catch/finally block worked, I guess.

@xylo
Copy link
Owner

xylo commented Sep 7, 2022

I managed to reproduce the bug today by disallowing IDEA to connect to the internet. I was in a network environment that required a proxy configuration but I disabled this config in IDEA (I choose no proxy). So any connection failed. This is how I got the same result as in your pictures above.

So I guess you IDEA version does not have an internet connection. Is this right? Either this or IDEA's requests to https://row.githubusercontent.com/... is blocked.

@xylo xylo self-assigned this Sep 8, 2022
@xlj44400
Copy link

I just update 2021.2.2 -> 2022.2.2 , had the same problem

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

4 participants