Daniel Dogeanu
Forum Replies Created
-
@taisa1984 Changing the logo is a solution for Yoast SEO because they were using the old way of reading exif data! They said it in their GitHub issues! They’ve updated the plugin since, and this might not be an issue anymore. But it is possible to be an issue for other plugins! You can see what’s the path that it gives you in the PHP errors, they tell you which plugin is causing the errors. If not, you can disable each plugin and see if you still have the errors.
I wasn’t explaining you what a SVG is, I was explaining you what causes the error. And besides, there’s other people reading this, and it might be useful for them, even if it’s not for you! π
@taisa1984 It’s not a problem with the SVG itself, it’s a problem with how WordPress reads images exif data. In recent WordPress updates they changed how they get that info, and this created a bunch of problems with how themes and plugins work. SVG is not an image format type, so they can’t extract exif data from it. If Query Monitor has the same problems, they probably rely on the old way of doing things, not related to SVG.
@travelmexicosolo @dev678 OK, so I’ve dug through their GitHub repo and I found the following issue that relates to this problem: https://github.com/Yoast/wordpress-seo/issues/16879
Apparently the problem is that the Yoast SEO plugin doesn’t support SVG images. If you go to
SEO -> Search Appearance -> Knowledge Graph & Schema.organd you have set an image that is SVG as the logo, you get these errors in the front end. If you set the logo to a .png or .jpg, the errors will go away!@dev678 You could do this, but I don’t know what would affect down the line:
if (is_array($attachment_meta)) { $data['url'] = $attachment_meta['url']; $data['width'] = $attachment_meta['width']; $data['height'] = $attachment_meta['height']; }But I would recommend you to just not update your plugin, and wait for the next version. I do the updates on the staging/development site first, and then if everything is ok, I proceed to do the same on the production site. For now I’ll wait for the next version. If they get enough complaints, they’ll have to fix it.
This is a problem with the plugin, not the hosting! The
$attachment_metaparameter from thegenerate_from_attachment_meta()function is supposed to be an array, and it receives a boolean instead. It says what’s the problem in the error message!They changed how image files metadata is handled in WordPress 5.7. I believe this has something to do with it: https://core.trac.ww.wp.xz.cn/ticket/52826
Please at least include an
ifstatement to check if$attachment_metais really an array before trying to use it!/** * Retrieve data about an image from the database and use it to generate a Schema object. * * @param string $schema_id The@idto use for the returned image. * @param array $attachment_meta The attachment metadata. * @param string $caption The caption string, if there is one. * * @return array Schema ImageObject array. */ public function generate_from_attachment_meta( $schema_id, $attachment_meta, $caption = '' ) { $data = $this->generate_object( $schema_id ); $data['url'] = $attachment_meta['url']; $data['contentUrl'] = $data['url']; $data['width'] = $attachment_meta['width']; $data['height'] = $attachment_meta['height']; if ( ! empty( $caption ) ) { $data['caption'] = $this->html->smart_strip_tags( $caption ); } return $data; }Forum: Fixing WordPress
In reply to: An error occurred in the upload. Please try again later. 4.0.1.@kb – Kellie Well, I changed these values in the php.ini for the PHP server:
max_execution_time = 90 max_input_time = 90 max_input_vars = 3000 memory_limit = 256MBut you can do that only if your hosting allows you. In my case they allowed me to fully control those values after I asked them to.
Forum: Fixing WordPress
In reply to: An error occurred in the upload. Please try again later. 4.0.1.@johnny_n Indeed that was the case. I solved it by increasing the PHP server resources. I thought that WordPress has some limitations, but it doesn’t. It was the hosting server.
Forum: Fixing WordPress
In reply to: An error occurred in the upload. Please try again later. 4.0.1.Uhm… I have the same problem with the images in WP 4.1.1. Maybe there should be something done in WordPress to support images with extreme resolutions. Some people (like myself) really need to upload high-resolution images. I mean 7000px tall, or 14000px tall, that sort of resolutions…
It seems to be some sort of bugs. I had my website in development and I had the option “Discourage search engines from indexing this site” ticked. When I decided to get my site indexed by Google, surprise, surprise, it told me that robots.txt was blocking the access to the site, even though I knew I unchecked the “Discourage search engines from indexing this site” option and I had the right robots.txt configuration. After that I clicked “Save Changes” several times, I’ve reset the configuration for XML Sitemaps and completely deleted robots.txt. It immediately worked afterwards.