-
Notifications
You must be signed in to change notification settings - Fork 9
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.xml throws error #20
Comments
Do you use a plugin to generate the sitemap? If so, which one? |
@lukasbestle ah, yes indeed. |
Thanks for the link. The plugin uses the Kirby page cache, but with a custom data format that is incompatible with page responses that are cached by Kirby: Kirby stores an array with a The compatibility issue can be solved in either the kirby-meta plugin or in Staticache. However the most robust solution would be one in kirby-meta as it will also be compatible with the core page cache and other caching plugins. Pinging @fabianmichael. |
@lukasbestle I’d be happy to update my plugin, but hit a roadblock. The StatiCache class assumes that the response to generate the file from is a regular page, which can be found by calling https://github.com/getkirby/staticache/blob/main/src/StatiCache.php#L106-L107 |
@fabianmichael You are right, this is something that can only be fixed in Staticache. What we could do is to automatically fall back to |
@lukasbestle Sounds like a start. I don’t understand the whole things that goes on internally when Kirby renders, caches and serves a page. But as far as I understand, this would do the trick. As soon as staticache is updated, I will update my plugin. |
Any ETA on this? Would be great if both plugins could be used together. |
@jonasfeige Sorry for the delay. I can't give you an ETA for an official fix, but you could temporarily replace this line with the following: - $url = $page->url($key['language']);
+ $url = $page?->url($key['language']) ?? Url::to($key['id']); |
@fabianmichael i just added a possible solution here: fabianmichael/kirby-meta#39 |
I’ve updated my plugin to always use its own cache. That way, the sitemap cannot be served static, but the CMS does not crash any longer (see dd6bdecc5c65237b11f505ddc37179099b0f4a15). As soon as someone confirms me that it works on their setup, I’ll create a new release of the meta plugin. |
hey again 🐰
since i installed the plugin my sitemap is not available anymore. any ideas what’s happening here?
The text was updated successfully, but these errors were encountered: