Comments (6)
@dkotter I think it's because of this line of code:
safe-svg/includes/optimizer.php
Line 43 in f8f90d4
The JS need gutenberg, so, technically, this need to be updated from admin_enqueue_scripts
to enqueue_block_editor_assets
?
from safe-svg.
@turtlepod That makes sense to me but I've been unable to reproduce this.
That JS file is only loaded if the optimizer feature is enabled (do this by returning true
in the safe_svg_optimizer_enabled
filter). I've set this up and I see the file loading but I'm not getting any errors in the console when testing in the Classic Editor. Are there other steps I need to take?
from safe-svg.
And I guess one other thing in thinking through this more, I believe this was set up to fire not only in the editor but when media is directly uploaded, so I think loading the script on enqueue_block_editor_assets
would break that functionality
from safe-svg.
@dkotter I tested and I can reproduce. Yes, this issue is only if we use the safe_svg_optimizer_enabled filter.
Apparently the issue is probably a conflict with Yoast SEO. Can you confirm this and simply enable Yoast to check?
Thanks
from safe-svg.
@turtlepod Thanks for the additional information. I had originally tested with Yoast but couldn't reproduce the issue. Turns out I had another plugin installed that was loading the proper dependencies which fixed the issue. I've opened #187 to address this, if you have time to test that and ensure it fixes things for you.
from safe-svg.
@dkotter I tested and the fix is working as expected! Thank you!
from safe-svg.
Related Issues (20)
- When svg optimization is turned on, a javascript error can occur that breaks saving content HOT 1
- Clean up NPM dependencies and update node to v20
- The plugin hasn't been tested with an upcoming version of WordPress
- SVGs have a 10mb size Limit
- Release version 2.2.3
- Fatal Error in Version 2.2.3, Calling member function attributes() on a Bool HOT 4
- Release version 2.2.4
- Block Inline CSS gets always loaded HOT 5
- Allow the `current_user_can_upload_svg` method to be filtered HOT 3
- PHP 8.3 Compatibility HOT 4
- SafeSVG fatal error
- Fatal error in safe-svg/includes/blocks.php:51 when accessing the Wordpress Customizer HOT 2
- Incompability with e-payeye-payments
- SVG dimensions broken after 2.2.3 HOT 2
- The plugin hasn't been tested with an upcoming version of WordPress HOT 1
- Release version 2.2.5
- PHP 8.3 compatibility HOT 3
- No RDF metadata HOT 3
- Cypress dependency in runtime dependencies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from safe-svg.