-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
dashicons Icons Not Displaying at Site Editor and Post Editor of v6.3 #53528
Comments
Hi @delhee - thanks for the report. It would be good to help try and narrow down a potential cause of this by:
I also wanted to check - are you adding that code into an HTML block in the editor? |
@t-hamano, do I remember correctly that you fixed a similar issue recently? |
Hi @jordesign, thanks for the feedback. I was already using the unmodified twentytwentythree theme, when I took the abovementioned screenshots. As requested, I have disabled all other plugins except for Gutenberg. The symptoms are the same: dashicons icon does not show up in the site editor of v6.3 and is normal in the v6.2. The HTML code mentioned above was inserted via browser’s inspector tool. In case you need to know why I insert HTML through inspector tool, here is what is happening in my world. I’ve been developing a block type plugin that displays a search icon from dashicons collection. My work-in-progress plugin worked fine in the previous versions of site editors. But once the WordPress was upgraded to v6.3, the search icon disappeared from my site editor. I did some trouble shooting for a while and with the inspector tool, I put some random text in between the Since that you have brought it up, I tried to insert the same piece of HTML code mentioned in this ticket via the Custom HTML Block. The dashicons icon cannot display either. If I put a text in between the WordPress v6.2 site editor, with the following code inserted via inspector tool and via Custom HTML block:
WordPress v6.3 site editor, with the same code inserted via inspector tool and via Custom HTML block: WordPress v6.3 site editor, with the following code inserted via Custom HTML block:
Please let me know if you want any additional info. |
Thanks for pinging me. I have not worked on this issue, but I know that similar problems have been reported in the past:
In these issues, the results were dependent on the value of wp.blocks.registerBlockType( 'example/dashicon', {
apiVersion: 3,
title: 'dashicon',
edit: () => wp.element.createElement( wp.components.Dashicon, { icon: 'admin-site' } ),
save: () => null,
} ) The results were as follows:
The point is that regardless of the value of SCRIPT_DEBUG, if the editor is iframed, this problem is reproduced in the core. My guess is that it is because the Gutenberg plugin explicitly has gutenberg/lib/client-assets.php Line 296 in d5d8533
I can reproduce the problem by changing this argument to So, Is the fundamental solution to add dashicon to the dependencies of any of the handles on the core side as well? BTW, there is a #43725 that suggests deprecating the dashicon string in the Icon component. Therefore, regardless of when or if this issue is resolved, I recommend using the svg icons from the |
Ran into this issue while taking my theme more into the FSE direction and using API Version 3 on all of my custom blocks. I don't know what the underlying issue is but I was able to fix by enqueuing the
Edit: Possibly the Dashicons CSS file is not being enqueued into the block iframe wrapper? |
Seeing as this issue is still open, here are my comments.
|
Description
Dear WordPress Team,
First of all, really appreciate your efforts and contributions to make site building easier and more favorable. I have made myself a plugin developer. This time I am facing a problem regarding dashicons with the latest version of WordPress.
Here is the symptom. After upgrading WordPress to v6.3 at 18:16 (Asia Pacific Time) Aug 9th 2023, the dashicons icons I used at the site editor and post editor stopped displaying. But it does display in the front end and in anything of the previous versions. Later on, I have simulated the situation and realized that the dashicons.min.css style sheet is not loaded at the of the editor-canvas iframe (as shown in screenshots). When I loaded the dashicons css with inspector tool, the icon displayed again.
Please let me know, at your own convenience, if this a carefully thought-through decision or you will resolve it in your next release.
Thank you again for your work.
Step-by-step reproduction instructions
Expected Result:
Need to add a dashicons icon with the following code:
Actual Result:
The icon does not show up. Previous versions are normal. Front end is normal.
My Finding:
Once I loaded the dashicons.min.css into the
<head>
of editor-canvas<iframe>
, things are back to normal.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered: