Forum for discussing general topics related to Couch.
6 posts Page 1 of 1
So I tried messing around with my templates and it went horrendously, I ended up having to delete them and reinstall the extended user addon. The only problem is now when I go to the "edit profile" page I'm getting this error:


Code: Select all
Access Denied
You do not have sufficient privileges to view the page requested.



And when I visit the page as super admin I get the error:

Code: Select all
ERROR: Tag "form" - page_id required


I have not set any privileges whatsoever. I have seen multiple people have had this problem but I haven't seen an answer as of yet. I know I've been posting a lot but I'm at a complete dead end here :cry:
This description is too vague to comment upon. If you could probably share some code, it will be helpful. Trying to solve this problem would be like shooting in the dark with ones eyes covered!

Please share excerpt of code that you feel creates the issue.

Regards,
GenXCoders
Image
where innovation meets technology
genxcoders wrote: This description is too vague to comment upon. If you could probably share some code, it will be helpful. Trying to solve this problem would be like shooting in the dark with ones eyes covered!

Please share excerpt of code that you feel creates the issue.

Regards,
GenXCoders



To be honest I have no idea where the error is coming from, I've read the code up and down a million times and can't find the problem. I might just have to reinstall Couch and start again. This is the page that's causing problems (profile.php), it's essentially the same code as the tutorial, with a few extra fields - thanks for looking into it again :)


Code: Select all
 

<?php require_once( '../couch/cms.php' ); ?>
    <cms:template title='User Profile' hidden='1'  />
   
    <!-- this is secured page. login first to access it -->
    <cms:if k_logged_out >
        <cms:redirect "<cms:login_link />" />
    </cms:if>
   
    <!-- someone who manages to reach here is certainly a logged-in user -->
    <h2>Edit profile</h2>
   
    <!-- are there any success messages to show from previous save? -->
    <cms:set success_msg="<cms:get_flash 'success_msg' />" />
    <cms:if success_msg >
        <h4>Profile updated.</h4>
    </cms:if>

    <!-- show the edit form -->
    <style>
        form{ width:400px; }
    </style>
           
    <!-- this ia regular databound-form -->
    <cms:form
        masterpage=k_user_template
        mode='edit'
        page_id='k_user_id'
        enctype="multipart/form-data"
        method='post'
        anchor='0'
        >
       
        <cms:if k_success >
            <cms:db_persist_form />

            <cms:if k_success >
                <cms:set_flash name='success_msg' value='1' />
                <cms:redirect k_page_link />
            </cms:if>
        </cms:if> 
       
        <cms:if k_error >
            <font color='red'><cms:each k_error ><cms:show item /><br /></cms:each></font>
        </cms:if>
       
       
        DisplayName:<br />
        <cms:input name='k_page_title' type='bound' /><br />

        E-mail:<br />
        <cms:input name='extended_user_email' type='bound' /><br />

        New Password: (If you would like to change the password type a new one. Otherwise leave this blank.)<br />
        <cms:input name='extended_user_password' type='bound' /><br />

        Repeat Password:<br />
        <cms:input name='extended_user_password_repeat' type='bound' /><br />
       
     
       
        About Me: Tell us a bit about yourself!<br  />
        <cms:input name='aboutme' type='bound'  /><br />

          Phrase: give us a catchy phrase!<br  />
        <cms:input name='phrase' type='bound'  /><br />
       
        <input type="submit" name="submit" value="Save"/>   
       
    </cms:form>   

    <!-- give an option to logout -->
    <a href="<cms:logout_link />">logout</a> 

<?php COUCH::invoke(); ?>
For starters, k_page_id is a variable, so remove quotes
Code: Select all
page_id='k_user_id' => page_id=k_user_id

My Documentation, Addons, Functions.
Join COUCH:TALK telegram channel
trendoman wrote: For starters, k_page_id is a variable, so remove quotes
Code: Select all
page_id='k_user_id' => page_id=k_user_id



Oops good catch, hasn't fixed the problem though unfortunately. I've been trawling through my files forever now, reinstalled the extended users module 3 times and nothing's working. I think I will just have to reinstall everything and go from there, seems like I've just broken my site beyond repair :lol: Thanks guys :D
SOLVED IT!

For anyone in future having this problem, I had to make sure all the fields were filled out for the super admin's account using the admin panel - then I visited profile.php as super admin and now it's working for all users. What a nightmare that was, a lot of time and frustration for a very simple error. Thanks for your help guys.
6 posts Page 1 of 1