arnowelzel / lightbox-photoswipe

Integration of PhotoSwipe to WordPress
https://arnowelzel.de/wp/en/projects/wordpress/lightbox-with-photoswipe
GNU General Public License v2.0
27 stars 7 forks source link

Conflict with Yoast SEO #10

Closed lucspe closed 4 years ago

lucspe commented 4 years ago

Hi @arnowelzel ,

I have recently updated Lightbox-Photoswipe to latest version and also Yoast SEO to 12.4.

There seems to be a conflict between the two plugins that prevents Lightbox-Photoswipe to work correctly.

As soon as I deactivate Yoast SEO, your plugin starts working again.

Thanks Luca

arnowelzel commented 4 years ago

Do you use the free version? Because I can only try to verify issues in the free version. I don't use Yoast SEO and I hope you understand, that I don't want to pay EUR 79 just to be able to verify issues with the paid version.

Edit: ok, as some other guy already reported at WordPress, this also happens with the free version and the problem seems to be the priority of the output filter in my plugin.

lucspe commented 4 years ago

Hi @arnowelzel ,

Yes, it is the free version of Yoast available on the WP repository.

In the meantime, I have stumbled across the same post you mention and I can confirm that also in my case changing the priority of the output filter solves the issue.

arnowelzel commented 4 years ago

The problem is a bit more complicated. Changing the priority to 0 is not correct, since then other plugins will have a problem. The real problem seems to be that Yoast SEO uses ob_end_flush() which flushes the output buffer. However - when this is done before my plugin had a chance to use the buffer then my plugin will not work at all.

arnowelzel commented 4 years ago

It turned out to be a problem of Yoast SEO and not my plugin.

Also see here: https://wordpress.org/support/topic/problem-with-yoast-seo-6/#post-12136552