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

YesCT - July 3, 2009 - 05:58

sub

#2

YesCT - July 3, 2009 - 06:29

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?

AttachmentSize
ccktype.jpg 78.8 KB
ccktype2.jpg 53.25 KB
contenttype-cp-settings.jpg 100.24 KB
contenttype-cp-settings2.jpg 76.53 KB
cp_title_no_other_fields.jpg 127.88 KB
permissions.jpg 87.04 KB
permissions2.jpg 81.53 KB
permissions3.jpg 68.51 KB

#3

YesCT - July 3, 2009 - 06:37

actually, the cck fields are not showing on just editing either. What did I do wrong?

AttachmentSize
nocckfieldsatediteither.jpg 86.99 KB

#4

YesCT - July 3, 2009 - 07:12

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

highvoltage - July 3, 2009 - 13:40

YES!!! Hahaha, wow, it just didn't occur to me to give permissions to anonymous users. Duh. x_x

Thanks YesCT.

#6

abraham - July 6, 2009 - 19:48
Status:active» fixed

#7

System Message - July 20, 2009 - 19:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#8

hefox - August 7, 2009 - 16:21
Title:Not showing on registration form» Add warning for content_permisions and field permissions when saving
Category:support request» feature request
Status:closed» active

Considering I'm not the only one who's forgot this, could this warning be added in?

patch attached

<?php
   
if (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.

AttachmentSize
content_profile_registeration_warning.patch 977 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.