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: How/Where to approve draft entries?

Status Resolved
Add-on / Version Publisher 2.6.3
Severity
EE Version 3.4.2

Eric Harth

Sep 12, 2017

Description:
We installed your Publisher 2 add-on and struggling to get it working.

While the editor functionality is pretty self explanatory, we couldn’t manage to get the publisher functionality working for us.

Detailed steps to reproduce the issue:
1. We created a publisher user and assigned it to a group meant for publishers
2. Marked the publishers group to be of publisher-role type in addon’s ‘Approval Settings’ page.
3. To avoid conflicting behaviour we have explicitly defined a different group to be of editor-role.

Our issue is that the publisher user sees the exact same view as the editor user and we’r unsure where would a publisher view and approve entries submitted for approval by editor. There’s no approve button on the entry, or the likes of it.

Even as a super-admin, I can view draft entries in ‘Pending Approvals’ page, but there’s no options to ‘Approve’ them. Are we missing something obvious here?

We have already read through the online FAQ as well as the included docs but couldn’t find a how-to for this.

#1

BoldMinded (Brian)

Hi, Eric. To approve a draft you just save it as Published.

#2

BoldMinded (Brian)

There may be some improvements I can make to the UI, which would probably just involve changing the text of the Save button to Approve so its a little more clear. Its just a very simple approval process… if a draft exists that an editor needs to go live, saving it as published makes it live, and thus approving the draft.

#3

Eric Harth

Hello Brian

Thanks for a quick reply.

Our problem is that the ‘Save As (Draft)’ button is disabled even when we are logged in as a user with publishing privileges. Inspecting the element we can see in-source that a drop-down menu does exist, but the button element itself is disabled.

Thanks

#4

BoldMinded (Brian)

Sounds odd. I was just testing this morning and those drop downs worked fine for me. Here are my settings. Do they look similar to yours?

https://www.dropbox.com/s/qe1o8jirdsdlf6a/Screenshot 2017-09-13 19.03.25.png?dl=0 https://www.dropbox.com/s/ph636oxvf0a88wf/Screenshot 2017-09-13 19.04.31.png?dl=0

#5

Eric Harth

Hi Brian

Between both settings pages, the only 2 differences I could spot are: 1: I had ‘Default save status’ set to ‘Draft’. I’ve tried changing that but no luck. 2: The order of ‘Draft status color’ option in your view is #4 whereas in my view it’s at #2 order from top. I believe that’s because you are may not be using Publisher version 2.6.3.

Apart from that, all my settings are essentially the same as the screenshots above.

#6

Eric Harth

I dug a little deeper and seems within the Toolbar service,

$this->roleManager->isCurrentRolePublisher()

is returning false for all users.

#7

Eric Harth

It seems the following line of code, in the boot() function within the Session service isn’t getting executed. (Broken hook maybe?)

$this->request->setUserData(ee()->session->userdata);

The the userdata never gets set; when RoleManager service compared current role with response from getToles() function, it doesn;t find a match for null and then defaults to assuming editor role.

#8

Eric Harth

Ok, so I found that boot function was being called via core_book hook that was introduced in 3.5 and i’m running 3.4.2 so global vars never get initialised.

I’ll upgrade my instance and let you know how it goes.

#9

BoldMinded (Brian)

Look above that line… Did you click the Update function in the module page?

#10

BoldMinded (Brian)

Ah, yeah. Publisher requires 3.5+ now. If I would have paid attention to the ticket details I would have seen you were running 3.4 and suggested an upgrade and gotten to the bottom of the issue sooner 😊

#11

BoldMinded (Brian)

FWIW though I did add some logic to change the save button text to “Approve Draft & Close” based on your original question.

#12

Eric Harth

That’s great work Brian. Upgrading to 3.5 solved my problem.

Cheers!

Login to reply