• Resolved chris2604slvstr

    (@chris2604slvstr)


    Hello support !

    On several pages I have the following error message :

    Warning: Illegal string offset ‘width’ in /homepages/33/d734329819/htdocs/clickandbuilds/cadeauxsympas/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images.php on line 222

    Warning: Illegal string offset ‘height’ in /homepages/33/d734329819/htdocs/clickandbuilds/cadeauxsympas/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images.php on line 222

    Here is the line of the file mentionned on the error message :

    $ratio_match = wp_image_matches_ratio( $image[1], $image[2], $imagedata[‘width’], $imagedata[‘height’] );

    Could you help me to resolve this error?

    Thanks in advance.

    Christophe

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor James Koster

    (@jameskoster)

    Hi there,

    Could you try resetting your image size settings in the Customizer? Navigate to WooCommerce > Product Images.

    If that doesn’t work we’ll need to rule out a theme or plugin conflict – please deactivate all plugins (except WooCommerce) and switch to a different theme like Storefront.

    James
    Designer @ Automattic

    Thread Starter chris2604slvstr

    (@chris2604slvstr)

    Hello support ! Thanks for this answer. I’ve tried to change the size for each product picture, I passed them in 1:1, and I have changed the Theme, the problem is still not fixed… Any other ideas ?

    RE: height and width measurements corrupted after WC 3.5.2update.

    I would like to be added to this conversation due to similar problems on our website.

    I’ve tried numerous solutions like deactivating all plugins, and uploading WC to a test domain i have and creating a dummy product. I was actually able to see that the wxh dimensions showed correctly on the test site.

    However on our real site… the dimensions continued to show 0.0 x 4’x7″.

    The next step I took was to deactivate the 3.5.2 WC plugin, rename it as old through FTP and then I found WC vs. 3.2 and uploaded it through FTP. Once activated all dimensions showed properly like… 3’6″x4’7″.

    So there is a conflict with WC 3.5.2 but I don’t know what to do now. Any suggestions to resolve my problem.

    Terryh1

    • This reply was modified 6 years, 3 months ago by Terry Hudfson.
    Thread Starter chris2604slvstr

    (@chris2604slvstr)

    I found a solution for the moment.

    You must upload another time the pictures used by Woocommerce to resolve the bug.
    I thought that the bug was generated after the fact that I changed the dimensions of the pictures.

    Well, now, my problem is solved, but Woocommerce must not generate trouble with pictures already uploaded on the website.

    (Message to the plugin builders) Try to upload a picture on website, change the pictures settings, from 1:1 to not cropped, and check the website. The bug appears with the error message mentioned on my first message.

    Thanks in advance to try to solve this

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @chris2604slvstr I tried the above and I was not able to replicate. I made sure that my settings had thumbnails set to 1:1, then uploaded a new image and added it as a featured image on a product. After this, I updated the image settings so that the thumbnails were set to “Uncropped”. I then viewed both the catalog view and the single product view and did not encounter any issues, nor were there any logs created anywhere concerning errors or warnings.

    Thread Starter chris2604slvstr

    (@chris2604slvstr)

    Hello Jesse,

    Thanks to have tried what I did when I had the trouble. From now, this bug is so far, I am not sure I will find the log of the error. I will let you know if I have another trouble looking like the one describe into this post.

    Maybe the trouble is due to my Avada theme… I don’t know.

    I’ll let you know,

    Thanks again

    Chris

    Same problem here, I’ve tried every possibility to fix. Change to Twenty Nineteen theme seems that worked and delete and reupoad the image also worked. It’s a very frustrating bug I needed to delete and reupload all my products images.

    For what it is worth, I had the same error in my PHP-log: ‘PHP Warning: Illegal string offset ‘width’ in \httpdocs\wp-content\plugins\woocommerce\includes\class-wc-regenerate-images.php on line 222′

    What fixed it for me was to regenerate the thumbnails. No need to re-upload the pictures.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘trouble with height and width in class-wc-regenerate-images.php’ is closed to new replies.