Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: XML sitemaps outputting spanish page_url in other languages
Status | Resolved |
Add-on / Version | Publisher 3.10 |
Severity | |
EE Version | 7.3.11 |
Juan Carlos Celaya Dibout
Sep 04, 2023Hi,
i noticed xml sitemap its outputting the spanish url value for en and pt-pt, only adding /en/ or /pt-pt/ but not taking the english or portuguese url title (or structure title).
Example:
Edit Entry: PrestaShop alto rendimiento | ExpressionEngine (factoriadigital.com) , if you check url title/Structure title for english is high-performance-prestashop
But in sitemap it appears like this:
instead of
I tried to empty EE cache and rocket cache, even if it seems to be excluded from both but who knows, same result.
This is the code btw:
{exp:publisher:languages}
{exp:structure:entries orderby="edit_date" sort="desc" channel="homepage|pages" publisher_lang_id="{id}” publisher_status=“open” publisher_cache=“yes”}
{if ! ('{page_url}’ *= ‘/landing/’)}
{/if}
{/exp:structure:entries}
{/exp:publisher:languages}
Don’t know if that’s structure or publisher related, and if using your sitemap plugin would solve this issue.
Regards,
BoldMinded (Brian)
Sep 05, 2023
I’m on vacation now so my responses are slow. Are you rendering a single Sitemap with all the languages in it? If so I’d recommend a separate Sitemap for each language, or don’t use the structure tag. The structure URLs are created on page load for the current language, it can’t jump back and forth to list out URLs for different languages on the same page. The same thing would happen with the Pages module… it’s just how the site_pages array works.
Juan Carlos Celaya Dibout
Sep 09, 2023
Comment has been marked private.
BoldMinded (Brian)
Sep 09, 2023
Just create a Sitemap.xml file and if using language prefixed URLs it should load correctly. E.g /en/Sitemap.xml, /es/sitemap.xml, etc. I think you can tell Google about the different URLs directly through their web tools.
Juan Carlos Celaya Dibout
Sep 11, 2023
Hi, it seems there is some weird issue, don’t know if with cache or what, but the sitemaps that have language slugs reply with wrong http headers:
Incorrect http header content-type: “text/html; charset=UTF-8” (expected: “application/xml”)
you can replicate that here: https://www.xml-sitemaps.com/validate-xml-sitemap.html
with this sitemap:
https://www.factoriadigital.com/pt-pt/xml-sitemap (error)
or this one:
https://www.factoriadigital.com/en/xml-sitemap (error)
but then:
https://www.factoriadigital.com/xml-sitemap (fine)
it seems deleting cache make it work for a second but then nope.
BoldMinded (Brian)
Sep 11, 2023
Are you using the Sitemap module or just Publisher?
Juan Carlos Celaya Dibout
Sep 11, 2023
only publisher, should i use the sitemap module?
BoldMinded (Brian)
Sep 11, 2023
Publisher doesn’t set headers like that… I don’t think this is a Publisher issue. I think there is something else going on with your templates.
BoldMinded (Brian)
Sep 13, 2023
I did a little testing with the Sitemap module and Publisher, and it appears to work with Publisher pretty well out of the box. I added a hint on the docs page about it. https://docs.boldminded.com/sitemap/docs/configuration-and-usage - You can download a free trial and give it a shot if you want.
BoldMinded (Brian)
Sep 13, 2023
Comment has been marked private.
BoldMinded (Brian)
Sep 13, 2023
Comment has been marked private.