Silverstripe Version: 5.2
Question:
I’ve followed the instructions for Static Publisher as per silverstripe-staticpublishqueue/docs/en/basic_configuration.md at 6 · silverstripe/silverstripe-staticpublishqueue · GitHub but simply cannot get my data object to trigger any page to publish.
I have the following set up:
use SilverStripe\ORM\DataObject;
class Event extends DataObject {
...
}
use Page;
use SilverStripe\StaticPublishQueue\Contract\StaticPublishingTrigger;
class Trip extends Event implements StaticPublishingTrigger {
public function objectsToUpdate($context) {
return Page::get()->First(); // return 1 or an array of multiple publishable objects you would like to regenerate the static cache for
}
public function objectsToDelete($context) {
return 1; // Return 1 or an array of publishable objects for which you would like to purge the statically cached variant
}
}
plus the following in extensions.yml:
App\Web\Trip:
extensions:
- SilverStripe\StaticPublishQueue\Extension\Engine\SiteTreePublishingEngine
Any ideas on what I’m missing would be most welcome!