Jump to content

CKEditor hidpi icons reset on each update


Go to solution Solved by stoo2000,

Recommended Posts

I'm running into an issue where every time I complete an upgrade, the hidpi icons in the CKEditor reset to their default images. 

The strange thing about it is that if I open the CKEditor on my site (replying to a post for example) and I use the browser's inspector to see where each button in the editor is getting its icon, it show me that all icons are still coming from the normal location:

root/applications/interface/ckeditor/ckeditor/plugins/icons_hidpi.png

But when I open Filezilla and navigate to that location, and open that file, I see my custom version of the icons_hidpi.png file that I uploaded. Not the one that is actually showing up on the site. So the image that the HTML itself says its loading for the CKEditors icons, does not appear to correspond to the image that's actually being shown.

In my custom version of the icons_hidpi.png file, the icons are white because I have a dark themed site.
In the default version of the icons_hidpi.png file, the icons are dark grey and blend in horribly to the background, so they're almost invisible.

Does anyone have any idea what's going on with that, and how to fix it?


(This also presents a problem in the admin cp, which now forces me to use the same theme/editor as the front end, and also forces me to use a white editor. I literally can not see any of the freakin CKEditor buttons on my admin cp, when it IS working properly. So there's that too. I feel like dark themes are popular enough that this should be addressed as well.)
 

Edited by Aramaech
Link to comment
Share on other sites

Sorry, I meant:
root/applications/core/interface/ckeditor/ckeditor/plugins/icons_hidpi.png

The full link, with queries being
root/applications/core/interface/ckeditor/ckeditor/plugins/icons_hidpi.png?t=M12E

Not sure if the variable t indicates a time, or a template, or something cached, or stored elsewhere that isn't the actual file, or what.

Link to comment
Share on other sites

  • Solution
16 minutes ago, Aramaech said:

Sorry, I meant:
root/applications/core/interface/ckeditor/ckeditor/plugins/icons_hidpi.png

The full link, with queries being
root/applications/core/interface/ckeditor/ckeditor/plugins/icons_hidpi.png?t=M12E

Not sure if the variable t indicates a time, or a template, or something cached, or stored elsewhere that isn't the actual file, or what.

That's a cachebust that changes each time CKEditor is built (with each Invision Community release). It makes your web browser load the image from the server again instead of using a local cache.

You shouldn't however be changing any core files, whether they're JS or PHP. The right way to do this would be to make your own CKEditor theme/skin (it could be based on one of the ones shipped) but then have your customised image within that skin so it doesn't get overwritten every time you update.

Link to comment
Share on other sites

I didn't change any JS or PHP core files, I simply replaced a PNG file with an almost identical PNG file. As stated. That being said, I did try that approach of building a custom editor skin about 3 years ago, and I can't remember what issue I ran into that caused me to stop using my custom skin, but if that method will get me around this problem, I will certainly go back to it.

Thanks for the help.

Edited by Aramaech
Link to comment
Share on other sites

4 minutes ago, Aramaech said:

I didn't change any JS or PHP core files, I simply replaced a PNG file with an almost identical PNG file. As stated. That being said, I did try that approach of building a custom editor skin about 3 years ago, and I can't remember what issue I ran into that caused me to stop using my custom skin, but if that method will get me around this problem, I will certainly go back to it.

Thanks for the help.

Replacing the image file in the core software would net the same result which @stoo2000 mentioned here. Each time files get upload for an upgrade, it would see them as different and overwrite them so you would lose any changes you've done. 

Link to comment
Share on other sites

15 minutes ago, Jim M said:

Replacing the image file in the core software would net the same result which @stoo2000 mentioned here. Each time files get upload for an upgrade, it would see them as different and overwrite them so you would lose any changes you've done. 

Yes, he explained clearly why the issue is happening.
I was pointing that out because altering a core JS or PHP file has VERY different implications from replacing a PNG file with an almost identical PNG file of the same name. The distinction between the two should not be obfuscated for other readers, in my opinion. It's common enough to see people ramp up their position just to increase the force of their point, but doing it in that particular way, on that particular point was a misstep in my opinion. So I clarified. And am now clarifying further lol

This still, however (and maybe I should make a new thread for this) leaves the issue where if I make a custom skin, which has white icons, those icons will still (as far as I understand this) be used in the admin cp theme which forces a white editor.

EDIT: As it turns out I still am using my custom skin from about 3 years ago, so it seems like the custom skin fix will not solve the admin cp editor issue.



 

Edited by Aramaech
Link to comment
Share on other sites

@Jim M The comment you marked as a solution, is not a solution.

As I said, I am currently, and have been for 3 years, using a custom editor skin that I made that has the correct icons, and I'm still experiencing the problem. Furthermore, the comment you marked does not address the admin cp issue from the original comment either.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...