I have a bug/question that I'm not sure anyone can help with. I've been debugging for hours and hours and overall it makes no sense.
I have a content type called 'program'. In this content type I have a node reference drop-down for another type called 'series'. This field is called field_series. My user has permission to 'create program' and 'create series'. However, when going to create a new program, this series field doesn't show up.
This field will only show up if I give the permission of 'edit program'; then it shows up fine. But I don't want this role to have that permission.
Now the plot thickens. I can create a new node reference field, also referencing the series content type. This field will be called 'field_series_0' for example. With the same permissions applied ('create program' and 'create series'), THIS node ref field will show up but the other one won't.
I bet you will ask if I have custom modules hiding this field or cck field permissions installed. The answer is, yes, at one point I did have cck field permissions installed. However, the same behavior was occurring even with that installed. This field was only showing up when the 'edit program' permissions under 'node permissions' was checked. And I have also removed cck field permissions in an attempt to get to the bottom of this issue.
Next you will suggest that it doesn't matter since field_series_0 will work just fine. However, my site is pretty big, and I have tons of custom coded pages and other modules referencing this particular field. It would take sooooo long to try to locate all the references to this field. However, none of my custom code or modules does any kind of alteration to this field.
So it seems like this is just a random buggy behavior or something. Any ideas what else I could try to do to figure this out and get this field working without applying the 'edit program' node permission? Is there any debugging methods I can use to try to figure out where this is going wrong?
Comments
Comment #1
emilyf commentedAlso, I have tried deleting that field and recreating it with the same name, but this doesn't help anything. What I don't understand is how the 'edit program' permission could be affecting this single field. It's mind-boggling, especially since I am CREATING a program when this is happening, not editing it!
Comment #2
emilyf commentedAfter a few days of troubleshooting this one and meticulously going through backups, I finally figured out what the problem was. I hope some other confused person like myself will someday find this helpful.
I am using uc_node_checkout for some custom hacks, and on that settings page there is options to restrict fields based on the 'edit content type' permission. i had totally forgot about this. now i wonder why this setting is even there after all this trouble, but all that really matters is that's the fix.