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.

2.2.2 links guestbook problems

September 27, 2011 6:42pm

Subscribe [4]
  • #1 / Sep 27, 2011 6:42pm

    nathanzachary

    11 posts

    Hello,

    After upgrading to 2.2.2, I have a few problems with links and our guestbook.  Firstly, any links that function by referencing oursite.com/index.php?URL=whatever have stopped working.  For instance, the link to the EE user guide at the bottom of the control panel shows that it will link to:

    http://oursite.com/index.php?URL=http://ellislab.com/expressionengine/user-guide

    When one clicks on that link, it opens up a new browser tab, but the page is completely blank with that address displaying in the URL bar.

    Secondly, our guestbook is not working.  I believe the issue stems from the CAPTCHA not being displayed now.  The only other difference that I can see when comparing the source from the pre-upgrade version and the upgraded version is that there are escaped slashes in all of the referenced URLs.  For instance:

    Pre-upgrade:

    var EE = {"BASE":"http://www.oursite.com/index.php?","THEME_URL":"http://www.oursite.com/themes/cp_themes/default/","PATH_CP_GBL_IMG":"http://www.libera.org.uk/themes/cp_global_images/","filebrowser":{"endpoint_url":"ACT=11","window_title":"File Manager","theme_url":"http://www.oursite.com/themes/cp_themes/default/"},"lang":{"or":"or","resize_image":"Resize Image","return_to_publish":"Return to Publish","confirm_exit":"When you leave, any data entered will be lost. Are you sure you want to leave?","add_new_html_button":"Add New HTML button"},"publish":{"show_write_mode":true,"title_focus":true,"smileys":true},"user_id":"3","XID":"9a8967ad04b81c3b2dc3d6aa6068b4acbc358ad5"};}
    
    mySettings = {"nameSpace":"html","onShiftEnter":{"keepDefault":false,"replaceWith":"
    \n"},"onCtrlEnter":{"keepDefault":false,"openWith":"\n","closeWith":"\n"},"markupSet":[{"name":"b","key":"B","openWith":"<strong>","closeWith":"</strong>","className":"btn_b"},{"name":"i","key":"I","openWith":"<em>","closeWith":"</em>","className":"btn_i"},{"name":"blockquote","key":"Q","openWith":"<blockquote>","closeWith":"</blockquote>","className":"btn_blockquote"},{"name":"a","key":"A","openWith":"<a >","closeWith":"</a>","className":"btn_a"}]};
    
    myWritemodeSettings = {"nameSpace":"html","onShiftEnter":{"keepDefault":false,"replaceWith":"
    \n"},"onCtrlEnter":{"keepDefault":false,"openWith":"\n","closeWith":"\n"},"markupSet":[{"name":"b","key":"B","openWith":"<strong>","closeWith":"</strong>","className":"btn_b"},{"name":"i","key":"I","openWith":"<em>","closeWith":"</em>","className":"btn_i"},{"name":"blockquote","key":"Q","openWith":"<blockquote>","closeWith":"</blockquote>","className":"btn_blockquote"},{"name":"a","key":"A","openWith":"<a >","closeWith":"</a>","className":"btn_a"}],"onTab":{"keepDefault":false,"replaceWith":"\t"}};


    2.2.2:

    var EE = {"BASE":"http:\/\/www.oursite\/index.php?","THEME_URL":"http:\/\/www.oursite.com\/themes\/cp_themes\/default\/","PATH_CP_GBL_IMG":"http:\/\/www.oursite.com\/themes\/cp_global_images\/","filebrowser":{"endpoint_url":"ACT=11","window_title":"File Manager","theme_url":"http:\/\/www.oursite.com\/themes\/cp_themes\/default\/"},"fileuploader":{"window_title":"File Upload","delete_url":"C=content_files&M=delete_files"},"lang":{"or":"or","resize_image":"Resize Image","return_to_publish":"Return to Publish","confirm_exit":"When you leave, any data entered will be lost. Are you sure you want to leave?","add_new_html_button":"Add New HTML button"},"publish":{"show_write_mode":true,"title_focus":true,"smileys":true},"user_id":"3","XID":"e52c32189dfa2a6d645e46d76fdb6752ec597793"};}
    
    mySettings = {"nameSpace":"html","onShiftEnter":{"keepDefault":false,"replaceWith":"<br \>\n"},"onCtrlEnter":{"keepDefault":false,"openWith":"\n","closeWith":"<\/p>\n"},"markupSet":[{"name":"b","key":"B","openWith":"<strong>","closeWith":"<\/strong>","className":"btn_b"},{"name":"i","key":"I","openWith":"<em>","closeWith":"<\/em>","className":"btn_i"},{"name":"blockquote","key":"Q","openWith":"<blockquote>","closeWith":"<\/blockquote>","className":"btn_blockquote"},{"name":"a","key":"A","openWith":"<a >","closeWith":"<\/a>","className":"btn_a"}]};
    
    myWritemodeSettings = {"nameSpace":"html","onShiftEnter":{"keepDefault":false,"replaceWith":"<br \>\n"},"onCtrlEnter":{"keepDefault":false,"openWith":"\n","closeWith":"<\/p>\n"},"markupSet":[{"name":"b","key":"B","openWith":"<strong>","closeWith":"<\/strong>","className":"btn_b"},{"name":"i","key":"I","openWith":"<em>","closeWith":"<\/em>","className":"btn_i"},{"name":"blockquote","key":"Q","openWith":"<blockquote>","closeWith":"<\/blockquote>","className":"btn_blockquote"},{"name":"a","key":"A","openWith":"<a >","closeWith":"<\/a>","className":"btn_a"}],"onTab":{"keepDefault":false,"replaceWith":"\t"}};

    I did have to copy over my previous index.php (in the web root) and remove two lines in order for the site to work after the upgrade.  Post-upgrade, going to the main site would automatically redirect to the system/ folder.  I’m thinking that there were a lot larger problems with the upgrade than I had once thought.  Can anyone assist?

    Cheers,
    Nathan Zachary

  • #2 / Sep 28, 2011 10:38am

    Mark Bowen

    12637 posts

    Hi Nathan,

    First of all welcome to the forums!

    Let’s deal with the issues one at a time if that’s okay?

    Regarding the links that aren’t working. How were these created and where are they in your Control Panel? Are they links that were created with the Quick Links Manager possibly?

    I believe the reason you’re having this trouble is because you copied over your previous index.php file.

    If you look at this page in the documentation and specifically Step 2 you will see that you are supposed to overwrite those files with the new fresh files.

    I would advise following the instructions on that page to the letter if you can and if you have the possibility to do so I would first roll back any changes so that you are back to your pre-upgrade state first so that you can follow them along.

    We’ll deal with the guestbook issue after we’ve got you up and running again fully.

    Thanks,

    Mark

  • #3 / Sep 28, 2011 12:45pm

    nathanzachary

    11 posts

    Hello Mark,

    Firstly, thank you for your reply.  Secondly, the issue is that when I use the index.php that came packaged with the upgrade, I get automatically redirected to:

    oursite.com/index.php?S=0&D=cp&C=login

    which is the system control panel.  Am I missing something?

    Thank you for your continued support.

    Cheers,
    Nathan Zachary

  • #4 / Sep 29, 2011 12:37pm

    Mark Bowen

    12637 posts

    Hi Nathan,

    You said above that this happens with the User Guide link at the bottom of the Control Panel?

    I’m not seeing one of those at the bottom of mine at all. Could you possibly post a screenshot of where you are referring to here please?

    Thanks,

    Mark

  • #5 / Sep 29, 2011 12:44pm

    nathanzachary

    11 posts

    Certainly.  I have attached a screenshot with an example.  Basically, any link that references oursite.com/index.php?URL=$SOMETHING_ELSE fails.  I was simply mentioning this particular link as an example.

    Cheers,
    Nathan Zachary

  • #6 / Oct 02, 2011 4:23pm

    Kevin Smith

    4784 posts

    Hello Mark,

    Firstly, thank you for your reply.  Secondly, the issue is that when I use the index.php that came packaged with the upgrade, I get automatically redirected to:

    oursite.com/index.php?S=0&D=cp&C=login

    which is the system control panel.  Am I missing something?

    Thank you for your continued support.

    Cheers,
    Nathan Zachary

    Hi Nathan,

    I’ve seen this happen before, and I suspect you copied over into your web root the file from system/index.php in the EE download package. That’s the only reason the main page of the site would appear to behave like the CP. Please make sure you overwrite the index.php file in your web root with the index.php file that’s in the root folder of the EE download.

    If you do that, does going to the domain name bring up the main site as expected?

  • #7 / Oct 02, 2011 7:45pm

    nathanzachary

    11 posts

    Hello Kevin,

    Thank you for the reply.  I found the problem with index.php.  It was actually my fault because of a RewriteRule that was matching a RewriteCond that I didn’t expect.  Thank you for your suggestion, as it is what made me look into the issue a bit further!

    Now the only problem that remains is regarding the guestbook.  I have temporarily disabled the CAPTCHA requirement, so that people can post.  When the CAPTCHA is required, it doesn’t show up on the entry page.  Therefore, when one clicks “submit,” it returns an error stating that the CAPTCHA was incorrect.  Interestingly, the CAPTCHA displays and works correctly when commenting on our blog entries; it’s just the guestbook CAPTCHA that doesn’t display.  Any suggestions on where to track down the issue?  Please let me know if you need any code snippets.

    Thank you again for your help thus far!

    Cheers,
    Nathan Zachary

  • #8 / Oct 03, 2011 3:43pm

    Dan Decker

    7338 posts

    Hi Nathan,

    Can you post the template code for the guestbook page? Let’s get a look at the page that’s not displaying the CARTCHA.

    Cheers,

  • #9 / Oct 03, 2011 5:07pm

    nathanzachary

    11 posts

    Hello Dan,

    Certainly.  Here’s the “index” portion of the guestbook template:

    {embed="includes/head"}
    
    {exp:channel:entries channel="guestbook" limit="1" }    
    
    <title>Guestbook | {site_name}</title>
    <meta name="keywords" content="" />
    <meta name="description" content="{title} {guestbook-comment}" />
    {/exp:channel:entries }    
    
    </head>
    
    <body>
    <div id="wrapper">
        {embed="includes/header"}
    
      <div id="ContentPanel">
        <h1>Guestbook</h1>
        <div >
        {exp:channel:entries  channel="guestbook" sort="desc" limit="10"}    
       <div class="dividerLine" {switch='|||||||| 
            span class="HomeDateRight"> {entry_date format="%M %j%S, %Y"}</span> {title}
            {guestbook-comment}
        </div>
         {paginate}
        <div class="NextBack"> 
         Page {current_page} of {total_pages} pages {pagination_links} 
        </div>
       {/paginate}
       {/exp:channel:entries}   
        </div>
    </div>
      <div class="ContentPanelSide smallText">
        <h2 class="Grey">Sign the book</h2>
        {exp:safecracker channel="guestbook" include_jquery="no" return="site" }
            <label for="title">Name</label>
            <input type="text" name="title" class="form_textinput" />
            <label for="guestbook-email">Email</label>
            <input type="text" name="guestbook-email" class="form_textinput" />
            <label for="guestbook-comment">Your comment</label>
            <textarea name="guestbook-comment" cols="40" rows="3" class="form_textinput" id="GuestBookComment"></textarea>
            <br>
            <div id="counterLimit" class="clearFix"></div>
            {if captcha}
         <label for="captcha">Please enter the word you see in the image below:</label>
                {captcha}
                <input type="text" name="captcha" value="{captcha_word}" maxlength="20" />
            {/if}
     <div class="clearFix">/div>
          <input name="submit" type="submit" class="WhiteButton" value="Send" /> 
          i>This guestbook is moderated 
     your entry will not appear until it is approved</i>
          {/exp:safecracker}
               
            </div>
        </div>
      <div class="clearFix"></div>
    </div>
    
    {embed="includes/footer"}
    
    
    </body>
    </html></code></pre>
    
    <p>Just in case you need it, here’s the “publish” template:</p>
    
    <pre><code>{exp:safecracker channel="guestbook" include_jquery="no" return="guestbook/edit/" url_title="{embed:url_title}" entry_id="{embed:entry_id}"}
            <label for="guestbook-comment">Comment</label>
            <textarea name="guestbook-comment" cols="40" rows="5" class="form_textinput" id="GuestBookComment">{guestbook-comment}</textarea>
            <label for="guestbook-comment">Status</label>
            <select name="status" id="status">
                {statuses}
                    <option value="{status}"{selected}>{status}</option>
                {/statuses}
            </select>
            <input name="submit" type="submit" class="WhiteButton" value="Submit" /> 
            <div class="clearFix">/div>
          {/exp:safecracker}

    Thank you preemptively for your assistance.

    Cheers,
    Nathan Zachary

  • #10 / Oct 03, 2011 5:56pm

    Kevin Smith

    4784 posts

    Hi Nathan,

    I may be missing something here, but isn’t this line of code supposed to close somewhere?

    <div class="dividerLine" {switch='||||||||
  • #11 / Oct 03, 2011 8:30pm

    nathanzachary

    11 posts

    The interesting part is that it worked just fine before moving to 2.2.2.  I don’t know why the error message states:

    “The form you submitted contained the following errors
    You must submit the word that appears in the image”

    even though I have turned off the CAPTCHA requirement.  I can’t seem to get the CAPTCHA to display, even when it is ticked to “On” as a requirement.

    Is there anything else that I need to submit in order to get support for this issue?  Is there a way to have someone actually look at the panel in order to help?  I have been getting many emails regarding the error message from people wanting to post.

    Thank you,
    Nathan Zachary

    EDIT: I have found that the error is related to CAPTCHA by looking in the core_lang.php file:

    //----------------------------
    // Errors
    //----------------------------
    
    'error' =>
    'Error',
    
    'submission_error' =>
    'The form you submitted contained the following errors',
    
    'captcha_required' =>
    'You must submit the word that appears in the image',

    So it is obviously related to the CAPTCHA not being displayed.  As previously said, it is odd to me that the CAPTCHA works just fine on our blog entries, but not on the guestbook (either on the main index page as a gadget, or the actual guestbook page).

  • #12 / Oct 05, 2011 2:45pm

    Dan Decker

    7338 posts

    Hi Nathan,

    Did you copy and paste you code directly into your post? There are a couple of missing “<“ as well as a closing “}”

    {switch='|||||||| 
    
    and
    
    i>This guestbook

    Is that how it appears in your production template as well?

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases