We have not yet discovered what is causing the problem, although, luckily, we have already found a simple and quick way of fixing it.
In our case we have noticed it on each and every one of our websites since the publication and update of WordPress 3.9, although it does not have to be the one responsible and the problem may be caused by any of the plugins we use.
The error consists, to be exact, in the fact that both in the website feed and in the comments feed and in the rest of the feeds that WordPress generates, as well as in the XML files generated by some of our plugins for WordPress: sitemap-image.xml, sitemap-video.xml and/or sitemap-mobile.xml, as well as the sitemap_index.xml file generated by the Yoast SEO plugin, a great many lines of code appear which should never appear in an XML file. Specifically, JavaScript code appears, as well as unordered lists of links and comments from some of the active plugins we have installed in our WordPress installation.
We have already identified the problem, but how do we solve it?
The truth is that after having wrestled for quite a good while with the source code that generates our dynamic XML files and not finding any kind of error in it, we tried the usual tests to detect and solve errors, with all our attempts turning out to be completely unsuccessful, until we took it into our heads to make one last test.
We go to Appearance -> Themes and we activate a theme other than the one we usually use on our website, and we are not talking about using the parent theme of our child theme, but about activating any other kind of theme, and, oh surprise, as if by magic everything goes back to normal. Afterwards you only have to activate your usual parent or child theme again and you will see that everything works again just as it should always have done. In the event that you have some kind of caching system activated, do not forget to clear it after activating the transitional theme and the definitive theme, that way you will make 100% sure that all your feeds and XML files will work as they always did again.
If any of you have come across the same problem and have hit upon the exact cause or upon another way of solving it, we look forward to your comments, which will surely help many other users.
We hope that this small tutorial helps you not to waste a lot of time needlessly.
Related posts
Comments






Muchas gracias, funciono de primera.