Problems, need help? Have a tip or advice? Post it here.
7 posts Page 1 of 1
Hi there :)

I'm trying to get my registration databound form working. It seems to be working fine on my local machine, but now that I uploaded it to the final server, I came across the following error message on users/register.php. Which is pretty much a copy of the extended user tutorial.

Code: Select all
ERROR: Tag "input" of type 'bound' needs to be within a Data-bound form


This is my code of the users/register.php page:

Code: Select all
<?php require_once( '../admin/cms.php' ); ?>

<cms:template title='Registration' hidden='1' />

<cms:embed 'header.html' />

<body>

   <cms:if k_logged_in >
      <!-- what is an already logged-in member doing on this page? Send back to homepage. -->
      <cms:redirect k_site_link />
   </cms:if>

      <main>
         <div class="single-wrapper">
            <div class="single-wrapper-inner">
               <h2>Register</h2>
            </div>
   
            <div class="intro-wrapper">
               <!-- are there any success messages to show from previous actions? -->
               <cms:set success_msg="<cms:get_flash 'success_msg' />" />
               <cms:if success_msg >
                  <div class="notice">
                     <cms:if success_msg='0' >
                        Your account has been created successfully and we have sent you an email.<br />
                        Please click the verification link within that mail to activate your account.
                     <cms:else />
                        Activation was successful. You can now log in!<br />
                        <a class="btn" href="<cms:login_link redirect=k_site_link />">Login</a>
                     </cms:if>
                  </div>
               <cms:else />
      
               <!-- now the real work -->
               <cms:set action="<cms:gpc 'act' method='get'/>" />
               
               <!-- is the visitor here by clicking the account-activation link we emailed? -->
               <cms:if action='activate' >
                  <h1>Activate account</h1>
               
                  <cms:process_activation />
                  
                  <cms:if k_success >
                      <cms:set_flash name='success_msg' value='2' />
                      <cms:redirect k_page_link />         
                  <cms:else />
                     <cms:show k_error />
                  </cms:if>
               
               <cms:else />
               
                  <!-- show the registration form -->
                  <cms:form
                     masterpage=k_user_template
                     mode='create'
                     enctype='multipart/form-data'
                     method='post'
                     anchor='0'
                     >

                     <cms:if k_success >       

                        <cms:check_spam email=frm_extended_user_email />           

                        <cms:db_persist_form
                           _invalidate_cache='0'
                           k_page_name = "<cms:random_name />"
                           k_publish_date = '0000-00-00 00:00:00'
                        />                   

                        <cms:if k_success >
                           
                           <cms:send_mail from="<cms:php>echo K_EMAIL_FROM;</cms:php>" to=frm_extended_user_email subject='New Account Confirmation' debug='1'>
                              Please click the following link to activate your account:
                              <cms:activation_link   frm_extended_user_email   />

                              Thanks,
                              Website Name
                           </cms:send_mail>                       
                                             
                           <cms:set_flash name='success_msg' value='1' />
                           <cms:redirect k_page_link />
                        </cms:if>
                     </cms:if>

                     <cms:if k_error >
                        <div style="color:red;margin-bottom:5px;"><cms:each k_error ><cms:show item /><br /></cms:each></div>
                     </cms:if>       

                     <label class='long' for='k_page_title'>Name:</label>
                     <cms:input name='k_page_title' type='bound' style='width:200px' />
                     
                     <label class='long' for="extended_user_email">Email:</label>
                     <cms:input name='extended_user_email' type='bound' style='width:200px' />
                        
                     <label class='long' for='extended_user_password'>Password:</label>
                     <cms:input name='extended_user_password' type='bound' style='width:200px' />
                     
                     <label class='long' for='extended_user_password'>Repeat password:</label>
                     <cms:input name='extended_user_password_repeat' type='bound' style='width:200px' />     
                     
                     <input type='submit' name='submit' value='Register'/>       

                  </cms:form>
               </cms:if>
            </cms:if></div>
         </div>
      </main>
   
   <cms:embed 'single-header.html' />

   <cms:embed 'footer.html' />
   
<?php COUCH::invoke(); ?>


Am I missing something? Thanks in advance!
Please make sure that your main extended-user template (users/index.php in the tutorial) is properly registered. You should be able to see it in admin-panel sidebar.
If not, access it first as super-admin to register it.

If, however, it is already registered then check the config file in extended users folder to see if the correct name of the template has been assigned there.

Hope this helps.
KK wrote: Please make sure that your main extended-user template (users/index.php in the tutorial) is properly registered. You should be able to see it in admin-panel sidebar.
If not, access it first as super-admin to register it.

If, however, it is already registered then check the config file in extended users folder to see if the correct name of the template has been assigned there.

Hope this helps.


I get a 404 when viewing it (users/index.php) however the template is visible in the admin-panel. It worked fine local. Also, the config file seems fine as well. What to do?
If prettyURLs are turned on, please turn them off temporarily from Couch config.
Try accessing users/index.php now.

If that doesn't help, PM me the FTP+Couch creds and I'll take a look at the issue.
KK wrote: If prettyURLs are turned on, please turn them off temporarily from Couch config.
Try accessing users/index.php now.

If that doesn't help, PM me the FTP+Couch creds and I'll take a look at the issue.


Unfortunately it doesn't. I sent you a PM :)
Thanks.

I had a look and found that the 'users/index.php' was inaccessible (throwing HTTP 500 error) and hence not registered properly (reason why it was still visible in the sidebar seems to be that this site was migrated using a database dump).

It was throwing the error on account of the following line of PHP in it -
Code: Select all
<?php require_once( 'admin/cms.php' ); ?>

Since the template was in a sub-folder, the correct path would be this -
Code: Select all
<?php require_once( '../admin/cms.php' ); ?>

I made the change and now the registration template seems to working fine to me.

Hope this helps.
Hi KK, thanks a million! :D
7 posts Page 1 of 1

Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 6 guests