0

EE 2.5.3 MSM 2.1.4

9 site MSM install where this code is on site 9 calling content from site 1. All content is pulled correctly except this field.

I have the following conditional which is returning the html inside the conditional correctly.

{if press-image}
<p class="press-image">

    {!--
    <img src="{press-image}" alt=" " height="120" width="160" class="pretty-box"/>
    --}

    {exp:ce_img:single src="{press-image}" height="120" width="160" class="pretty-box"}
</p>
{/if}

However, the source for the image is returning blank. This happens regardless of whether I'm using CE Image or not. I've also tried placing {press-image} by itself in the template and it returns nothing.

I'm not sure why the conditional would work but not output the field that is checking. Any ideas on why this would be happening?

***UPDATE*****

More code as per lisa's request in the comments

{exp:channel:entries channel="press" site="default_site" disable="member_data|category_fields" category_group_id="2" limit="5" paginate="bottom"}
<article>
    <!-- Blog Post -->
    <section class="blog-post">
        <!-- Blog Post Title -->

        {if press-image}
        <p class="press-image">

            {!--
            <img src="{press-image}" alt=" " height="120" width="160" class="pretty-box"/>
            --}

            {exp:ce_img:single src="{press-image}" height="120" width="160" class="pretty-box"}
        </p>
        {/if}

        <header>
            <h3><a href="/media/{url_title}">{title}</a></h3>
        </header>

more code here
</article>
{/exp:channel:entries}

Also tried the following in the middle of the channel:entries tag but not in a conditional and it output nothing.

{press-image}{path}/{filename}.{extension}{/press-image}

**UPDATE 2******/ Have now created a new test template that contains only the following code - problem persists.

<div id="blog">
    <!-- Begin Blog Post -->   
    {exp:channel:entries channel="press" site="default_site" disable="member_data|category_fields" category_group_id="2" limit="5" paginate="bottom"}
    <article>
        <!-- Blog Post -->
        <section class="blog-post">
            <!-- Blog Post Title -->

            <p class="press-image">
            press   

                <img src="{press-image}" alt=" " height="120" width="160" class="pretty-box"/>


                {exp:ce_img:single src="{press-image}" height="120" width="160" class="pretty-box"}

                {press-image}{path}/{filename}.{extension}{/press-image}

            image
            </p>

            <header>
                <h3><a href="/media/{url_title}">{title}</a></h3>
            </header>
            <!-- Blog Post Date -->
            <div class="date">{entry_date format="%M  %d%S %Y"} <br /><a href="/media/{url_title}" style="font-size:110%;">Read More&hellip;</a></div>

        </section>
    </article>
    {/exp:channel:entries}
<div>

Below is the source code on the front end of the site.

<section class="blog-post">
            <!-- Blog Post Title -->

            <p class="press-image">
            press

                <img src="" height="120" width="160" class="pretty-box">






            image
            </p>

            <header>
                <h3><a href="/media/some-url-title">Entry Title Here</a></h3>
            </header>
            <!-- Blog Post Date -->
            <div class="date">Jun  30th 2013 <br><a href="/media/some-url-title" style="font-size:110%;">Read More…</a></div>

        </section>

**UPDATE 3****

I have now put the following code on both the site1 site and the site that is causing trouble. In site1 the image url is output, in the trouble site nothing is output

{if logged_in}
    a{press-image}b
{/if}
7
  • {press-image} on its own, no conditional, doesn't output anything? Is this a channel entries tag? If so, can you show the rest of the tag? From your description, it sounds like {press-image} isn't outputting anything, so the conditional will evaluate false. Please let me know if I misunderstood? :)
    – Lisa
    Jul 19 '13 at 16:46
  • Lisa, You are correct. Press image is not empty - all entries have an image uploaded to that field. which is why the conditional is passing. What's confusing is why {press-image} is outputting nothing even when placed alone in the template. It does output the image in site 1.
    – CreateSean
    Jul 19 '13 at 17:28
  • Sean, can you create a very simple entries tag that outputs just press-image? Real reduction. Let me know if you need help with the code. :) I think we need to backtrack and isolate what is going on. Make sure it's not future dated or expired as well, of course!
    – Lisa
    Jul 20 '13 at 17:10
  • Sean, I'm not quite sure what's going on. I'd be happy to login and look around if you want. lisajill@gmail.com - today or tomorrow I can have a look around. :)
    – Lisa
    Jul 21 '13 at 16:30
  • Lisa - have sent you an email. Sorry, didn't respond earlier wasn't in front of a computer all weekend.
    – CreateSean
    Jul 22 '13 at 13:37
2

Ok, so this is kind of cool and baffling. I'll just write through the troubleshooting I did. Check out the template additions. I couldn't get the variable to output either, so I tried throwing in some searches since search: is supposed to work with the MSM now

So the first channel entries tag pulls the entry but will not pull the variable out. Crazy. The second entries tag won't pull anything since press-image has stuff.

I threw in some conditionals with very obvious "answers" - and it does output the content for when the variable isn't empty - but it won't output your actual content. See this:

 {if press-image != ""}PRESS IMAGE IS NOT EMPTY DARNIT!{/if}
{if press-image == ""}PRESS IMAGE IS EMPTY Y'GOOFY GAL{/if}

Output this:

PRESS IMAGE IS NOT EMPTY DARNIT!

The only thing I can think of here, since press-article works, is some conflict between the MSM and the File Manager - since this is a file field. I searched and found this bug:

https://support.ellislab.com/bugs/detail/17510

but that says it's fixed. I'm not sure in what version it was fixed, so you might try those code mods they recommend?

My template test code:

    {exp:channel:entries search:press-image="not IS_EMPTY" channel="press" site="default_site" disable="member_data|category_fields" limit="5" paginate="bottom"}
<h1>title: {title}, id: {entry_id},  channel short name: {channel_short_name}</h1>

    a{press-image}b
{if press-image != ""}PRESS IMAGE IS NOT EMPTY DARNIT!{/if}
{if press-image == ""}PRESS IMAGE IS EMPTY Y'GOOFY GAL{/if}


{/exp:channel:entries}

<hr />

{exp:channel:entries search:press-image="IS_EMPTY" channel="press" site="default_site" disable="member_data|category_fields" limit="5" paginate="bottom"}
<h1>title: {title}, id: {entry_id},  channel short name: {channel_short_name}</h1>

    a{press-image}b



{/exp:channel:entries}
2
  • Thanks Lisa - will look into the bug reports a little later today.
    – CreateSean
    Jul 26 '13 at 14:09
  • Let me know how that goes, Sean!
    – Lisa
    Jul 26 '13 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.