-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sitemap not loading stylesheet on sub paths #88
Comments
What's the output of |
Besides that, it shouldn't be necessary specify |
There is no output, just a blank page. If I right-click, there is no context menu. In Dev Tools, the Elements section contains only From that, I tried |
It seems like the issue is that Chrome is trying to get the sitemap stylesheet from |
Can you try changing this line https://github.com/tobimori/kirby-seo/blob/main/classes/Sitemap/SitemapIndex.php#L44C1-L45C112 to $doc->appendChild($doc->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="' . App::instance()->site()->canonicalFor("sitemap.xsl") . '"')); ? |
No change. I updated line 45 in the file |
hm, that's weird some other things to consider:
|
Tobias, it will take me a little while to answer all those questions. I'll get back to you soon. |
Hi, Tobias. I haven't tried a fresh plainkit install but I can answer the other questions.
I get the same result in most other browsers. In Firefox Developer Edition, there is a different result, albeit not a successful one. If I go to It still seems to be looking in the root for the
Yes. I promoted the changes to my test site (brandsistency.dev/brandsistency), which is public-facing site but also in a subfolder, and the results were the same. brandsistency.dev/brandsistency/sitemap.xml is blank, or in Firefox Dev Ed gives a similar screen looking for the
No. I also promoted the updates to my live site (brandsistency.com), which is both public-facing and located at the domain root. Everything is working fine there. brandsistency.com/sitemap.xml looks as expected... So, as you thought, it's only an issue with subfolder sites. Not a massive deal as it's working in production, but it would be good to have it working in subfolder sites. That's so clients can be reassured that the sitemap is working when looking at a test site before going to production. 🙂 |
Thank you very much. It seems like it's indeed an issue with the stylesheet, so it should not prevent indexing by crawlers even on a subpath in production. If you open |
What's confusing for me is that you said even with changing the |
I didn't actually try hard-coding the URL in the test (.dev) environment – only in localhost. I'll try that later today. |
Tobias, I have tried hard-coding the stylesheet location in
I've cleared cache in the Panel and the browser and there is no change...
|
Have you cleared OP Cache? |
No, I haven't. The only way I'm aware of is to create a file called
...to upload that to the site root and then call it via the browser. I did that but Any other suggestions on how I can clear OPcache? |
Except for Kirby Pages cache and OPcache - no idea where else it should be cached. |
Tobias, I found out that the "opcache" extension wasn't enabled in my hosting account's PHP config. I have now enabled it but the Calling that file/script from any of my 'add-on' domains, such as brandsistency.dev, does still throw the error. But I am told by my host (Namecheap) that flushing from the account root should work for all domains in my account. Anyway, I have cleared Panel and browser cache again and tried accessing |
Hardcoding the path – not the full URL – works for me. |
I am also having the same problem. Could this be from the routes.php?
Should the Route be dynamic to the site?
|
Hi, Tobias. I've installed v1.0.0 but I'm still not getting a sitemap to generate. I've added the blueprint tabs and meta snippets, and I've set the Robots Directives for each page in the Panel.
/robots.txt
is working fine but there is nothing showing at/sitemap.xml
– it's a blank page with onlyxml-stylesheet
in the Dev Tools Elements.What am I missing?
This is what's in my
config.php
file...Thanks.
The text was updated successfully, but these errors were encountered: