Closed (fixed)
Project:
CKEditor Bootstrap Glyphicon
Version:
8.x-1.2
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Dec 2017 at 02:28 UTC
Updated:
12 Feb 2019 at 13:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
marjina-constantin commentedThis issue happens because the library with css is not attached to page. It works for admin because he has the permissions to edit content and use the text format that has CKEditor and glyphicons button, in other words, the css is loaded when CKEditor is present on page. The code that is responsible for loading css for admin is "getCssFiles" method from "Glyphicons.php" file, and not hook_library_info_alter from the module file. This hook can be entirely removed because $libraries['glyphicons'] is never set as it's not attached to page. Instead, we can use hook_page_attachments to attach that css. Because we don't really know where we can have content rendered from a wysiwyg field, I would say that the css can be attached to all pages, even admin ones (for example view preview).
Patch attached.
Comment #3
marjina-constantin commentedComment #4
anprok commentedTested on Drupal 8.6.7 clean install
with glyphicons 8.x-1.x-dev and library glyphicons 2.2
Icon displayed fine for anonymous user and administrator without any errors or warnings.
Without patch applied I have problem with missing icon for anonymous user.
Comment #5
anprok commentedComment #6
ddrozdik commentedThanks. Merged.
Comment #8
ddrozdik commented