Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

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: Entry loop show unpublished (draft) versions

Status Resolved
Add-on / Version Publisher Lite 2.4.1
Severity
EE Version 3.5.3

Harold Kuiper

May 11, 2017

Description:
I’ve got an index page with a couple of entries from the same channel.
On the index page the Publisher Draft versions are showing but without a link (page_url).
When I publish an entry and make a change and save is as Draft it works fine.
On the detail page Publisher works fine with Draft and Open


Detailed steps to reproduce the issue:
1. Create new Entry (Publisher state is draft Member is Editor)
2. Create Entry Publish it and Edit and save as Draft
3.Basic entry loop   {exp:channel:entries channel="movies" limit="5" status="{publisher:entry_status}” dynamic=“no” publisher_fields=“publisher:”}
  {/exp:channel:entries}
4. toggle Publisher state

When I download the latest Publisher Lite version is states 2.4.2 but in the CP it shows up as 2.4.1
And may be relevant that I also getting an error about Catagories
Channel::category_subtree($cdata, $active_cat)
user/addons/publisher/legacy/libraries/Publisher_channel_categories.php, line 0 show details


Hope to hear from you,
Martijn

#1

BoldMinded (Brian)

Martijn, can you replicate the issue on demo.boldminded.com?

#2

BoldMinded (Brian)

Feel free to add channels, entries, fields or templates to replicate it.

#3

Harold Kuiper

Hi Brian,

I’ve added a card. (I named it “Draft not Published”) It’s in Draft but shows up in the results. http://demo.boldminded.com/en/cards/all/P8 (note that the unpublished card has no link) Created own template and here it shows up. http://demo.boldminded.com/en/tl (note that is has no link)

This one is published and has a new draft (works fine) http://demo.boldminded.com/en/cards/view/force-of-will?publisher_status=draft&publisher_key=5mEyKcgN

This one only has a draft (isn’t showing) http://demo.boldminded.com/en/cards/view/draft-not-published?publisher_status=draft&publisher_key=5mEyKcgN

You probably need to replace the key

Admin permissions are limited in your demo but this is pretty clear I think.

Please let me know if you have any questions or anything else.

Cheers, Martijn

#4

BoldMinded (Brian)

Thanks for taking the time to do that. I’ll try to take a look at it this weekend and hopefully have a fix next week.

#5

BoldMinded (Brian)

On line 352 of ext.publisher.php add this line:

$this->requestCache->set(‘isNewEntry’, true);

https://www.dropbox.com/s/q9g307jtoqxy0lh/Screenshot 2017-05-12 08.27.21.png?dl=0

This should fix the saving and display of a single entry draft. There is still some oddness when paginating a list of open entries that has a draft in the middle of it though.

#6

Harold Kuiper

I’ve added $this->requestCache->set(‘isNewEntry’, true); Status Draft is now added to the native status options. It stays in Draft (native status) if I publish the entry.

Any luck on your end? I hope so. We’re about to deliver a working site but currently de Workflow doesn’t do what it’s supposed to do.

Please let me know.

#7

BoldMinded (Brian)

Any luck on my end? Yeah, adding that line fixes the issue.

The pagination issues own’t be addressed for some time. Its been that way for years apparently and has not been an issue for anyone until now. I’m hesitant to refactor that area of code b/c it works otherwise.

#8

Harold Kuiper

Adding that line of code puts the entry in status Draft (always). As in native status. So when aproving a draft it still doesn’t show on the site cause native status is draft. I’ve tested this on our site and on your demo. Both with the same results. Besides I thought Publisher doesn’t interfere with EE status.

What’s the use of a draft with approval options if draft entries show up in entry loops with or without pagination? Or am I missing something and is there a simple way of excluding publisher drafts from entry loops?

#9

BoldMinded (Brian)

Sorry, I think that line should be:

$this->requestCache->set(‘isNewEntry’, $channelEntry->isNew());

It doesn’t interfere with statuses, but it has to use the statuses for creating a draft. The old Better Workflow module was an example of something that interfered with the statuses, e.g. you couldn’t use custom statuses very well with it b/c it completely hi-jacked the status menu. Publisher just adds a Draft status and uses it when appropriate.

#10

Harold Kuiper

Ah alright. I’ll try it tomorrow and let you know.

#11

Harold Kuiper

Hi Brian,

I’ve changed that line but when I publish an Article it remains in Draft. I can change the native Status to Open and then it works. But this isn’t how it should work right? I’ve also tried on your Demo but I don’t have the rights to publish.

#12

BoldMinded (Brian)

Comment has been marked private.

#13

Harold Kuiper

Comment has been marked private.

#14

BoldMinded (Brian)

Comment has been marked private.

#15

Harold Kuiper

Comment has been marked private.

#16

Harold Kuiper

Comment has been marked private.

#17

Harold Kuiper

Comment has been marked private.

#18

BoldMinded (Brian)

Comment has been marked private.

Login to reply