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: 1.0.13 issues after upgrade

Status Resolved
Add-on / Version Publisher Lite 1.0.13
Severity Critical
EE Version 2.6.1

Nick Lane

Oct 21, 2013

Hi,

I’ve attempted an upgrade on our site this evening, but ran into a few issues. After replacing files and running “run module updates” from the addons -> modules page, we’re unable to now add a new page from our pages chanenel. Using our base install with no existing entries, I attempted to add a first page and upon hitting publish or save as draft, I receive the following errors:

A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 1
Filename: models/publisher_site_pages.php
Line Number: 538

Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /system/codeigniter/system/core/Exceptions.php:170)
Filename: libraries/Functions.php
Line Number: 809

Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /system/codeigniter/system/core/Exceptions.php:170)
Filename: libraries/Functions.php
Line Number: 414

I then attempted the same process, using a backup SQL import from the live server (with many existing pages), this yielded an additional issue. Along with the errors above, it also seems to have created a conflict with the Better Pages add-on used with the following message displaying on the edit page above the CP menu navigation:

A PHP Error was encountered
Severity: Warning
Message: array_key_exists() expects parameter 2 to be array, null given
Filename: better_pages/ft.better_pages.php
Line Number: 74

A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /system/codeigniter/system/core/Exceptions.php:170)
Filename: core/Common.php
Line Number: 412

The “Add custom URL” field, that acts as a clone of the Pages URI, reverts back to “/example/pages/uri” for all entries initially. If I make the standard Pages URI field visible again, it still has the correct URI value. I clicked in this field and it applies the value back into the Better Pages field correctly. After saving and revisiting an effected page, I never experience this again, only getting the original PHP errors above after clicking publish or save as draft. I have to repeat this process for every page.

 

#1

BoldMinded (Brian)

Hi, Nick. Change line 538 of publisher_site_pages.php to this:

<pre><code> $page_templates[$status][$lang_id][$entry_id] = $publisher_site_pages[$status][$lang_id][ee()->publisher_lib->site_id][‘templates’][$entry_id]; <pre><code>

Looks like I had 2 array keys mixed up.

As for the Better Pages issue I’ll have to purchase a copy of it and do some testing locally.

#2

Brian Litzinger

Nick, are you comfortable with diffs? If so make this update to ext.publisher.php… I think this will take care of it. It appears to work for me.

diff --git a/third_party/publisher/ext.publisher.php b/third_party/publisher/ext.publisher.php
index 73061cdbc4ef85633fc7e794b5286681931ce8ca..137ecdeef05654204d0dfcd2bf4a4c2e6ce93d58 100644
--- a/third_party/publisher/ext.publisher.php
+++ b/third_party/publisher/ext.publisher.php
@@ -668,6 +668,9 @@ class Publisher_ext {
                 if ($("#pages__pages_uri").length == 1) {
                     $("#pages__pages_uri").val("'. $url_title .'");
                 }
+                if ($("#better_pages_url").length == 1) {
+                    $("#better_pages_url").val("'. $url_title .'");
+                }
                 ';
             }
         }
@@ -684,6 +687,9 @@ class Publisher_ext {
                 if ($("#pages__pages_uri").length == 1) {
                     $("#pages__pages_uri").val("'. $url_title .'");
                 }
+                if ($("#better_pages_url").length == 1) {
+                    $("#better_pages_url").val("'. $url_title .'");
+                }
                 ';
             }
         }
#3

Brian Litzinger

Basically just add the 3 lines in both places where the + signs are.

#4

BoldMinded (Brian)

Nick, did you try this? If so did it fix the issue?

#5

Nick Lane

I did, I believe it resolved the issue. Thanks!

#6

BoldMinded (Brian)

Excellent! This was included in the 1.0.14 release too.

Login to reply