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: Front-end form publisher_save_status not sticking

Status Resolved
Add-on / Version Publisher Lite 1.4.0
Severity Critical
EE Version 2.7.2

Ron Hickson

May 31, 2014

When using a channel form on the front-end I’ve included the three necessary inputs you mention…

<input type="hidden" name="lang_id" value="{publisher:current_language_id}" />
<input type="hidden" name="publisher_view_status" value="draft" />
<input type="hidden" name="publisher_save_status" value="draft" />

They are being saved with the published_status of ‘draft’ but when I look at all my entries on the front-end it shows as a publisher_status of ‘open’?  I’m using stash the grab a list of entries (though I only have one entry so it can’t be picking up another entry of mine…) but I tried outside of Stash and had the same result.  I’m guessing it’s something in my channel:entries call that I’ve missed.  Possibly this is where the {publisher:entry_status} should be used but I’m a little fuzzy on how that should implement?  Here is the stash block:

{exp:stash:set_list name="my-lessons" parse_tags="yes" limit="3"}
 {exp:channel:entries channel="lessons" author_id="CURRENT_USER" status="Draft|open" disable="pagination|category_fields" publisher_fields="y"}
  {stash:lesson_entry_id}{entry_id}{/stash:lesson_entry_id}
  {stash:lesson_title}{title}{/stash:lesson_title}
  {stash:lesson_url_title}{url_title}{/stash:lesson_url_title}
  {stash:lesson_status}{status}{/stash:lesson_status}
  {stash:lesson_published_status}{publisher_status}{/stash:lesson_published_status}
  {stash:lesson_track_views}{view_count_one}{/stash:lesson_track_views}
 {/exp:channel:entries}
{/exp:stash:set_list}
#1

BoldMinded (Brian)

Ron, do you have a status group assigned to your channel? Sounds simple, but I’ve seen this happen numerous times. If no status group is assigned it does not set the status correctly.

#2

Ron Hickson

I do have a status group assigned that has the default ‘Open’ and ‘Closed’ along with ‘Draft’. Doing a little more digging and in the DB the status IS set correctly. But retrieving it always seems to return the default of ‘open’?

Did a little code looking and it looks like in publisher_entry.php the add_publisher_fields_to_results method (Line 1314) is adding the default status and not the individual entry publisher_status? Just a guess…I could have missed something in looking through the codebase.

#3

BoldMinded (Brian)

So it’s not the saving, it’s the display of the entry after save that is the issue? That method is only called if you add the publisher_fields param to the entries tag I believe? Did you try it without that parameter?

#4

Ron Hickson

Yes it turns out that the display is the issue not the saving. I’ve tried it with the publisher_fields param (set to ‘y’) and got back ‘open’ as the publisher_status and without the publisher_fields param and got back the expected {publisher_status} unparsed tag. Here is a stripped template I’m using to get this (took out everything else).

{exp:channel:entries channel="lessons" status="Draft|open" publisher_fields="y"}
Entry: {entry_id}<br>
Pub Status: {publisher_status}<br>
{/exp:channel:entries}
#5

BoldMinded (Brian)

New build emailed with possible fix.

#6

Ron Hickson

Thanks. That had an effect but not the desired one :( I’m getting an unparsed {publisher_status} for every entry now. Using publisher_fields=”y” in the channel entries tag.

#7

BoldMinded (Brian)

You using the cache? This is the tag I’m testing with and the variable is parsed:

{exp:channel:entries channel="pages" publisher_fields="y" dynamic="no" publisher_cache="no"}
    publisher_status: {publisher_status}
{/exp:channel:entries}
#8

Ron Hickson

I wasn’t but added it and still no go? I stripped my template and tag down to this:

{exp:channel:entries channel="lessons" publisher_fields="y" dynamic="no" publisher_cache="no"}
Entry: {entry_id}<br>
Lang: {publisher_lang_id}

Publisher Status: {publisher_status}

{/exp:channel:entries}

Lang ID and status neither parse but I added the has_translation tag and it did parse. Strange. Let me know what you need a look at to help with this.

And other than this I’m loving Publisher 😊

#9

BoldMinded (Brian)

Resolved via email

Login to reply