All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

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: Ignored channel relationship entries showing old publisher content

Status Resolved
Add-on / Version Publisher Lite 3.9.1
Severity
EE Version 7.2.9

Andrew Gunstone

Feb 14, 2023

So this is a bit confusing, but hold with me ...

I have 2 channels ... Pages and Section. Pages is managed by Publisher, and Section is an ignored channel in Publisher. Pages has a relationship field that allows you to select one or many Section entries.

When I edit a Section entry that is supposed to be displayed on one of the Pages entries ... it continues to show the *old* bit of content (a basic WYSIWYG field) on the Pages entry (on the front end), and not the new content. If I look at the Section entry in the CP, it shows the new content correctly.

If I look in the database, the channel_data table shows the *new* content correctly (as expected). The publisher_data table shows the *old* content (as I would expect).

The issue is that when displaying the content on the frontend, it shows the *old* content from the publisher_data field. This only happens with content via a relationship field.

If I display the Section entry directly in a template (not via a relationship field), it shows the correct *new* content.

Hopefully that makes sense.

#1

BoldMinded (Brian)

When you say “via a relationship field” do you mean through a relationship tag?

Are you able to share screenshots of the CP and front-end or make a quick video to help illustrate the issue at hand?

#2

Andrew Gunstone

Comment has been marked private.

#3

BoldMinded (Brian)

I haven’t had a chance to look into this one yet, hopefully in the next couple of days.

#4

BoldMinded (Brian)

On the front-end it’s showing the old content (pulling from the publisher db table instead of the native table b/c the channel is ignored), is it doing this when you try to display the entry in a normal channel:entries tag? Or is it happening only when displaying the entry through a {my_relationship_field} tag pair?

#5

BoldMinded (Brian)

I think this is an easy fix. Instead of sending a whole new build open up the legacy/libraries/hooks/Publisher_relationship_hooks.php file and go to line 459 and you should see this

if (isset($entries[$entryId])) {

Change it to this

if (isset($entries[$entryId]) && !$this->entry->isIgnored($entryId)) {
#6

Andrew Gunstone

Hey Brian,

I’ve given this a quick try … and it seems to work properly! That was indeed an easy fix!

😊

#7

BoldMinded (Brian)

Excellent! I’ve already included this for the next release.

Login to reply