Closed mc4rdle closed 1 year ago
I've tried clearing cache and stache but still it persists.
I'm going to need more information to work with. What's causing the error? I just tried to reproduce it on a fresh installation with aerni/advanced-seo
and statamic/ssg
. I can run ssg:generate
without an error.
Please create a fresh repo that reproduces the error so I can take a look at it.
Yea, the logs don't seem to give any clues. I tried to remove everything one by one until it worked. It turns out two collections were causing it (Blog and Webinars), and they both had two things in common:
Deleting every entry in both collections stopped the error. Removing the Taxonomy or disabling Enable Publish Dates from the collection alone doesn't stop it, but removing/disabling both on the collection at the same time does, which is strange.
Log File: log.txt
I was able to replicate it on a new site.
php please ssg:generate
and it will failThe collection's yaml file on my new fresh site:
title: Blog
template: blog/show
layout: layout
taxonomies:
- tags
revisions: false
route: '/blog/{slug}'
date: true
sort_dir: asc
date_behavior:
past: public
future: private
preview_targets:
-
label: Entry
url: '{permalink}'
refresh: true
I tracked this down, and it seems to be an issue with the statamic/ssg
package. Advanced SEO depends on the request()->path()
to determine if a collection's blueprint should be extended or not. This is where the ssg:generate
command fails. I'll open an issue on the repo and see where that goes. I might be able to fix the issue on my end with a nasty workaround. But I rather not.
This is the issue I opened for reference: https://github.com/statamic/ssg/issues/134
Thank you!
When I run php please ssg:generate I get this error:
As soon as I uninstall it, it generates fine.
My project: Environment Application Name: Keepme Laravel Version: 10.12.0 PHP Version: 8.1.17 Composer Version: 2.5.5 Environment: local Debug Mode: ENABLED URL: keepme.test Maintenance Mode: OFF
Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: CACHED
Drivers Broadcasting: log Cache: statamic Database: mysql Logs: stack / single Mail: smtp Queue: sync Session: file
Statamic Addons: 3 Antlers: runtime Stache Watcher: Enabled Static Caching: Disabled Version: 4.3.0 PRO
Statamic Addons aerni/advanced-seo: 2.1.1 statamic/ssg: 2.0.0 stefangalescu/statamic-heroicons: 2.1