Closed (fixed)
Project:
Workflow Fields
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
19 Nov 2007 at 21:00 UTC
Updated:
12 Dec 2008 at 08:16 UTC
It works, but firebug throws an error: button has no properties...
redirectFormButton("http://localhost/my_site/?q=imagefield/js", undefined, Object button=#field-picture3-attach-button).
Also make mess with other modules js code (paypalnode). I have 4 single value imagefields and tried to hide 2 of them for some roles when creating node but always get same error no matter what I do. Tried with 'cck_field_perms', custom code... but always the same. I suppose it's because of upload button in imagefield, if you have any idea how to solve this, please help.
Thank you.
Comments
Comment #1
infojunkieHello,
I was unable to reproduce your problem. I installed imagefield.module and added 2 image fields to my test content type. For some workflow state I made one of these fields un-editable, but both the node view and node edit worked without Firebug complaining. I then made the same image field invisible, and got the same result.
Can you plz describe a step-by-step scenario that reproduces the problem, including the needed modules?
Thanks for your help.
Comment #2
baja_tz commentedThanks for your reply. I made 4 single value imagefields, first 2 visible for all, second 2 visible just for certain role, just for creating node not for viewing. When creating content with role which is not suppose to post 4 pictures but only 2, i've got that error. I suppose this part of code in imagefield is still trying to execute:
$form[$fieldname .'-attach-url'] = array('#type' => 'hidden', '#value' => url('imagefield/js', NULL, NULL, TRUE), '#attributes' => array('class' => 'upload'));I made some workaround and added condition
if (imagefield_extra_pics($field, $node )) {before preceding part of code. Created new field (check box) in imagefield, called extra_picture, to be able to assign extra picture property to imagefield while puting it in content type. Than made new user_access('post extra pictures') and this function:And finally:
Eh, for now it works, but i had to change some things in imagefield module which i don't like to do. I'm sure that there is much easier solution but i'm new in Drupal so this is the best I could do. I hope that it helped you to get some idea where the problem is. Modules (last versions):
drupal 5.2
cck
imagefield
paypalnode
Workflow Fields or cck_field_perms
lightbox v2 5.x-2.1
Comment #3
infojunkieI changed the approach to hiding fields since then, so I'm closing this until the issue re-surfaces.