Postponed (maintainer needs more info)
Project:
CCK Field Privacy
Version:
5.x-1.2
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
23 Aug 2008 at 07:57 UTC
Updated:
29 Dec 2009 at 13:20 UTC
Hi,
I have three custom content types that are associated with a user profile using node profile. I tried to apply privacy to the fields of these content types using cck_field_privacy. However i fail to get padlocks besides the fields.
I also have other custom content types and cck privacy seems to be working fine with them. The problem is only with cck types associated to a user profile. Could there be any conflicts? How do i fix this?
Comments
Comment #1
obsidiandesign commentedBy chance, are you using pageroute? I'm noticing a similar issue here on my dev box (custom content types OK, node profile content types not working), and am trying to figure out if pageroute is causing the issue.
Comment #2
gauravkumar87 commentedhi,
no i'm not using pageroute...
jus nodeprofile for profiles....
Comment #3
gauravkumar87 commentedi looked in to this and it might have something to do with node profile changing the form id of the forms of the cck types when select them to be shown as a category on the edit form. The form id of all these forms become 'user-edit' whereas cck_privacy was expecting something lik example-edit (where example is the cck type) in the form_alter hook... any thoughts?
Comment #4
gauravkumar87 commentedComment #5
bduell commentedI added the following:
$node_name_array[0] = $form['type']['#value'];
after the line that reads:
$node_name_array = explode('_', $form_id);
And that fixed this issue with the user profiles for me.
Comment #6
gauravkumar87 commentedhi bduell,
please provide further details.. where did u add this?
Comment #7
gauravkumar87 commentednever mind...
thanks a lot :) ...
will submit a patch file for this...
Comment #8
gauravkumar87 commented@obsidiandesign,
your module breaks in the hook_form_alter implementation.
Supposing the name of the content type is foo_bar , in that case $node_name_array is populated with
[0] => foo
[1] => bar
[2] => node
[3] => form
cck_field_privacy expects the name of the content type to be present in $node_name_array[0] which is not the case in the above example.
As, Bduell suggested
overwrites $node_name_array[0] with foo_bar (the node type).
And this serves as a temporary fix.
Will try and fix this and submit a patch.
Comment #9
obsidiandesign commentedAt least with nodeprofile, part of the issue is the fact that things are not consistent - sometimes it's nodeprofile, others come up node_profile, which are confusing the script as well. Using pageroute, there doesn't seem to be a $form['type'] array, so there's still some cases to investigate/fix, although this is a helpful interim step.
Comment #10
gauravkumar87 commentedwill look into pageroute and cck field privacy.. lets see what turns up...
Comment #11
obsidiandesign commentedCan anyone confirm that this is still an issue?
Thanks,
Bryan
Comment #12
socialnicheguru commentedi am trying to use this module myself on nodeprofiles.
I do not see the padlocks.
I am also using content template to create a custom theme. is there something else I need to do?
is the privacy element around the field or the content[field] combination?
Thanks,
C
EDIT: I just took a look on Garland and I did not see the padlocks or any other way to signify privacy.
1. installed the module
2. went to content-> content field privacy and specified the private fields
is there anything else?
Comment #13
socialnicheguru commentedThis is still an issue. Padlocks do not show up on individual cck fields.
I also get two padlocks for the fieldset
If the fieldset is collapsable, the padlocks for the fieldset do not pop up a privacy screen. Instead they just open or close the fieldset
Comment #14
saritha.peddapuli commentedHi,
How can we use cck field privacy module for node profile fields.
Thanks in advance.