Hi,

when saving the "Display fields" settings at admin/content/types/{content-type}/display, I'm getting the following error message:

warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/cck/content_admin.inc on line 418.

I'm not sure at the moment if this warning indicates something harmful.

Thanks & greetings, asb

Comments

martin87’s picture

Hello,

I have exactely the same problem, and can't find any solution for the moment ...

Does anyone know how to resolve it ?

Martin

zbombicz’s picture

Hi. I have exactely the same problem ...

Any solution?

bimbo

summit’s picture

Version: 5.x-1.6-1 » 5.x-1.7

Subscribing, also in version 1.7.
Greetings Martijn

sonden’s picture

Same Issue here.

I have the strong suspicion that it has to do MySQL 4.X. Myself i am using version 4.0.27.

Any hint would be appreciated!

sonden’s picture

I upgraded to MySQL 5 and the problem still persists.

Error Code:
warning: Invalid argument supplied for foreach() in /XXX/modules/cck/content_admin.inc on line 418.

sonden’s picture

Priority: Normal » Critical
sonden’s picture

I got around this problem, but i still have other issues with CCK, so i am not sure if it is actually solved.

Here the scenario:

I installed the CCK Link field under MySQL 4 but ran into the described problem. When i tried to remove link fields from the manage fields section they were sill showing up in the display fields section as hidden. I tried all different kind of configurations but it simply wouldn't work out.

For i had several problems with my outdated MySQL database i thought that could be one of them and decided to upgrade to MySQL 5.0. The problem still persisted.

So i went on searching for the hidden fields under phpadmin and delete them. then i reinstalled the link module and everything works smooth now.

But i got a new problem with cck now. Maybe it's connected to the described problem, this is why i post the error message: "warning: array_keys() [function.array-keys]: The first argument should be an array in /XXX/modules/content_taxonomy/content_taxonomy_activeselect.module on line 264."

Hope that helps anybody of you!

iaminawe’s picture

I have the same problem as described above
all/modules/cck/content_admin.inc on line 418

I have just updated the link module and suspect that it might be related to this error.

I also have been receiving that active select issue usually when someone has not used the active select available on a content type. Even if the field is not required it still kicks up this error until a selection is made and the error seems to go away. Hope that helps.

Leeteq’s picture

Subscribing.

CeRBeR_666’s picture

Same problem

glass.dimly’s picture

I have this same error, but I don't use the link module. My problems appeared after enabling Content Taxonomy after disabling Taxonomy Super Select Ultra, but that's obviously not the same as other's problems, so I would believe the problem to be located in cck.

I'll post more as I explore the problem.

-glass.dimly

karens’s picture

Status: Active » Fixed

This message is caused by field modules that don't define formatters or have a problem with formatter info. All the core CCK fields define formatters, so it is coming from non-core CCK fields. Start by making sure you're using the very latest version of those modules, in case the problem has already been fixed and if you still have trouble, disable non-core CCK modules one at a time and check for the error to figure out which one is causing it, and file an issue on the issue queue of the module that's creating the problem.

In some cases you can tell from the message which module is causing the problem (like the message that says 'content_taxonomy_activeselect.module').

mizengineer’s picture

Definitely not an issue w/ mysql version. I agree w/ KarenS - and think that it has to do with the numeric/integer field definition. I turned it on in the cck/modules section but it is not appearing as a field option when I try to add a field.

It seems that when I originally uploaded the CCK module on the server, something went awry.

HOW I FIXED IT: (after 4 hrs :( of trying to figure it out )

Deleted the server copy, uploaded a fresh copy, and the integer field appeared as it should! Warning gone, everything good for now ...

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

theusualsuspect’s picture

Same problem here.. Did anyone finde the real problem now?

cgjohnson’s picture

same here

danielb’s picture

Status: Closed (fixed) » Active

Same problem on a new drupal 5 site

Guys do you have the Location.module ? I suspect it ?? Other than that I have link.module and email.module cck fields

karens’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Closed (won't fix)

Read #12, this is coming from someplace other than core CCK so there is nothing we can do. You must take the steps in #12 to figure out where it is coming from.

Location.module, link.module, and email.module are all non-core CCK modules that have their own issue queues, so if those modules have problems the problems need to be reported there.

danielb’s picture

I'm not blind, what do you want me to do, start separate threads in all the issue queues for all the CCK modules I have, whilst everyone is subscribed here?

karens’s picture

That's how the issue queues are supposed to work.

This queue is for things that need to be fixed in CCK. Things that need to be fixed in other modules need their own issues in their own queues. Talking about problems in the location.module in this queue is pointless -- we can't fix it here and the information in this queue won't be seen by the maintainer of the location module, so it won't get fixed there either. Ditto for any other module that has problems.

There are hundreds of issues in our issue queue and it's hard enough to stay on top of it without having it full of issues that belong in other places. We have to close issues that don't belong here or we have no way to stay on top of the things we do need to fix.

danielb’s picture

Yeah fair enough - it does get in the way of other active issues. I guess I will actually have to investigate this. Was hoping some of the subscribed people would reply, we'd find the offending CCK module, and move this issue over there. Sorry bout this.

kingyann’s picture

got the exact same problem.
Error caused by imagecache and thickbox. Installing the right version removed the error

Stitchard’s picture

I got the same message and I manged to solve it. Basically I had disabled a cck module (user reference module to be precise) without deleting the field type from my node type first. I simply re enabled the cck node I had previously wanted to use, then deleted the field type from my node type, and then disabled once more the module - Problem solved! Can't guarantee it'll work for everyone, but certainly did the job for me.

pfeff’s picture

I had similar problems to this. Turns out the reason was I'd deleted the anonymous user - uid=0.

I installed this module which creates uid=0 if it doesn't exist. Fixed the problems.

http://drupal.org/project/anonymous_user

proser’s picture

I got this same error message after I had installed new version of CCK. Clearing the site cache solved the problem.

kkobashi’s picture

Got same error with new version of CCK and spent a good day trying to figure out what was going wrong.
proser is correct, a good clearing of the cache fixes it.

For example, if you are using the emfield module, you won't see any video content showing up on your site.