-
Notifications
You must be signed in to change notification settings - Fork 2
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
[warm-cache] sitemap.json error #102
Comments
Do you have the latest version of sitemap plugin installed? |
good question. I think so: v3.0.1 |
Is it possible to get the link to your actual sitemap json? |
Do you happen to have a custom sitemap.json.twig file in your theme or something? There’s not much to the one provided by sitemap plugin but your output is escaped strangely, so I’m not sure if it’s using the built in one. If you are not then perhaps it’s some twig setting you have made in your system config of Grav? |
No, I do not have a custom sitemap.json.twig in my templates/partials directory of my theme, so it is using the buil in one. The plugin has this inside it: I was disabling different plugins and it appears that if I disable the Feed plugin v1.8.0 ( https://github.com/getgrav/grav-plugin-feed ) the sitemap.json shows up fine. Could this be related to this: trilbymedia/grav-plugin-image-captions#17 I now see entries in the Logs of pages being warmed up. |
I'm a bit confused about how On my local I have the latest I also have I did just check your JSON again and it does look fine. Can you confirm that enabling feed is what's breaking it for you? |
I am not sure if it has anything to do with it (just there was an issue with a broken feed because of the image caption), so I just threw it out there for you if it would help. I confirm that when I enable the feed (I will leave it enabled now, you can find it under googleslidesthemes.com/.rss), it breaks the sitemap.json. In the log I get the following: /opt/bitnami/apps/preso/htdocs/user/plugins/warm-cache/warm-cache.php(173): Symfony\Component\HttpClient\Response\CurlResponse->toArray() /opt/bitnami/apps/preso/htdocs/user/plugins/warm-cache/warm-cache.php(75): Grav\Plugin\WarmCachePlugin::warmCache() /opt/bitnami/apps/preso/htdocs/vendor/symfony/event-dispatcher/EventDispatcher.php(264): Grav\Plugin\WarmCachePlugin->onAfterCacheClear(Object(RocketTheme\Toolbox\Event\Event), 'onAfterCacheCle...', Object(Symfony\Component\EventDispatcher\EventDispatcher)) /opt/bitnami/apps/preso/htdocs/vendor/symfony/event-dispatcher/EventDispatcher.php(239): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'onAfterCacheCle...', Object(RocketTheme\Toolbox\Event\Event)) /opt/bitnami/apps/preso/htdocs/vendor/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'onAfterCacheCle...', Object(RocketTheme\Toolbox\Event\Event)) /opt/bitnami/apps/preso/htdocs/system/src/Grav/Common/Grav.php(556): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(RocketTheme\Toolbox\Event\Event), 'onAfterCacheCle...') /opt/bitnami/apps/preso/htdocs/system/src/Grav/Common/Cache.php(535): Grav\Common\Grav->fireEvent('onAfterCacheCle...', Object(RocketTheme\Toolbox\Event\Event)) /opt/bitnami/apps/preso/htdocs/user/plugins/admin/classes/plugin/AdminController.php(632): Grav\Common\Cache::clearCache('invalidate') /opt/bitnami/apps/preso/htdocs/user/plugins/admin/classes/plugin/AdminBaseController.php(127): Grav\Plugin\Admin\AdminController->taskEnable() /opt/bitnami/apps/preso/htdocs/user/plugins/admin/admin.php(1005): Grav\Plugin\Admin\AdminBaseController->execute() |
In the feed plugin configuration can you disable JSON?
|
I've confirmed that's the issue, just looking for the best solution. |
Ok, i've released a 1.8.2 version of feed that ensures its only takes over .json requests when it's on a valid page with a valid collection. Seems it was hijacking any JSON request and sending it through the json feed template. JSON feeds are disabled by default which is why I had never noticed it before. JSON feed was broken in 1.7 too, so fixed that while I was at it. |
Great stuff. Thanks a lot of your help. I can confirm that disabling that option does fix the issue. |
After installing the plugin via admin, my admin console showed 404 error and it said something about sitemap.json.
I refreshed the page and everything was fine. Then I thought I'd test it, so I cleared the cache via CLI bin/grav cache and then I received the following error:
In ResponseTrait.php line 149:
Syntax error for "https://mydomain.com/sitemap.json".
I do have sitemap plugin enabled. Why does it throw this .json error if my sitemap is under sitemap.xml
if I got to mydomain.com/sitemap.json url - it says:
{"version":"https:\/\/jsonfeed.org\/version\/1","title":null,"home_page_url":"https:\/\/mydomain.com\/","feed_url":"https:\/\/mydomain.com\/sitemap.json","description":null,"author":{"name":"company"},"items":[]}
also, this is a bit of a side question, but how do I tell the plugin is working?
The text was updated successfully, but these errors were encountered: