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.

EE 2.1.4 Beta Cannot Add Comments

February 16, 2011 4:49pm

Subscribe [7]
  • #31 / Mar 02, 2011 3:45pm

    Trevor Davis

    39 posts

    Thanks for trying Clive!

  • #32 / Mar 02, 2011 5:33pm

    narration

    773 posts

    Trevor, I did one more thing intended, and looked at a diff between the 2.1.3 and 2.1.4beta mod.comment.phps. I was surprised:  there are substantial rewrites, some of them talking about efficiencies, which is always a place some range of function can get into trouble.

    I also noted that the top of manual pages for exp:comment now has a red-highlighted note that it is intended to be called from an entries page so that a url_title or entry_id will be assured present in the calling URL. There were things in the source changes that might apply to that, though I don’t have time to do any full analysis.

    What this means is that even your test short version template should be called in this form: http://yoursite.com/templategroup/testtemplate/short_url_title_of_entry, as it normally would be from an entries page. And, you should then _not_ have a dynamic=“no” in your test or any comments page exp:comments:etc. tags, so this URL segment can do its job.

    You can try this manually and see if it makes a difference.

    Whatever your result, I think it is quite possible that you either had an unnoticed upgrade failure, or found an obscure bug in the 2.1.4 code.

    Why can I get your simplified template to work, and you can’t? It might be down to data differences.

    What I would do is this. I would redo the upgrade from scratch, using the ‘fully safe and clean’ routine.  This means first saving your present state via database export, and assure a file backup of the entire site. Then drop your database and reload your 2.1.3 backup. Simply rename your system and templates directories so they are there for quick recovery, but are absolutely out of the picture for fresh uploads, which can sometimes fail on files they can’t over-write. Re-add copies of all non-standard templates and third_party to a fresh unzip of the 2.1.4beta. Upload system and templates in this fresh and provisioned state. Run the upgrade and afterwards remove the installer. Try results again, starting with proper calling of this simplified template.

    If this fails, I think you are going to have to have Ellis look at your site. They should want to, because you’ll have uncovered something they need to know about the beta.

    That’s as it seems here, and Support may have their own comment. What I am sure of is that in the end, your 2.1.4 site will be able to do comments, Trevor. My experience of the beta is also more solid than 2.1.3, though issues remain, as beta is beta of course.

    Good fortune, and regards,
    Clive

  • #33 / Mar 03, 2011 3:42am

    John Henry Donovan

    12339 posts

    Trvour,

    Ok one more thing to try if you have not done it already. You mentioned you disabled the htaccess file but did you add back in the index.php into the General configuration?
    Make sure to disable it by renaming it
    Disable extensions too so the htaccess extension isn’t trying to write to it

    What does the URL look like for that single entry page ?
    It should be something like this

    http://www.mydomian.com/index.php/template_group/template/url_title

    Can you share a link to the page or is this just local?

    Try the following code. Update the channel short name in the comment form

    {exp:comment:entries sort="asc" limit="20" url_title="{segment_3}"}
      {comment}
      By {name} on {comment_date format="%Y %m %d"}
    {/exp:comment:entries}
    
    {exp:comment:form channel="channel_short_name"  url_title="{segment_3}"}
    {if logged_out}
    <label for="name">Name:</label>
    <input type="text" name="name" value="{name}" size="50" /><br >
    
    <label for="email">Email:</label>
    <input type="text" name="email" value="{email}" size="50" /><br >
    
    <label for="location">Location:</label>
    <input type="text" name="location" value="{location}" size="50" /><br >
    
    <label for="url">URL:</label> <input type="text" name="url" value="{url}" size="50" /><br > {/if} <label for="comment">Comment:</label>
    
    <textarea name="comment" cols="70" rows="10">{comment}</textarea>
    
    <label><input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information</label>
    
    
    <label><input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?</label>
    
    
    {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" /></p> {/if} <input type="submit" name="submit" value="Submit" /> <input type="submit" name="preview" value="Preview" />
    
    {/exp:comment:form}
  • #34 / Mar 04, 2011 10:34pm

    Trevor Davis

    39 posts

    Ok one more thing to try if you have not done it already. You mentioned you disabled the htaccess file but did you add back in the index.php into the General configuration?

    Nope, I did not remember to add it back into the General configuration. When I did that and disabled the htaccess, comments posted correctly.

    So I finally tracked it down to this bit from the NSM .htaccess generator:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
    RewriteRule ^(.*)$ $1/ [L,R=301]

    Once I commented that part out, comments started working fine even with the .htaccess and extensions enabled. Not sure how the changes to comments in 2.1.4 all of a sudden interfered with that code, but it did.

    Thanks everyone for all the help.

  • #35 / Mar 06, 2011 1:52pm

    Greg Salt

    3988 posts

    Hi Trevor,

    Glad that you got this figured out.

    Cheers

    Greg

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

ExpressionEngine News!

#eecms, #events, #releases