Add warning for content_permisions and field permissions when saving
highvoltage - June 28, 2009 - 00:04
| Project: | Content Profile |
| Version: | 6.x-1.0-beta4 |
| Component: | User registration module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
I've set my content profile type to display on the registration form, but it does not. I'm using logintoboggan, maybe there's a conflict or something there?
Content type settings screen shot:
http://img30.imageshack.us/img30/4081/settings03.png
Registration form screen shot:
http://img30.imageshack.us/img30/3618/register03.png
Absolutely no change to the registration form after enabling the profile to appear on it.

#1
sub
#2
I read a post to add permissions to edit and view the cck fields for the anonymous user. I did this, and I only get the title of the content type that is a content profile. No other fields. What did I do wrong?
#3
actually, the cck fields are not showing on just editing either. What did I do wrong?
#4
OK. I feel silly, and I have no idea how it happened, but I went to the content type I was using for the content profile... and all my cck fields were gone. So I did a bunch of "add existing" and now it works great.
I know I added too many permissins, in trying to get this to work, so I'll have to go back and remove the permissions, leaving just enough.
For the Original Poster, maybe your problem is just needing to add the viewing and editing for the fields for anonymous users?
#5
YES!!! Hahaha, wow, it just didn't occur to me to give permissions to anonymous users. Duh. x_x
Thanks YesCT.
#6
#7
Automatically closed -- issue fixed for 2 weeks with no activity.
#8
Considering I'm not the only one who's forgot this, could this warning be added in?
patch attached
<?phpif (module_exists('content_permissions')) {
$fields = array_keys(_content_profile_registration_get_fields( $form_state['type']));
$account = user_load(0);
foreach ($fields as $key=>$field) {
if (!in_array($field,$form_state['values']['registration_hide']) && !user_access('edit ' . $field,$account)) {
drupal_set_message('Warning, please give anonymous user edit permission for field '.$field,'warning');
}
}
}
?>
view permissions aren't needed to my knowledge; I have fields where users can edit but not view and it's fine XD.