Help - Search - Members - Calendar
Full Version: Registration Does Not Appear, Just Form
Movable Type Community Forum > Using Movable Type > Commenting System
KCDTX
I upgraded to MT4 and cannot seem to get the registration link to appear for comments. I have removed my previous MT3 comment blocks from the archive template and replaced them with the code I copied and pasted after creating a new blog on the system (comment form/registration works flawlessly with a new blog on this install).

I *presume* I'm missing a JS library call or something, but I cannot seem to locate the code that I'm missing when I compare source on each.

Suggestions?

------------------
UPDATE: I was just missing the library, so I put mt.js in my blog's home directory and the sign in option is showing up smile.gif

One problem now, the comment form is always showing, too. I only want the registration link to appear if someone is logged out. How do I go about setting the comment form to ONLY display if someone is logged in.

(I have registration options set to MT and OpenID only)
KCDTX
Another update (and a bump biggrin.gif )

I swapped out the link from the js to the js from a new system blog, and the registration links are appearing, just as before. So the js portion is working properly; however, the form is still showing up EVERY SINGLE TIME. GRRR! Must be something in my template, but all I did was copy & paste the default comment form template exactly from a new system blog (and it is working correctly there!). VERY FRUSTRATING!!!

Here's my template:
CODE
<MTEntryIfCommentsOpen>
<div class="comments-open" id="comments-open">
    <h2 class="comments-open-header">Leave a comment</h2>
    <div class="comments-open-content">
    <MTIfRegistrationAllowed>
            <div id="comment-form-external-auth">
                <script type="text/javascript">
                <!--
                <MTIf name="comment_preview_template">is_preview = true;</MTIf>
                writeCommenterGreeting(commenter_name, <$MTEntryID$>, <$MTEntryBlogID$>, commenter_id, commenter_url);
                //-->
                </script>
            </div>
    </MTIfRegistrationAllowed>
        <form method="post" action="<$MTCGIPath$><$MTCommentScript$>" name="comments_form" id="comments-form" onsubmit="if (this.bakecookie.checked) rememberMe(this)">
            <input type="hidden" name="static" value="1" />
            <input type="hidden" name="entry_id" value="<$MTEntryID$>" />
            <input type="hidden" name="__lang" value="<$MTBlogLanguage$>" />
            <div id="comments-open-data">
                <div id="comment-form-name">
                    <label for="comment-author">Name</label>
                    <input id="comment-author" name="author" size="30" value="<MTIf name="comment_preview_template"><$MTCommentAuthor encode_html="1"$></MTIf>" />
                </div>
                <div id="comment-form-email">
                    <label for="comment-email">Email Address</label>
                    <input id="comment-email" name="email" size="30" value="<MTIf name="comment_preview_template"><$MTCommentEmail encode_html="1"$></MTIf>" />
                </div>
                <div id="comment-form-url">
                    <label for="comment-url">URL</label>
                    <input id="comment-url" name="url" size="30" value="<MTIf name="comment_preview_template"><$MTCommentURL encode_html="1"$></MTIf>" />
                </div>
                <div id="comment-form-remember-me">
                    <label for="comment-bake-cookie"><input type="checkbox" id="comment-bake-cookie" name="bakecookie" onclick="if (!this.checked) forgetMe(document.comments_form)" value="1" />
                        Remember personal info?</label>
                </div>
            </div>
            <div id="comments-open-text">
                <label for="comment-text">Comments <MTIfAllowCommentHTML>(You may use HTML tags for style)</MTIfAllowCommentHTML></label>
                <textarea id="comment-text" name="text" rows="15" cols="50"><MTIf name="comment_preview_template"><$MTCommentBody autolink="0" sanitize="0" convert_breaks="0" encode_html="1"$></MTIf></textarea>
            </div>
            <MTIfNonEmpty tag="MTCaptchaFields">
            <MTIfCommentsAccepted><MTIfRegistrationAllowed><MTElse><$MTCaptchaFields$></MTIfRegistrationAllowed></MTIfCommentsAccepted>
            <div id="comments-open-captcha">
            </div>
            </MTIfNonEmpty>
            <div id="comments-open-footer">
                <input type="submit" accesskey="v" name="preview" id="comment-preview" value="Preview" />
                <input type="submit" accesskey="s" name="post" id="comment-submit" value="Submit" />
    <MTIf name="comment_preview_template">
                <input type="button" name="cancel" id="comment-cancel" value="Cancel" onclick="window.location='<$MTEntryPermalink$>'" />
    </MTIf>
            </div>
        </form>
    </div>
</div>
</MTEntryIfCommentsOpen>


In the blog registration settings, I have ALLOW REGISTRATION, Movable Type Native & OpenID. Help!
KCDTX
OK. I now think the form is showing up all the time because the Javascript is not displaying correctly. Not sure. HELP!
jstana
Sure javascript controls the function which displays the comment form -- "showAnonymousForm();" , but form display is set in the dashboard by: [ blog/preferences/blog settings/comment settings ] screen.

Set the commenting policy under "Immediately approve comments from" to "No one".
KCDTX
QUOTE (jstana @ Aug 27 2007, 07:41 PM) *
Sure javascript controls the function which displays the comment form -- "showAnonymousForm();" , but form display is set in the dashboard by: [ blog/preferences/blog settings/comment settings ] screen.

