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.

url_title was edited - tell a friend broke

March 02, 2009 10:38am

Subscribe [2]
  • #1 / Mar 02, 2009 10:38am

    JCI

    144 posts

    So for one particular weblog, I had 300+ entries with a url_title prefix that we needed to truncate. Example: ffa_day_march_4, ffa_day_december_5, etc etc - I ran a sql query to truncate all of the “ffa_day_” prefixes.

    This worked for the most part. All entries load with their new url perfectly. The only problem I have now is, that when clicking the link for “tell-a-friend”, the form loads blank. This did work before I truncated the URL.

    I’ve cleared all cached data. Is there something related to the url_title that I need to also edit via the database? I’m pretty comfortable with SQL.

    Any ideas?

  • #2 / Mar 02, 2009 10:45am

    Sue Crocker

    26054 posts

    JCI, how are you building your tell a friend links? Do you have a link we can look at?

  • #3 / Mar 02, 2009 1:04pm

    JCI

    144 posts

    Sure, here is the snippet of code from the entry template.

    {exp:weblog:entries weblog="ffa_day" limit="1" show_future_entries="yes"}
                
        <h4>{dif_month} {dif_day}</h4>
    <p>            <br />
        {if dif_photo}<br />
            <div class="photo"><br />
            {dif_photo}<br />
            {if dif_caption}{dif_caption}{/if}<br />
            </div><br />
        {/if}</p>
    
    <p>    {dif_body}</p>
    
    <p>            <br />
            <a href="http://{permalink=site/tell_a_friend}">Email</a><br />
        <br />
                            <br />
    {/exp:weblog:entries}

    Here is the snippet from my tell-a-friend template.

    {exp:email:tell_a_friend charset="utf-8" allow_html="n" weblog="ffa_day" redirect="none" return="{homepage}"}
    
        
            <label for="email">Your Email Address</label>
    
            <input id="from" name="from" type="text" class="field text medium" value="" maxlength="50" tabindex="1"/>
        
    
            
            <label for="name">Your Name</label>
    
            <input id="name" name="name" type="text" class="field text medium" value="" maxlength="50" tabindex="2"/>
        
    
        
            <label for="friends_email">Friend's Email</label>
    
            <input id="to" name="to" type="text" class="field text medium" value="" maxlength="50" tabindex="3"/>
        
    
        <label class="desc" id="title4" for="Field4">
            Subject
        </label>
        
        <div>
            <input id="subject" name="subject" type="text" class="field text medium" value="" maxlength="200" tabindex="4" />
        </div>
    
        <label class="desc" id="title5" for="Field5">
            Message
        </label>
        
        <div>
            <textarea  id="message" name="message" class="field textarea medium" rows="10" cols="50"tabindex="5"></textarea>
        </div>
    
        Please enter the word you see in the image below:
        
        {captcha}
        
            <input type="text" name="captcha" value="" size="20" maxlength="20" style="width:140px;" />
        
        
        
            <input id="submit" class="btTxt" type="submit" value="Submit" />
        
    
    {/exp:email:tell_a_friend}
  • #4 / Mar 02, 2009 4:40pm

    Ingmar

    29245 posts

    Were your url title the only instance where ffa_day_ was in use? No templates, weblogs, global variables? How did you perform your search & replace? Also, what version and build are you on?

  • #5 / Mar 02, 2009 4:55pm

    JCI

    144 posts

    Ingmar, the SQL statement was :

    UPDATE exp_weblog_titles SET url_title = REPLACE(url_title,'ffa_day_','')

    My EE version is 1.6.6, build is 20081114

  • #6 / Mar 02, 2009 7:47pm

    Greg Aker

    6022 posts

    JCI:

    with your FTP client, can you please clear the sub-folders out of the /system/cache folder

    -greg

  • #7 / Mar 02, 2009 7:58pm

    JCI

    144 posts

    Hey Greg.

    Cleared out the cache folder and re-cleared cache from admin->utilities->clear cached data

    No luck. T he Tell a friend form is still acting up. It’s printing nothing between the {tell_a_friend} tags, only the surrounding HTML.

    Any other guesses?

  • #8 / Mar 02, 2009 8:06pm

    Greg Aker

    6022 posts

    In your weblog entries loop, can you please put:

    <!--  URL TITLE IS:  {url_title} -->

    So we can view the source to see if it is outputting the correct URL title?

    -greg

  • #9 / Mar 03, 2009 9:44am

    JCI

    144 posts

    The url_title is printing as should.

    It may also be useful to know that if I publish a new entry into the weblog, the tell-a-friend form loads like normal. It’s only the older entries (all 300+ that had their url_title truncated) that result in a blank form; Hence why I’m thinking there might me a relational field somewhere in the database?

  • #10 / Mar 03, 2009 11:49am

    Sue Crocker

    26054 posts

    The link to your tell a friend form should be using the entry_id, not the url_title.

    I have a sample page that you can see working:

    http://www.eehowto.com/support/friend

    If you look at the source, the link goes to a template called howto/form/someentryid where someentryid is the actual entry id of the item.

    How do your links differ?

  • #11 / Mar 03, 2009 3:58pm

    JCI

    144 posts

    Hi Sue.

    My links don’t differ. The tell a friend template is using the entry ID. If you’ll notice in my code above, I’m linking to it via ‘permalink’.

    After the url_title(s) were edited, the form broke for those entries. I’m trying to figure our the correlation.

  • #12 / Mar 04, 2009 8:06am

    Sue Crocker

    26054 posts

    JCI, it’s time to take a look at your site.

    Please check your email.

  • #13 / Mar 04, 2009 11:43am

    JCI

    144 posts

    Got it. Filled it out.

  • #14 / Mar 04, 2009 3:51pm

    Lisa Wess

    20502 posts

    JCI - you have a myriad of problems here, the first is that you definitely do not have all the up-to-date files.  I see the footer says you’re using EECore, yet you have some - not all -  license-only modules.  Is this an EECore install that was updated to the full version?  It is licensed, yes? Or is it intended to be EECore?

    We need to address the above before we can offer you further support.

    ___

    At this point you’re going to have to do a full-update to ensure that you have the most up to date files there.  It’s on 1.6.6 so you’ll want the version update instructions.

    You also have a fairly complicated template there; what you’ll need to do is try it with *only* the code from the tell-a-friend documentation and see if this happens with all entries, or only the ones you truncated.

  • #15 / Mar 04, 2009 4:39pm

    JCI

    144 posts

    Thanks a ton Lisa. It is a licensed version as far as I know. I see there is no number entered into the appropriate field. Let me take care of that and run the updates, and I’ll get back with you.

    Thanks again

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

ExpressionEngine News!

#eecms, #events, #releases