[support] Disappearing CCK fields - SOLVED!!

Neil Coghlan neil at esl-lounge.com
Sat Jun 19 16:47:22 UTC 2010


I discovered what it was although I don't understand why!

the custom module with the form_alter. At some point between june 3 and june 18, its weight was altered from 0 to -99. Once I put it back to 0, everything came back to normal, the cck fields appeared again on the node create form and the custom module did its work.

I'm not too clear on module weights so I'm not sure why that would have had such a dramatic effect.

anyway, 5 hours, yes FIVE, of deleting the db, reinstalling old backups and poring over lines of code to see differences has come to an end by changing one integer.

you gotta love db-driven websites!! :-)
  ----- Original Message ----- 
  From: Neil Coghlan 
  To: support at drupal.org 
  Sent: Saturday, June 19, 2010 1:13 PM
  Subject: [support] Disappearing CCK fields


  I have a content type with three CCK fields: description, address and type. I have made a custom module with form_alter changing certain aspects of these fields on the node create form...wrapping them in a css class, altering the description, weight, etc.

  I noticed today that the custom module was not only not having an effect but that the CCK fields themselves had disappeared from the node create form. Odd! I disabled the custom module and back they came. 

  then I rolled the database back about 10 days, reinstalled the custom module and everything was working fine. So now I am trying to work out what is different between the june 3rd sql dump and the june 18th sql dump and it's driving me crazy. I don't think the custom module is the problem as it's just a 10 line form_alter function that was working perfectly until some point between june 3rd and 18th.

  The other thing is in that custom module, today I put the following to find out what fields/variables were in the form:

    print $form_id;
    $form['form_array'] = array(
      '#value' => '<pre>'. print_r($form, 1) .'</pre>',
      '#weight' => '99',
    );

  with the june 3rd sql dump, I'm getting all the CCK fields printed below, showing me all the arrays and variables I can access and alter. In the june 18th sql dump, none of that is coming up at all. It's as if they don't exist. When I go to Content Types, everything is normal, the fields are there, etc.

  Has anyone heard of something like this before? Any clues where I could start looking?

  Neil


------------------------------------------------------------------------------


  -- 
  [ Drupal support list | http://lists.drupal.org/ ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20100619/f8067da5/attachment.html 


More information about the support mailing list