Set the commenting policy under "Immediately approve comments from" to "No one".


No change. I now have it set to "No one". Signed out. Signed out on the comment form. Dumped cache. Restarted browser. No luck. Still showing form.
jstana
KCDTX,

I had the same trouble until I de-activated User Registration at the system level. I am the only poster. This disallowed User Registration at the Blog level and allowed the hiding of the comment form. I also turned on anonymous comments with email address required. Since anonymous commenting requires a release before publication, this works for me.

However, today reactivating system wide registration and blog level registration does not break the form hide function. So it may have something to do with the order of activation or a need for anonymous authentication. Might be a bug or (?).

Good luck.
KCDTX
QUOTE (jstana @ Aug 28 2007, 04:33 PM) *
KCDTX,

I had the same trouble until I de-activated User Registration at the system level. I am the only poster. This disallowed User Registration at the Blog level and allowed the hiding of the comment form. I also turned on anonymous comments with email address required. Since anonymous commenting requires a release before publication, this works for me.

However, today reactivating system wide registration and blog level registration does not break the form hide function. So it may have something to do with the order of activation or a need for anonymous authentication. Might be a bug or (?).

Good luck.


Still no resolution. I cannot hide the comment form and make people register. sad.gif
PeteSwann
I'm also having the same issue. This is with the default theme on my server. The javascript is loading, and so does the form! I've tried disabling comments alltogether, but even with all of that turned off (and registrations disabled), the form continues to show.

Thanks smile.gif
KCDTX
Su-

Can you shed any insight? The commenting system is working correctly for templates on my install using static pages, default templates in other blogs.

I must have something set incorrectly with static pages, custom templates.... although I have cut and paste comment form, comment detail, etc... exactly from the default templates.

It currently shows the javascript.....
"Sign in to comment, or comment annonamously" (spelling)
and then the form

even though I have annonymous comments off (in the authentication).

I want it to say.... "You must sign in to comment" and not show the form unless they are signed in.

Thoughts?
BaskingShark
KCDTX,

I just went through the same process trying to get a nearly exact copy of the comments form module working in a new set of templates. After taking a look at the javascript, I noticed that the key function wasn't being called in my version and I needed to make sure the proper "onload" command was in place. Take a look at your header template and see if your body tag looks like this:

CODE
<body<mt:If name="body_onload"> onload="<$mt:GetVar name="body_onload"$>"</mt:If>>


If you are still having problems, make sure you haven't renamed the div ids within the form since the javascript depends on those names to hide the appropriate portions.

Jonathan
jstana
Something else to add:

Recently, I added a plugin to my blog which included a javascript template. Working through some of the kinks in the plugin, I chanced to save the javascript template as a javascript template (instead of the default custom index template). Some time later, got the plugin to work, but noticed after awhile, that the comments form was always present, instead of the hidden-until-called-for method.

Re-saving the plugin's javascript template as "custom index template" returned the hidden until requested nature of the comments form.

FYI
KCDTX
QUOTE (BaskingShark @ Oct 3 2007, 03:54 PM) *
KCDTX,

I just went through the same process trying to get a nearly exact copy of the comments form module working in a new set of templates. After taking a look at the javascript, I noticed that the key function wasn't being called in my version and I needed to make sure the proper "onload" command was in place. Take a look at your header template and see if your body tag looks like this:

CODE
<body<mt:If name="body_onload"> onload="<$mt:GetVar name="body_onload"$>"</mt:If>>


If you are still having problems, make sure you haven't renamed the div ids within the form since the javascript depends on those names to hide the appropriate portions.

Jonathan


That worked perfectly for me. I must have missed that in re-building my templates to match the defaults.
keightb
I've been struggling to figure out why the comment form wasn't appearing at all on comment previews (though it was visible in the source) and it was the onload code I was missing. I'm glad I browsed through this thread even though it didn't sound like my problem at all. Thanks!

Just a tip in case anyone else makes this mistake.
oktobernight
I get the comment form as well, even though anonymous comments are turned off. There are several things which make this really quite bizarre:

- When I'm logged in, it displays the form, but regardless of what information I enter in the form, it registers the comment to my logged in name.
- If I am not logged in, it displays the link to sign in. After I sign in, it displays the name/email form again. If I enter a comment at this point, regardless of what information I enter in the form, it registers the comment to my logged in name.
- This only occurs in Firefox, not in Internet Explorer
- This only occurs in ONE of my blogs. I currently am running two blogs, both with refreshed templates of the 'Community Blog' type, fresh from an upgrade -- I have not made any changes to the templates following the refresh. I've ensured they both have the same settings related to comments (no registration allowed, no anonymous comments, comments by MT allowed).
The only distinction between the two blogs themselves is that one is running in a subdirectory, and one is running on a subdomain -- the one on the subdomain is the one which doesn't work. If I reconfigure the blog to run in a subdirectory of the server, instead of a subdomain, it works.

Both blogs have had the sites published. I've cleared the browser cache, logged out, restarted the browser, and it's consistently repeatable and bewildering.

I'd say it's some failing of javascript, with a location being interpreted differently through IE and FF, but...?! where/how... any ideas?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.