The content fields for my content are not showing after I installed the image module. I have uninstalled (including deleting the SQL entry for it) the image module but the fields are still not there. They appear in the "Display fields" page but do not appear in the "Manage fields" or in the node itself.

Could someone help me with this?

Comments

jayjenxi’s picture

This is the error I get in the admin panel:

warning: Invalid argument supplied for foreach() in /home/folder/public_html/modules/cck/content_admin.inc on line 418.

Here's the foreach() argument

  foreach ($field_type['formatters'] as $name => $formatter_info) {
    $options[$name] = $formatter_info['label'];
  }
pcorbett’s picture

I'm having the same issue, but with two of three node reference fields I have. They are missing in Manage Fields, but they appear in the Display Fields page...

pcorbett’s picture

I fixed this by undoing a core change I had made way back where I had increased the "weight" range from -10 to 10 TO -20 to 20. There is code in cck (content_admin.inc I believe) that explicitly uses the -10 to 10 range (not sure why maybe someone can shed light on this).

jayjenxi’s picture

That's good news. Could you guide me through how you did it? I'm not quite sure what you mean by undoing a core change.

pcorbett’s picture

If you haven't changed anything in the core code provided with a default Drupal install, then you're probably not having the same issue I am. I had "hacked" includes/form.inc (I believe) to allow weights to go from -20 to 20 rather than -10 to 10. Have you done this? If not, then this may not help you.

jayjenxi’s picture

No, I haven't done anything to the core. Well, thanks anyway. I really appreciate your efforts.

MrPrise’s picture

Status: Active » Closed (fixed)

I had this error when my content type has CCK fields which I don't currently installed. They remained in the database from the past, but since then I reinstalled my code without wiping out the database. CCK would try to use them from the db, but without the corresponding module installed it is unable to handle them. In my case when I installed the required modules (CCK_fullname and CCK_address), the warnings are gone.

christefano’s picture

This has happened to me, as well, and I concur with MrPrise's explanation.