EE compatibility updates:

  • Publisher is EE5 compatible, but it does not currently support the Fluid field.

ExpressionEngine.com licenses:

  • If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Publisher can’t preview drafts with future dates

Status Resolved
Add-on / Version Publisher Lite 3.1.5
Severity
EE Version 5.3.2

James Brown

Aug 04, 2020

I’m having issues trying to preview drafts when the entry date is in the future. If I create a new entry, leave the date at default (which is the current date) and preview, there’s no issues. But if the date is in the future, then all I get is a 404 page in the preview. Is there a way to preview entries with future dates?

I’m sure if I put show_future_entries=“yes” on the entries tag it would probably work. The problem is I would only want that for drafts, not for live entries.

#1

BoldMinded (Brian)

Aug 04, 2020

In Service/Frontend.php, line 109 or so, add this line:

$this->config->_global_vars['publisher:is_draft'] = $this->request->getCurrentStatus() === Status::DRAFT;

Then in your template you can do

{exp:channel:entries {if publisher:is_draft}show_future_entries="yes"{/if}}
#2

James Brown

Aug 04, 2020

Success!!! Thanks.

#3

BoldMinded (Brian)

Aug 04, 2020

Sweet! I added that variable to Publisher so it’ll be in the next release.

Login to reply

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.