You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Statamic SSG v.3.1.0 seems to have a problem dealing with child pages when the cache is clear.
To demonstrate the problem, first install statamic with this starter kit.
statamic new ssgkidsbug efc/ssg-kids-bug
Then visit the site to see how it is laid out. This is a vanilla Statamic site with a bit of content added to the pages. That is all. Nothing else has been changed.
Notice that each page includes some info about it parent and parent's children (if it has a parent) and a list of its children (if it has children). You can look at the /resources/views/default.antlers.html to see how these lists are made.
To trigger the bug, you will have to php artisan cache:clear and then run php please ssg:generate.
When SSG generates a site from a clear cache, things go badly. Take a look at the pages in the generated static site. Notice that the "children" are always children of the root page, this is true of both the parent's children and the children of the current page.
Furthermore, if you immediately try to access the Laravel version of the site with a browser, you will find that every page returns a 404.
It appears that when SSG builds from a clear cache it both cannot corretly build navs and it leaves behind a cache that is poison to the Laravel site.
If you now clear the cache again with php artisan cache:clear, the Laravel site will recover. After browsing around a bit (to fill the cache?), if you build the static site without clearing the cache using php please ssg:generate, then it will build a static site without the errors. The Laravel site should also still be healthy.
Is something wrong with the way SSG deals with a clear cache?
The text was updated successfully, but these errors were encountered:
The Statamic SSG v.3.1.0 seems to have a problem dealing with child pages when the cache is clear.
To demonstrate the problem, first install statamic with this starter kit.
Then visit the site to see how it is laid out. This is a vanilla Statamic site with a bit of content added to the pages. That is all. Nothing else has been changed.
Notice that each page includes some info about it parent and parent's children (if it has a parent) and a list of its children (if it has children). You can look at the
/resources/views/default.antlers.html
to see how these lists are made.To trigger the bug, you will have to
php artisan cache:clear
and then runphp please ssg:generate
.When SSG generates a site from a clear cache, things go badly. Take a look at the pages in the generated static site. Notice that the "children" are always children of the root page, this is true of both the parent's children and the children of the current page.
Furthermore, if you immediately try to access the Laravel version of the site with a browser, you will find that every page returns a 404.
It appears that when SSG builds from a clear cache it both cannot corretly build navs and it leaves behind a cache that is poison to the Laravel site.
If you now clear the cache again with
php artisan cache:clear
, the Laravel site will recover. After browsing around a bit (to fill the cache?), if you build the static site without clearing the cache usingphp please ssg:generate
, then it will build a static site without the errors. The Laravel site should also still be healthy.Is something wrong with the way SSG deals with a clear cache?
The text was updated successfully, but these errors were encountered: