Codeinwp / optimole-wp

30 stars 8 forks source link

Fatal Error with "Image Box" Widget Using Optimole DAM in Elementor #828

Closed kushh23 closed 4 days ago

kushh23 commented 1 week ago

Description

Users encounter a fatal error when adding the "Image Box" widget on a page with both Elementor and Optimole plugins activated. This issue appears in the latest versions of both Elementor and Optimole. The Fatal error also affects the site's functionality.

One important detail that we can't overlook is that I was able to reproduce this error only when I selected the image for the image box widget from the Optimole DAM menu. Normal images from your site storage don't cause this issue.

Step-by-step reproduction instructions

  1. Install and activate the latest version of Elementor.
  2. Install and activate the latest version of Optimole.
  3. Create a new page in WordPress with Elementor.
  4. Add the "Image Box" widget to the page and select the image from Optimole DAM.
  5. Save the changes and attempt to view the page, you will experience some layout shifts, or unable to save the page.
  6. Check the error logs.

Screenshots, screen recording, code snippet or Help Scout ticket

HelpScout - https://secure.helpscout.net/conversation/2696170832/432434/

image

PHP Fatal error: Uncaught TypeError: Illegal offset type in isset or empty in /s3-elatedbirth/wordpress/wp-content/plugins/optimole-wp/inc/dam.php:631

Fatal error (with full Stack) - https://pastebin.com/VhWU4ayS

Environment info

https://pastebin.com/2NJjGH7A

Is the issue you are reporting a regression

No

kushh23 commented 1 week ago

P.S- I didn't tag this issue as a regression because I am able to reproduce it with the previous version as well.

girishpanchal30 commented 1 week ago

@kushh23 I've reviewed this issue and fixed it here - https://github.com/Codeinwp/optimole-wp/pull/829

kushh23 commented 1 week ago

@girishpanchal30 I have tested the PR, and it fixes the mentioned fatal error.

Thank you!

pirate-bot commented 4 days ago

:tada: This issue has been resolved in version 3.13.7 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: