You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installing via composer through wpackagist.org, there im getting an error.
Notice: Function register_block_script_handle was called incorrectly. The asset file (/var/www/[PROJECTNAME]/web/app/plugins/safe-svg/includes/blocks/safe-svg/../../../dist/safe-svg-block.asset.php) for the "editorScript" defined in "safe-svg/svg-icon" block definition is missing. Please see [Debugging in WordPress](https://wordpress.org/documentation/article/debugging-in-wordpress/) for more information. (This message was added in version 5.5.0.) in /var/www/expedite/web/wp/wp-includes/functions.php on line 5905
Upon checking the file structure, it looks like the directory dist is missing. I also checked the gitignore file and it looks like the plugin is ignoring the dist directory.
Also experiencing this issue. Since this appears to be related to the block editor, I tried to just remove the block registration, but there doesn't seem to be a good way to do that because of the way it's hooked in...
Any chance we could just get a getInstance() function so that we can dequeue this if we don't need the block? Something like this would then allow us to dequeue it...
Curious on your setup for installing this via composer? I just tried a fairly basic composer.json (pasted below) and it did install things correctly, including the dist directory, when I ran composer install:
I honestly don't remember what I did, sorry. I just tried this again, and it seems to be working just fine, even when I require it directly (i.e. require "vendor/darylldoyle/safe-svg/safe-svg.php";). No idea what was causing the error before, but I'll report back if I find it again.
Quick side note – I'd love this as a library instead of a WordPress plugin; I develop bespoke WordPress themes for clients, and with our workflow, sometimes it's more preferential to require plugins like this within our theme rather than having them installed directly.
Describe the bug
When installing via composer through wpackagist.org, there im getting an error.
Notice: Function register_block_script_handle was called incorrectly. The asset file (/var/www/[PROJECTNAME]/web/app/plugins/safe-svg/includes/blocks/safe-svg/../../../dist/safe-svg-block.asset.php) for the "editorScript" defined in "safe-svg/svg-icon" block definition is missing. Please see [Debugging in WordPress](https://wordpress.org/documentation/article/debugging-in-wordpress/) for more information. (This message was added in version 5.5.0.) in /var/www/expedite/web/wp/wp-includes/functions.php on line 5905
Upon checking the file structure, it looks like the directory
dist
is missing. I also checked the gitignore file and it looks like the plugin is ignoring thedist
directory.Steps to Reproduce
install safe-svg via composer.
https://wpackagist.org/search?q=safe-svg&type=any&search=
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: