The Praison SEO plugin:
https://wordpress.org/plugins/seo-wordpress/
clears the buffer, removing the </html> tag for which we check here:
https://github.com/wp-media/wp-rocket/blob/a37e46f58259e38dbf895061536551763f8aace7/inc/classes/Buffer/class-optimization.php#L85
That halts the file optimization process.
Related ticket: https://secure.helpscout.net/conversation/1083555846/146173?folderId=2135277#thread-3085260169 (edited)
To Reproduce
Steps to reproduce the behavior:
Reproduce the issue :white_check_mark:
I was able to reproduce this issue
Identify the root cause :white_check_mark:
This plugin is misusing output buffering, emptying the buffer too early and preventing any of our optimization from being applied.
It's doing that to rewrite the <title> tag, when they could use https://developer.wordpress.org/reference/hooks/wp_title/ instead.
Scope a solution :white_check_mark:
Honestly this doesn't feel like something that we should be trying to fix on our end:
1) They could be doing their rewrite the correct way
2) With their current code, we can't do much. At best we can add it to our incompatibility notice
@arunbasillal @GeekPress thoughts?
Estimate the effort โ
I agree with @Tabrisrp that we shouldn't be trying to fix this at our end. Fixing it on the plugin's end could help other developers too.
@webtrainingwheels Is it possible to contact the plugin author and point them to this issue please?
@arunbasillal I have contacted the developer here: https://secure.helpscout.net/conversation/1132078195/156734?folderId=377610
I never got a response from the developer, so, time for a Plan B?
I never got a response from the developer, so, time for a Plan B?
I suppose we don't have other solution than a Plan B.
@webtrainingwheels @arunbasillal @wp-media/wprocketplugin The discussion if open for any ideas / suggestions
My 2 cents..... For these kinds of issues (not cached/not optimized), I would check if the problem occurs with Fastest Cache (as an example of a free competitor).
If no, we should see if we can fix on our side. (user expectation is that a premium plugin should have fewer conflicts and behave at least as well, if not better than a free one)
If FC also has an issue, we can assume the problem is totally on the 3rd party's side and we can use a notice or whatever method we agree on for alerting the customer (site health etc).
+1000 for @webtrainingwheels
@webtrainingwheels @GeekPress Since there isn't much we can do here, shall we close this issue/ I have added this to our Known Conflicts doc. When we decide on how to alert the user about these things, we can add everything from that doc.
The plugin only has 7000 active install right now to bother with anything too dramatic right now.
@arunbasillal The problem here is the common problem we have with all other plugins which has the same issue.
We must fix this problem if we can for the reasons I explained here:
https://github.com/wp-media/wp-rocket/issues/2651#issuecomment-632323968