Image error issue

Hi

Am now getting the following error on my pages
:mag:

Warning: Illegal string offset ‘width’ in /home/abstrac0/public_htm_commission/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images.php on line 222

Warning: Illegal string offset ‘height’ in /home/abstrac0/public_htm_commission/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images.php on line 222

Any idea why?

on shopping pages https://www.commissionit.co.uk/product/101-legendary-whiskies-book/

Hey Amin,

Please go to Appearance > Customize > WooCommerce and ensure you’ve set the Product Images settings. If you have not done so yet, please also update WooCommerce.

Warnings does not affect the functionality also and it’s recommended to turn them off in live sites. You can disable the error display while keeping a record of the them in an error log. You can see how in https://codex.wordpress.org/Debugging_in_WordPress. Specifically see the Example wp-config.php for Debugging.

If that does not help, please try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

As a last resort, please give us WordPress Admin and FTP access in a Secure Note.

Thanks.

Thanks, when you say :slight_smile:

ensure you’ve set the Product Images settings, it is showing main image width and thumbnail width. All my woocommerce plugins seem to be up-to date?

Have not added any new plugins recently that could have caused this?

Thanks

Hi @commissionworks,

Thanks for writing in!

Can you check your PHP version?
Also please check this version compatible list for any kind of compatibility issue.

As a last resort, please give us WordPress Admin and FTP access in a Secure Note.

Thanks

Could you let me have your email and i can set you up on admin, its not php, host has checked that. this is what the host says. “I checked the server logs but there are no error logs about this being a server issue. I tried with different PHP versions but that didn’t fix the issue so I just reinstated it. It seems that this issue needs the attention of a developer as I am not able to find errors on our end.” thanks

Perhaps email info@commissionit.com, i can then set you up?

Hi Amin,

We can’t provide support outside the forum, please provide necessary information in the secure note.

And if really needs an attention of a developer, it’s best to contact Woocommerce author as this warnings are coming from their plugin.

Thanks!

thanks provided info in the last post. appreciate you help

I’ve logged in to your site and could not find what’s causing the issue so we would need to test for a plugin conflict. Please do this. We cannot assume that no third party plugin is causing the issue but we need to prove moreover that this issue is unique to your setup.

If troubleshooting is not possible to be done in your live site, please copy your site over to a staging server and give us the staging’s WordPress Admin and FTP access. Here’s a guide: https://www.wpbeginner.com/wp-tutorials/how-to-create-staging-environment-for-a-wordpress-site/

Please also give us FTP access to your live site.

Thanks.

thanks we have a staging server http://112.196.9.211:8230/commissionit/product/babydoll-apron/ looks like there is a small search icon top left?

Perhaps this is the cause, as my developer is creating some bespoke search results code and it seems a more then a coincidence?

Hi, we reinstalled the x theme last week & my developer is saying it is due to that?

Thanks

Hi Amin,

It’s because of this setting in Admin > Appearance > Customizer > Woocommerce > Product Images and it’s set to zero. I went ahead and changed it to 960px.

Though, it’s still the same since it only changes the setting but not the actual image. So please install force regenerate thumbnails plugin and re-generate your images again (but make sure image optimization plugins are inactive while you’re doing that).

Thanks!

thanks, it was not 0 when i checked it a few hours ago, perhaps my developer who is trying to problem solve it change it. Is there a way to see any of my images to see if they are the incorrect size before trying force regenerate thumbnails. the plugin warns it has not been tested in the lastest version of wordpress

thanks

Regretfully, no. WooCommerce has image resizing function already since version 3.3. But, you still could try Rad’s suggestion if that would work. The Force Regenerate Thumbnails still work but if you’re hesitant, you could try Regenerate Thumbnails instead.

Regarding your developers comment that the theme re-installation caused this issue, that might be possible if you reinstalled manually or uploaded the theme’s files via FTP. Please try installing through Appearance > Themes.

Please just note that this is not the themes fault. Otherwise, we would get the same issue in our test sites and thousands of users’ sites.

I see that the image works in your staging site. What are the differences between your staging site and your live site?

Thanks.

thanks think the The Force Regenerate Thumbnails fixed it :slight_smile:

Glad to hear that. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.