The snippet is functional, I can use all the blocks that I need. BUT it is randomly inserting styles to my sitemap, which is causing an error in google search console
The sitemap that is randomly affected is this:
hidden link
Randomly the browser itself throws the following error:
Error de lectura XML: contenido incorrecto tras un elemento XML del documento
Ubicación: <em><u>hidden link</u></em>
Número de línea 1, columna 116:
<div class="tces-js-style-encoded" style="display:none;">LnRiLWhlYWRpbmcuaGFzLWJhY2tncm91bmR7cGFkZGluZzowfQ==</div><script class="tces-js-style-to-head">toolsetCommonEs.styleToHead()</script><?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//femininescorts.cl/main-sitemap.xsl"?>
-------------------------------------------------------------------------------------------------------------------^
By removing GeneratePress blocks I have reduced the number of times it generates an error but it randomly reappears
I really need a hand, I'm considering removing all the generatepress blocks on the whole site and removing that code snippet (I would have to rethink and redesign an essential part of the website)
I have noticed that I can disable the code snippet (I am using the "Code Snippets" plugin to insert code in functions.php) the templates are not affected (I imagine that if I edit them without the code snippet enabled I will lose the styles)
In any case, I would appreciate if someone with knowledge could review my case. I'm not even completely sure if the problem was the code snippet, maybe the problem comes back
Since styles are randomly inserted into the sitemap, I've created a test environment where the sitemap is more likely to fail (I've noticed that the sitemap is more likely to be corrupted by mixing GeneratePress blocks into a Toolset block, avoiding this is less likely but it still happens)
hidden link
If you click a couple of times in normal or incognito mode I'm pretty sure you'll be able to replicate the error
The sandbox also has less adult content to make it more comfortable to review in the work environment
First of all, I tried to check and reproduce the issue but I could not.
I can see sitemap is working as expected without any issue.
Further I found that your site is hosted on cloudflare so there is a great chance that there is a server or CDN cache and due to that you experience the issue.
Would you mind to try on another server without cloudflare and there is no CDN involve and check if that help you to resolver your issue.
Too bad the error didn't come out, sometimes it seemed really random
Today I have been able to replicate the error at will in an environment without a CDN, I am also excluding the sitemaps in the LiteSpeed plugin. Finally it was NOT the mix of blocks. On my home page I have a toolset view (it is the absolute center of the web page) when modifying the template the next reading of the sitemap will be corrupted with toolset styles
That is probably why I am the first person to report the problem, the first day it will generate an error but the following ones (if no further modification has been made to the template) will be correct. Also you have to go to the sitemap list in google search console to see the error, the main sitemap always looks fine (although corrupted sitemap links are not counted)
I think this can happen to everyone who uses toolset and rankmath together. In the immediate term, if I make changes to the main view template, I will make sure that the error is received by me and not by Google. Now I can take it more calmly, I don't have a special hurry or urgency
I can ask hostinger or rank math (I already asked rank math, they suggested I ask you first) do you have any idea why this is happening? why will the toolset styles be the ones that sneak in?
By the way, now I have prepared the following sitemap so that it generates an error (if you want to consult the normal sitemap, you just have to click on refresh)
hidden link
That is only the first click, if you need me to trigger the error again I have to modify the main view template again
When removing the CDN from the test environment, I failed the addresses (I have it linked to the domain itself, it would cost me a lot to disable it for testing)
But I've prepared a new test environment so you can see a corrupted sitemap:
hidden link
Please let me know if you don't see it, I can force the error again (I just have to modify the view template with random text). The error only appears on the first visit
I couldn't create a working sitemap in your test environment (requires additional settings for nginx server)
It is very strange that you could not see the error, I was able to visit it with my visit (maybe you clicked on the wrong sitemap) anyway I left it ready for the next visit it throws an error
hidden link
The truth is that I prefer to close the ticket by time, I am immediately satisfied with my sitemap. I'm taking screenshots anyway, I've also copied an example of a corrupted sitemap into a plain html file for you to analyze. The CSS class that is sneaked is called "tces-js-style-to-head" and the function that inserts the code is called "toolsetCommonEs.styleToHead()" is at the beginning of the sitemap
Here is a transcript of part of the sitemap (the toolset style is at the beginning) to give you an idea:
I will do something similar in Ran Math, I will document my case as best as possible so that it can be considered as a bug report. Luckily the style is inserted only on the first visit, so I'll just avoid modifying my main view block (or if I do I'll make sure I'm the first visit to the pages sitemap myself)