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.

Specific Custom Field Short Names Breaking Channel Entries

August 26, 2011 10:22am

Subscribe [3]
  • #1 / Aug 26, 2011 10:22am

    Trevor Davis

    39 posts

    2.2.2 - Build: date 20110801

    I have a channel named case_studies. That channel is using the Case Studies field group with 10 custom fields. For some reason, when I name the custom fields “case_studies_field_name” (substituting field_name for each field), nothing gets returned from my channel entries.

    A more specific example:
    I have a textarea field with the short name of case_studies_bottom_content, and my channel entries query returns nothing. If I change the short name of the custom field to be cs_bottom_content, the channel entries query works fine.

    I can certainly work around this problem, but it just seemed bizarre and random to me. Let me know if I can provide any more details.

  • #2 / Aug 26, 2011 11:09am

    Mark Bowen

    12637 posts

    If you have a custom field named case_studies_bottom_content and you place that into a template as such :

    {exp:channel:entries
        channel="case_studies"
        limit="1"
        dynamic="yes"
        sort="asc"
        disable="member_data|pagination|categories"}
    
    {case_studies_bottom_content}
    
    {/exp:channel:entries}

    You should definitely normally get output. If you aren’t then make sure that you have named the fields in the correct fashion, i.e. :

    Field Name
    Place in here the name that you would like to have show on the Publish page. In your case something like Bottom Content would suffice.

    Short Name
    Here you will place case_studies_bottom_content. This is the word that will be used in your template.

    Just perhaps ensure that you have entered the details into these two areas around the correct way. It may well be that you placed them back to front.

    Hope that helps a bit.

    Best wishes,

    Mark

  • #3 / Aug 26, 2011 11:10am

    Trevor Davis

    39 posts

    I think I figured out what is going on. I have Switchee installed, and it looks like when a custom field short name starts with case, Switchee starts to kick in and messes things up.

  • #4 / Aug 26, 2011 11:13am

    Mark Bowen

    12637 posts

    I think I figured out what is going on. I have Switchee installed, and it looks like when a custom field short name starts with case, Switchee starts to kick in and messes things up.

    Ah right, okay. I’ve never used that add-on before so didn’t know about that. Thanks for letting us know what it was though as it might help others if they ever have the same problem.

    Glad you got it sorted.

    Best wishes,

    Mark

  • #5 / Aug 26, 2011 11:19am

    Trevor Davis

    39 posts

    Thanks for your help Mark.

    As a note for everyone, I also posted this issue in the Switchee forum on Devot:ee.

  • #6 / Aug 26, 2011 11:23am

    Mark Bowen

    12637 posts

    Thanks for your help Mark.

    As a note for everyone, I also posted this issue in the Switchee forum on Devot:ee.

    No problems although it was you that figured it all out 😉

    Good idea posting in the devot-ee forums too as perhaps there might be something the developer can do incase this sort of thing happens again.

    Best wishes,

    Mark

  • #7 / Aug 26, 2011 12:56pm

    Lisa Wess

    20502 posts

    Thanks for letting us know, Trevor - and thanks for the help, Mark!

    Since this is down to a third-party add-on, I’m going to close it out here.  Please let us know if you have any other questions and have an awesome weekend!

  • #8 / Aug 26, 2011 12:57pm

    Marcus Neto

    1005 posts

    Trevor, I’m going to close this one now. Please let us know if you have any other questions.

    Mark thanks for the assist 😉

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

ExpressionEngine News!

#eecms, #events, #releases