Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Invalid HTML in CheckPHPVersion admin_notice #260
The admin_notice for CheckPHPVersion returns invalid HTML:
This doesn't completely break anything as browsers will still render it to some degree. Visually the admin_notice is just huge (on Mac Chrome) when the markup is broken like this.
Not sure why it's broken. Probably the Finnish translation is somehow broken and it might be a good idea to break that string down to multiple strings and avoid " marks in translation files.
I've seen it on multiple production and local sites.
For example on setup:
Doesn't cause anything to PHP error log but the markup is similarly broken. If I change my language to English, markup won't break but with Finnish it does.
If you cannot reproduce the problem I can give you a few sites that affected via email.
Tried with exactly the same versions, still works fine:
So for the record, the affected sites seem to have mu-plugin Dynamic MO Loader (https://github.com/aucor/dynamic-mo-loader) in common that for whatever reason breaks this one string from .mo file. I have never seen dynamic-mo-loader do this kind of thing so I will look into it.
Dynamic MO Loader changes the native way that WordPress handles translations by caching them and getting them dynamically. The plugin has 16k downloads in packagist and has been mentioned by Otto in a past optimization presentation (https://www.slideshare.net/ottokekalainen/improving-wordpress-performance-with-xdebug-and-php-profiling)
I'll gladly take any help to track down the bug in Dynamic MO Loader but I understand that we are out of scope here. I'll use the .po/.mo from this plugin as reference and try to find the issue. Are you using the
There's been progress in this issue from our part. Firstly, yes, this is a bug in Dynamic MO Loader and not in Seravo Plugin.
Now, the reason why this bug exists is most strange. Basically Dynamic MO Loader checks if the string has 0 in it and if it has, the string will be concatenated to that point.
We are still testing this at the moment but will probably make a release soon that will fix this. I find it really strange that this bug has not been reported before.