After adding a Node in CCK field and create a node of that type, a warning is generated:

warning: Invalid argument supplied for foreach() in /var/www/vhosts/domain.com/httpdocs/sites/all/modules/cck/content.module on line 1284.

Comments

mattyoung’s picture

how does the bug reveal itself?

mattyoung’s picture

Status: Active » Postponed (maintainer needs more info)

~

webavant’s picture

It happened every time when simply viewing the node.

mattyoung’s picture

Status: Postponed (maintainer needs more info) » Active

Make sure the node id you enter in the nodeincck field is correct. You will get this error if you enter a non-existing node id.

Let me know if this is the problem.

arnaldex’s picture

Same here. I'm using this for a legal note in "profile" content type from "content profile" module. After user registration de message appears.

mattyoung’s picture

Is the node id you enter correct? Please double check. If the id is wrong, then that what will result.

Ideally, the node id input is like the Node reference module: automatic and cannot be wrong. But I don't have free time to implement here.

guypaddock’s picture

StatusFileSize
new695 bytes

For me, this is caused by using the "Auto Node Title" module with the "Multistep" module. The patch for this is attached. Apparently, the Auto Nodetitle module causes all fields to be rendered, but the "NodeInCCK" field might not have information at the time of rendering.

guypaddock’s picture

Status: Active » Needs review
mattyoung’s picture

I applied the change and checked that in. Get the latest 'dev' and try. This update includes this issue and #674982: Token support.

francewhoa’s picture

I can confirm this issue using
http://drupal.org/project/auto_nodetitle module version 6.x-1.2
http://drupal.org/project/nodeincck module version 6.x-1.0-beta1
Drupal 6.16

I'll try the dev version. Then post result here.

francewhoa’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

Confirming that 6.x-1.x-dev (2010-Apr-09) works. I noticed that the token option is now available under global settings.

francewhoa’s picture

Status: Reviewed & tested by the community » Needs work

I take that back ;) it fix the issue but created a new one.

I'll post steps to reproduce below.

francewhoa’s picture

StatusFileSize
new30.77 KB

Reporting issue with nodeincck 6.x-1.x-dev (2010-Apr-09): Re-ordering nodeincck's field might hide other cck field. This issue was not present in nodeincck 6.x-1.0-beta1

Any volunteer for a patch? I can contribute patch testing.

Steps to reproduce issue
*Create a new content type.
*Add a nodeincck field.
*Add a cck text field.
*Go to 'Manage fields' at admin/content/node-type/*************/fields
*Re-order the fields so nodeincck's field is first then cck's text field second. Find attached screenshot to clarify.
*Create a new node at /node/add
*View the node. The issue is when viewing the node. The nodeincck's field is display but the cck's field is hidden. Expected result is to display both fields.

Using
*Drupal 6.16
*http://drupal.org/project/nodeincck module version 6.x-1.x-dev (2010-Apr-09).
*http://drupal.org/project/auto_nodetitle module version 6.x-1.2
*Content Construction Kit (CCK) 6.x-2.6
*Firefox 3.x

mattyoung’s picture

I'm traveling right now and have no access to my development machine so I can do anything now. I won't be back until after July.

francewhoa’s picture

That's really cool with me Matt. That can wait for when it's convenient for you. Enjoy your travel :)

dspring0021’s picture

Patch in #7 worked for me. Thanks!