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
And with the active MENU+ feature on GeneratePress plugin
I get this error at the top of my website.
Notice : Undefined index: width in
/home/cp04u/public_html/domain.com/wp-content/plugins/gp-premium/menu-plus/functions/generate-menu-plus.php
on line
2200
Notice : Undefined index: height in
/home/cp04u/public_html/domain.com/wp-content/plugins/gp-premium/menu-plus/functions/generate-menu-plus.php
on line
2201
I create SVG files using CorelDraw, after creating I export, and the files created by CorelDraw contain in their code the PX text right after the Height and Width dimensions.
And it seems that this causes the error, because after I edit the SVG file in notepad, removing the PX, the error disappears.
I contacted the developers, and they told me this:
And it expects the width and height of the attachment to be an integer. Which is standard for a img attachment.
If CorelDraw insists on adding px to those attributes then run the SVG through this optimizer: https://jakearchibald.github.io/svgomg/
That should remove them and clean up the SVG
Designs
No response
Describe alternatives you've considered
It would be much better if Safe SVG already made this correction, don’t you think?
Thanks.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Is your enhancement related to a problem? Please describe.
Hello.
First of all, congratulations on the great work done with your plugin and the support provided here.
See, I noticed an error on my test site, and after some research I found that it might be something to do with how the SVG file is exported.
First I’ll talk about the error:
When I activate these 3 options in the wp-config file:
And with the active MENU+ feature on GeneratePress plugin
I get this error at the top of my website.
Notice : Undefined index: width in
/home/cp04u/public_html/domain.com/wp-content/plugins/gp-premium/menu-plus/functions/generate-menu-plus.php
on line
2200
Notice : Undefined index: height in
/home/cp04u/public_html/domain.com/wp-content/plugins/gp-premium/menu-plus/functions/generate-menu-plus.php
on line
2201
I create SVG files using CorelDraw, after creating I export, and the files created by CorelDraw contain in their code the PX text right after the Height and Width dimensions.
And it seems that this causes the error, because after I edit the SVG file in notepad, removing the PX, the error disappears.
I contacted the developers, and they told me this:
Its actually the limitations in WordPress not supporting SVG by default.
GP uses core WordPress functions to handle the site logos.
One of those functions is
this: wp_get_attachment_metadata
https://developer.wordpress.org/reference/functions/wp_get_attachment_metadata/
And it expects the width and height of the attachment to be an integer. Which is standard for a img attachment.
If CorelDraw insists on adding px to those attributes then run the SVG through this optimizer:
https://jakearchibald.github.io/svgomg/
That should remove them and clean up the SVG
Designs
No response
Describe alternatives you've considered
It would be much better if Safe SVG already made this correction, don’t you think?
Thanks.
Code of Conduct
The text was updated successfully, but these errors were encountered: