Download the PHP package goldinteractive/craft-publisher without Composer
On this page you can find all versions of the php package goldinteractive/craft-publisher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download goldinteractive/craft-publisher
More information about goldinteractive/craft-publisher
Files in goldinteractive/craft-publisher
Package craft-publisher
Short Description Publisher X enables you to publish saved Drafts on a future date without the need to handle the cache expiration logic. The cronjob handles the publication and the cache invalidation.
License MIT
Informations about the package craft-publisher
Publisher X
Publisher X enables you to publish saved Drafts on a future date. The cron job handles the publication, and cache invalidation is managed through Craft CMS's native element save events.
It also handles entries that are set to expire or go live in the future, and will trigger cache invalidation through Craft's standard element lifecycle events.
Requirements
- Craft CMS 5.0+
- PHP 8.2+
Installation
Then install the plugin in the Craft control panel under Settings → Plugins.
Permissions
To publish a draft, the user needs the Save entries permission on the entry's section.
Setup
Create a cron job that runs every minute. You can invoke Publisher X via CLI or HTTP:
CLI (recommended):
Web:
Usage with cache plugins
If you use a full-page cache plugin such as Blitz, make sure you also run the queue and refresh expired caches:
Events
EVENT_AFTER_PUBLISH_ENTRY
Fired by the Entries service after each successful scheduled publication. Use it to trigger server-side cache purges or any other side-effect tied to publication.
The event is only fired when publication succeeds. If the scheduled entry or draft cannot be found (e.g. the entry was deleted), the orphaned record is cleaned up and the event is not fired.