Yoast / wordpress-seo

Yoast SEO for WordPress
https://yoast.com/wordpress/plugins/seo/
Other
1.75k stars 886 forks source link

Yoast SEO breaks Responsive Lightbox & Gallery plugin #17417

Open Radzio1615 opened 2 years ago

Radzio1615 commented 2 years ago

Please give us a description of what happened.

When Yoast SEO (free version) is active, the gallery doesn’t work properly on a single gallery page. The problem only appears on the gallery pages. If we copy the gallery's shortcode and put the shortcode in a regular page / post, the gallery will work fine.

Please describe what you expected to happen and why.

I expect galleries to start working properly.

How can we reproduce this behavior?

  1. Install and activate Responsive Lightbox & Gallery (by dFactory)
  2. Go to Lightbox > Builder and check "Enable gallery archives."
  3. Go to Settings > Permalinks and save permalinks
  4. Go to Gallery > Add New and select gallery images form media library
  5. Switch tab to "Config" and change gallery type to Basic Slider or Basic Masonry to better see the problem
  6. Publish gallery and view gallery in the frontend
  7. Deactivate Yoast SEO and refresh single gallery page to see that if Yoast SEO is active, the gallery is not working properly

yoast

Technical info

Used versions

Djennez commented 2 years ago

I am able to reproduce the issue. However, I am hesitant to say that Yoast is the origin of the problem. The Responsive Lightbox & Gallery plugin calls WP_Scripts::localize in the wrong way, with and without Yoast installed. This results in several notices on the requested pages. It may be that Yoast causes the wrong behavior due to these errors.

"WP_Scripts::localize was called <strong>incorrectly</strong>. The <code>$l10n</code> parameter must be an array. To pass arbitrary data to scripts, use the <code>wp_add_inline_script()</code> function instead. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 5.7.0.)"
ameliasellsmaine commented 1 year ago

Hi There, I'm also having issues when both Yoast SEO (free version) is active and so is the "Responsive Lightbox & Gallery" plugin. It completely shuts down my website and I get a page that says: "There has been a critical error on this website. Please check your site admin email inbox for instructions."

Please help! https://beta.gatewayfunnelpros.com/

Technical info WordPress version: 6.1.1 Yoast SEO version: 19.13 Responsive Lightbox & Gallery version: 2.4.3 Tested with theme: Twenty Twenty-Two