Download & Extend

No tab for user/x/edit when module is enabled

Project:Node Profile
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active

Issue Summary

After create profil (during registration), user logged, in own account can only see in the area profile only the tab View and not also Edit; so cannot to change own profile.

I also assigned all perm "admin user" and "access user profile" but not work.

Only admin can see also Edit tab in own area profile.

Comments

#1

I saw the same behavior with the 1.4 version (it did not happen in 1.3). It seems to break the user profile edit page so that users cannot edit anything.

#2

Title:not have Edit tab» No tab for user/x/edit when module is enabled

I should also note that going to user/x/edit directly (by typing in the URL) results in a blank form with only submit buttons.

#3

Priority:normal» critical

I have also duplicated these results.

I have a "user_no_application_form" role that I use with Workflow-ng. The role is automatically added to any user that edits their profile and DOES NOT have an application form. (in this case the user removes the application form or the account was created by admin). There is also a rule that removes the role if the application form is created.

Under normal circumstances all auth users have "edit own application form content" enabled. in this case if a (any user) has an application form, they should be able to edit it using the following link:

/user/[uid]/edit/user_profile?destination=user%2F[uid]

This appears to only be the case if the user is granted (for any reason) the "create application form" permission.

#4

After messing around with the user permissions for ages and not seeing the functionality that I used to, I started checking down other avenues.

I found out that whilst the "edit" tab was no longer available to the user - they DID have permission to view/edit their application form.

So I created a themed page for the user account (user_profile.tpl.php) and then added the following code

<?php
print ('<ul>');

//The next line looks for the link to view the application form in $fields and replaces the content.  Not fantastic as it relies heavily on the name of the content type that you are using

print ('<li id="userprofile_viewapplication">'.str_replace('>application form<', '><img src="/'.path_to_theme().'/images/vew_app.jpg" alt="View Application Form" height="110" width="110"/><br/>View Application Form<', strtolower($fields[$user_profile]['user_profile']['value'])).'</li>');

//if the user has permission to edit the content then...

if ((user_access('edit user_profile content')) OR (user_access('edit own user_profile content')))
{

//edit the same view and add a "/edit" to the end
//Another option here would be to use imagecache to generate the "icon" for you.  If you don't use imagecache - and really there is no excuse if you dont - then just use a normal image as above.

print ('<li id="userprofile_editapplication">'.str_replace('">application form<', '/edit">'.theme('imagecache', 'user_profile_thumbnail', '/'.path_to_theme().'/images/edit_app.jpg', check_plain('Edit Application Form')).'<br/>Edit Application Form<', strtolower($fields[$user_profile]['user_profile']['value'])).'</li>');

}

print('</ul>');
nobody click here