ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Why is a newly added field just displaying the field's title, not its value.

March 12, 2010 10:24pm

Subscribe [2]
  • #1 / Mar 12, 2010 10:24pm

    MCrittenden

    67 posts

    I’m working on a site that’s been around for a few months. I just added a new field (called branch_spanish) to the Branch weblog type. When I try to display it in a template (using {branch_spanish} then it just displays that (i.e., just “{branch_spanish}”) rather than what’s actually entered for the field.

    I know this is the expected behavior for when the field with that name doesn’t exist, but I’ve verified that that name is correct and I’m calling it in exp:weblog:entries for the correct weblog type).

    Any ideas on where I could look for answers? I’ve already flushed caches, which is the only thing I could think of.

    Thanks in advance for any help.

  • #2 / Mar 12, 2010 10:30pm

    julie p

    282 posts

    can you post your template code here? You’re sure that {branch_spanish} is in the {exp:weblog:entries} tags, right?

  • #3 / Mar 12, 2010 10:35pm

    MCrittenden

    67 posts

    The actual template is very long (since it’s doing a zip code proximity search), but here’s the relevant part:

    {exp:weblog:entries weblog="branch" entry_id="<?php echo $entry; ?>" limit="1" show_future_entries="yes" show_expired="yes" dynamic="off" disable="categories|member_data|pagination|trackbacks"}
        <li><a href="http://{title_permalink=locations/branch}" title="{title}">{title}</a> <?php echo "(" . round($distance, 1) . " miles)"; ?>
    
            {branch_address}
    
            {branch_city}, {branch_state} {branch_zipcode}
    
            <strong>P:</strong> {branch_phone}
            
    {branch_spanish}
        </li>
    {/exp:weblog:entries}

    If you need to see the full template, see http://pastie.org/867462

    Thanks!

  • #4 / Mar 12, 2010 10:43pm

    julie p

    282 posts

    Just so I’m sure I understand…

    You have a weblog called “branch”
    You also have a custom field group associated with that weblog, right?
    and you added a new custom field {branch_spanish} to that same custom field group.

    And the branch_spanish entry field is appearing just fine in the publish/edit pages…

    Is this all correct?

  • #5 / Mar 12, 2010 10:44pm

    MCrittenden

    67 posts

    @julie, yep, that’s all 100% correct. I can provide screenshots of anything if that’s helpful.

  • #6 / Mar 12, 2010 10:50pm

    julie p

    282 posts

    I’d be happy to take a look-see if you want to PM me a temp user/pass. I had this problem once, and I remember there were some extra spaces either in the template or the field names. I can’t remember exactly but I’d be happy to take a quick look…

  • #7 / Mar 12, 2010 10:55pm

    MCrittenden

    67 posts

    Sent! Thanks so much.

  • #8 / Mar 12, 2010 11:03pm

    julie p

    282 posts

    I stripped out just the relevant code and put it in a new template for you. That field renders correctly out of the complicated template… so I’d start slowly adding info back in to see what breaks it…

  • #9 / Mar 12, 2010 11:04pm

    julie p

    282 posts

    oh - pm’d you the template name/location…

  • #10 / Mar 13, 2010 12:57am

    MCrittenden

    67 posts

    Julie, thanks a lot for the help. With what you did, I was able to narrow it down to that specific template. I can literally have the exact same template code in that template and the one you set up, and yours works and that one doesn’t. I also made sure that the options for both were the same.

    Any ideas? I’m trying to see if the developer had any template specific code anywhere that would prevent a field from rendering in that template, but I can’t find anything.

  • #11 / Mar 13, 2010 12:00pm

    julie p

    282 posts

    and you changed the search form to submit to the sample template? If so, I’d try a select-all copy/paste and see if that fixes it. Otherwise, delete the old template, create a new one as a duplicate from the temp (if you want meaningful template names, of course!)

  • #12 / Mar 13, 2010 8:06pm

    MCrittenden

    67 posts

    Figured it out. Unchecking “Cache SQL Queries” solved it, even though I had been flushing all caches all along. Thanks for all your help!

  • #13 / Mar 13, 2010 8:20pm

    julie p

    282 posts

    congrats!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases