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: Channel look-ups going astray with Publisher

Status Resolved
Add-on / Version Publisher 1.6.1
Severity
EE Version 2.9.2

Gavin Lawrie

Mar 26, 2015

I’m working on getting Publisher running on an existing site. 

At one point some code appears in a template that pulls information from an NavEE navigation, uses this information to look up information about the channel referred to by the NavEE item, and then constructs an

element using this information.

Here is the code:

<section class="home-boxes index">
            {exp:navee:custom nav_title="{big_three_nav}" wrap_type="none" selected_class_on_parents="true" reverse="true"}
            <div class="single-home-box" id="{exp:channel:entries entry_id="{navee_entry_id}" status="{statuses}"} {url_title}{/exp:channel:entries}_button">
                <a href="/{exp:channel:entries entry_id=" status="{statuses}"title="({navee_title}) {text}" 
                    rel="address:/{exp:channel:entries entry_id=" status="{statuses}">
                    {text}
                </a>
            </div>
            {/exp:navee:custom}
        </section>

The code works fine on the non-Publisher version of the site.  Image 1 is an example of the HTML it generates.  The bogus “entry_id” tag within the tag is to expose the entry_id value for debugging purposes, and is added here just for clarity in the HTML output.

When the code is used on the Publisher version of the site, the code fails.  All three pages involved in the lookup are all present and have the same ID and channel etc as before, but the lookup returns information about a page in a different channel group with the ID of 426.  I’m not sure why this is happening; it is not a helpful outcome.

Image 2 shows an example of the HTML generated by the Publisher version of the site.

It is not a helpful condition for the site…

I think this issue has something to do with Publisher, as really that is the only change between the working site and the non-working site at the moment. But of course it might be something else, and apologies for assuming otherwise and posting here if so.

Does anyone have any idea why I am getting these results and what I can do to get the correct ones?

Thanks a lot in advance for any help anyone can give!

Gavin

#1

Gavin Lawrie

Fixed it.

Turns out when editing template to use Publisher content (rather than the three separate pages in use before) I ended up wrapping the above code within a exp:channel:entries tag pair, which was set to pull the ID=426 channel.

Moving the closing tag above the code segment fixed the problem.

Useful learning - I was not aware that exp:channel:entries tags inherited selections from outer tag pairs.

Login to reply