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: Publisher Key not necessary to view draft when using Authorized Draft Previews

Status Resolved
Add-on / Version Publisher 1.5.4
Severity Trivial
EE Version 2.8.1

Gregory Maher

Nov 10, 2014

We have Authorized Draft Previews setup and Publisher is properly publishing a “publisher_key” variable in the URL. However, changing or removing that key does not block access of the Draft. I looked through the documentation and did not see an update on how this particular feature works. Are there template tags I must modify for this to work correctly?

Thanks in advance!

Greg

#1

BoldMinded (Brian)

Don’t need to change anything in your templates, it just looks at the URL you’re trying to render and compares it to the list of URLs saved in the db as preview-able or not. I’ll test locally and see if I can replicate it.

#2

BoldMinded (Brian)

Also, I assume you’re on the same domain, right? Check the exp_publisher_draft_previews table for the URL you’re trying to view and see if it exists.

select * from exp_publisher_draft_previews where url =’[url here]’;

#3

BoldMinded (Brian)

Also, is it an entry using a Structure page or a normal template/group/entry path?

#4

BoldMinded (Brian)

I can replicate it locally. Something must have changed recently on accident… I’ll look into it.

#5

BoldMinded (Brian)

Greg, are you trying to view the draft when logged in? If so then it will work for you without a key. Open the URL in an incognito window or a different browser and it should throw a 404.

#6

BoldMinded (Brian)

Can you reply on the site instead of email? Other people can search here, but they can’t search my email 😉 Thanks

It is working as expected for me when trying to view a preview url when not logged into the site. I have the setting set to throw a 404. Do you have your preview handling option set to 404 or Graceful? Did you check the table mentioned above to see if the url you’re trying to preview exists?

#7

Gregory Maher

I have the setting to throw a 404. The URL is in the table mentioned.

Can you try to change the publisher_key and see if the non-logged-in browser still shows the Draft? That’s what I’ve been doing, as well as removing it, and it’s still showing the Draft.

Greg

#8

BoldMinded (Brian)

This is what I’m seeing: https://dl.dropboxusercontent.com/u/983816/draft-previews.mov

#9

Gregory Maher

Well that is certainly what should be happening. I’m getting the same issue across all of my channels.

Should the URL in the table include the publisher_state and publisher_key variables?

ex: http://test.com/group/template/url_title?publisher_status=draft&publisher_key=tSowJeTq

#10

BoldMinded (Brian)

Yep https://www.evernote.com/shard/s9/sh/4c7d0f5d-12ad-468d-bec8-735be0040572/6d52ef56a7b84279a4c857d0e57ce412

#11

BoldMinded (Brian)

Greg, just following up. Is this still happening for you?

#12

Gregory Maher

Hi Brian, Thanks for the followup. Yes, we’re still experiencing the issue. I was going to email you today.

Could it have something to do with EE 2.8.1 as opposed to 2.9? Otherwise, I’m still having the same problem. Any key and no key at all allows the item to be viewed. Is there any change I have to make to my template?

Thanks again for checking in!

Greg

#13

BoldMinded (Brian)

Off hand I’m not sure what would have changed between 2.8 and 2.9 to cause such issues. Is it possible for you to upgrade in dev environment to see if upgrading fixes it?

#14

Gregory Maher

Absolutely. I was planning on doing that before reaching back out. Let me try and I’ll report back. Sound good?

Thanks!

Greg

#15

Gregory Maher

Hi Brian, We just updated to Publisher 1.5.9 and EE 2.9.2 and we’re still running into the same issue in that any draft can be viewed on the front-end with simply the “publisher_status=draft” parameter in the URL. And, if the “publisher_key=1RLoAK6Z” parameter is included, any key works.

Do you have any other recommendations on how/where I can look for a fix?

If I can send you anything further to help troubleshoot, that’d be great.

Thanks!

Greg

#16

BoldMinded (Brian)

Have you tried replicating this in a clean EE environment with just Publisher installed?

#17

Gregory Maher

Clean, as in no other Add-Ons for this site? Or clean, as in only EE and Publisher? I have not tried either just yet but want to be sure of what you’re suggesting I do.

Thanks!

gm

#18

BoldMinded (Brian)

Clean as in only EE and Publisher.

#19

Gregory Maher

Hi Brian, I went ahead and did this and I’m having the same issue. It’s setup locally using MAMP (PHP 5.5.18). I can send you the entire setup if that’s helpful. But, it’s the same issue in that in a non-logged-in browser I’m able to modify the publisher_key as well as remove it entirely and still see the Draft entry.

Any thoughts?

Thanks!

Greg

#20

BoldMinded (Brian)

Can you put that build (including the db) up on Dropbox to share it? You can email me the link.

#21

BoldMinded (Brian)

Should be fixed in new build sent. Going to go ahead and close this.

Login to reply