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.

Custom Field Not Working Properly

June 15, 2010 1:41pm

Subscribe [3]
  • #1 / Jun 15, 2010 1:41pm

    usmangroup

    14 posts

    I have a custom field - {case_link} - created within a field group. The purpose of this field is for an individual to enter a URL. Within the template, the URL is used for a headline link (another custom field). Unfortunately, when I enter the full URL path, the address appears and the “link breaks”. The rendered HTML ends up looking like this…

    <h4><a href="http://a">http://www.youtube.com/watch?v=rGEti8l8W5U</a>">2010 SAPPHIRE interview</a></h4>

    If I enter just part of the URL (without http or www), it renders this…

    <h4><a href="http://youtube.com/watch?v=rGEti8l8W5U">2010 SAPPHIRE interview</a></h4>

    It appears that whenever we enter anything related to http or www in the custom text field, EE tries to automatically create the link. What can I do to keep this from happening? FYI - the custom web field is setup to have “none” for text formatting.

    The template is is setup like this.

    <div class="meta-data">
    {exp:weblog:entries weblog="home_casestudies" disable="pagination|categories|member_data|trackbacks" dynamic="off"}
    <h4><a href="http://{case_link}">{title}</a></h4>{case_desc}{/exp:weblog:entries}</div>

    Any help is greatly appreciated.

    [Mod Edit: Moved to the Technical Support forum]

  • #2 / Jun 15, 2010 3:21pm

    Ingmar

    29245 posts

    It appears that whenever we enter anything related to http or www in the custom text field, EE tries to automatically create the link. What can I do to keep this from happening?

    It’s a per weblog setting, “Automatically turn URLs and email addresses into links?” You can find it at Admin > Weblog Administration > Weblog Management > Edit Preferences.

  • #3 / Jun 15, 2010 3:23pm

    Yodle UX

    18 posts

    I was actually just about to post this same question.  This was not resolved by turning off the auto link setting for my weblog.  Even with it off it still continues to attempt auto linking, and I end up with what has been posted here.  Is there another place that might have this setting turned on?

  • #4 / Jun 15, 2010 3:37pm

    Ingmar

    29245 posts

    No, there is no other place. As I’ve said, this is a per-weblog setting, so make sure that you turned it off in the correct / all weblogs. You might also want to choose “Formatting: None” for your custom field.

  • #5 / Jun 15, 2010 4:12pm

    Yodle UX

    18 posts

    Right, I’m aware.  I’m a fairly experienced EE user, and this is the first time I’ve encountered this issue.  The setting is definitely turned off, and I only have 1 weblog on this site, so there is nothing to be mistaken here.  Are there any settings that might cause this to happen on a template level rather than a weblog level?

  • #6 / Jun 15, 2010 4:40pm

    Ingmar

    29245 posts

    No, I don’t think so. What version and build are you on? Any extensions you’re using?

  • #7 / Jun 15, 2010 5:23pm

    Yodle UX

    18 posts

    Running 1.6.8, Build:  20100121.

    I have quite a few extensions, plugins, and modules installed but none of them were recently added.  I’m actually rebuilding a blog from another site.  Using MSM.  I didn’t have this issue on the original blog.  I duplicated everything from the old weblog into a new one in the new site, and now it’s acting funny.

    I thought that something might be linking to the old weblog - checked that and no.
    I checked the auto URL setting like 20 times - It’s off
    There is no formatting on the custom field.

    If I render the weblog into an empty template with absolutely nothing else in it, it doesn’t seem to do this, but if I render it into the formatted template, that’s when it kicks in.  I checked my html for any missing quotes. semicolons, or anything at all that might trigger funkyness…nothing.

  • #8 / Jun 15, 2010 7:03pm

    Brandon Jones

    5500 posts

    If I render the weblog into an empty template with absolutely nothing else in it, it doesn’t seem to do this, but if I render it into the formatted template, that’s when it kicks in.

    I’d start systematically adding in bits of the real template into the empty template, checking at each step to see what triggers the behavior. Let us know what you find.

  • #9 / Jun 16, 2010 5:43pm

    Yodle UX

    18 posts

    Ok so I figured it out.

    What i had done was create a template called “.post” which held all of my HTML for the post of my blog, and was to be reused on several pages (comment page, archives, etc.).  I was assigning my fields to custom variables and sending them to my embed as such:

    {embed = "includes/.post" postEntry = "{entry}" postTitle = "{title}" postAuthor = "{author}"}

    etc, etc.

    The template had something along the lines of this in it (but much more complex in my actual one:

    <h1>{embed:postTitle}</h1>
    <h2>{embed:postAuthor}</h2>
    <p><div>{embed:postEntry}</div>


    This was great so that I could change the HTML for all the pages at once, but it was what was causing that weird auto link issue and I have no idea why.  Once I moved the HTML into the original template and didn’t use a template for it, everything rendered perfectly.  It’s a shame too, because now I’ll have to do triple work when making changes to that section across multiple pages.  😕

  • #10 / Jun 16, 2010 7:46pm

    Brandon Jones

    5500 posts

    interactiveB2B, glad you have a solution for now. You may also want to try a version update when you get a chance.

    usmangroup, how are you coming along with this?

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

ExpressionEngine News!

#eecms, #events, #releases