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: PHP errors when saving a draft

Status Resolved
Add-on / Version Publisher
Severity Trivial
EE Version 24

MDP Test

Mar 07, 2013

Hi again, Brian.  I just uninstalled publisher 0.97.6 and installed 0.98.1.
In the same install, I currently have BW Required Category, Channel Images, Low Variables, Low Reorder, NavEE, SafeHarbor, Stash, Wygwam, Zoo Flexible Admin and 2 extra MSM sites.
On trying to publish an entry as draft in any channel, I get the following PHP errors:

A PHP Error was encountered
Severity: Notice
Message: Undefined index: uris
Filename: helpers/Publisher_helper_url.php
Line Number: 275
A PHP Error was encountered
Severity: Warning
Message: array_search() expects parameter 2 to be array, null given
Filename: helpers/Publisher_helper_url.php
Line Number: 294
A PHP Error was encountered
Severity: Warning
Message: array_search() expects parameter 2 to be array, null given
Filename: helpers/Publisher_helper_url.php
Line Number: 300
A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 0
Filename: models/publisher_template.php
Line Number: 703
#1

BoldMinded (Brian)

Do you have Structure or Pages installed?

#2

MDP Test

No, neither. Never bought Structure. I think Pages comes with the default install, but its status is currently “uninstalled”. I’m pretty sure I never installed it since the last EE reinstall either.

#3

BoldMinded (Brian)

That might be the problem, I don’t think that code should be running if you’re not using Structure. I’m under a deadline at work right now so I can’t dive into this at the moment, but maybe later tonight.

#4

MDP Test

Thanks Brian. No sweat, this is a test install, that’s why I’ve marked it as Trivial.

#5

BoldMinded (Brian)

Do you see this error after saving as a draft and loading the draft preview? Can you take a screenshot of the full page with this error so I know where its happening?

#6

BoldMinded (Brian)

Try changing line 275 of Publisher_helper_url.php to this

if ( ! empty($site_pages[$this->EE->publisher_lib->site_id]['uris']))
#7

MDP Test

Hi Brian, 1. The error is shown immediately upon clicking “Save as draft”. I believe the draft preview is loaded. I have taken screenshots but don’t see anywhere in this interface to upload them - do I need to open a new ticket? 2. I edited Publisher_helper_url.php and changed line 273

from
if ( ! empty($site_pages))
to
if ( ! empty($site_pages[$this->EE->publisher_lib->site_id]['uris']))

. The result is that now I get only the following error on clicking “Save as draft”:

A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 0
Filename: models/publisher_template.php
Line Number: 703
#8

BoldMinded (Brian)

You can attach screenshots when you click the Edit Ticket button at the top.

#9

BoldMinded (Brian)

Sent you a new build, should resolve it

#10

BoldMinded (Brian)

Closing this b/c I’m pretty sure the build I sent fixes it. If you still have issues just open a new ticket please, thanks!

Login to reply