just upgraded site from 4.6 to 4.7.3; i have upgraded numerous other sites, including upgrade of flexinode & existig content types. all have gone smooth.

everything was fine with this upgrade until i created a new content type and tried to use it to create a node. then i got "Warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents/btc/modules/flexinode/flexinode.module on line 571."

i can find nothing useful on Drupal to help me. this is a simple site, almost no 3rd party modules (and few core) in use. webform is fine. my phptemplate theme is fine. only flexinode is busted.

Comments

svendecabooter’s picture

I have the same problem with a fresh Drupal 4.7.3 install + flexinode.
No other contributed modules have been enabled.

As there is a flexinode 4.7 version, this module should be able to work on version 4.7.3 right?

Anonymous’s picture

Title: "create content" gives warning: invalid argument » Having Same Issues with 4.7.3 and Flexinode

I too am having problems with flexinode and 4.7.3. When I try to add fields to a new content type I do not see the proper choices. So in trying to create a dropdown menu there is no place to enter the choices. Then when I try to create an item from my new content type I get the following error:

Invalid argument supplied for foreach() in /path/to/site/modules/flexinode/flexinode.module on line 571.

Line 571 in the code is Implementation of hook_form().

This is a clean install of 4.7.3 that I am working with.

Anonymous’s picture

Title: Having Same Issues with 4.7.3 and Flexinode » Not Working With CVS Either

Just tried the CVS version without luck. In addition to the error, with both 4.7 and CVS, the fields I've created do not show up on the submit form when I try to add a post for my new content type.

ahoeben’s picture

Title: Not Working With CVS Either » "create content" gives warning: invalid argument

Restoring the title of this issue

t.a. barnhart’s picture

Priority: Normal » Critical

i have installed a clean new 4.7.3 on my mac os x (tiger) localhost. only non-core module added: flexinode.

made a test flexi & then tried to create content with it: same error. i had added 4 fields to my test flexi, and i got 4 warnings, all on line 571 of flexinode.module.

4.7.2 works properly

HERE'S SOMETHING NEW

when you add "text area" in 4.7.3, you do not get the "field width" & "height" fields -- you don't get "field width" on any of the screens. the whole flexinode module appears to be crippled under 4.7.3

borghart’s picture

same here: on a fresh 4.7.3 install, creating content of a flexinode-type gives "warning: Invalid argument supplied for foreach() in /data/drupal/modules/flexinode/flexinode.module on line 571." error.

t.a. barnhart’s picture

Title: "create content" gives warning: invalid argument » #5 - sorry, that was dumb

that's Webform i'm thinking of there! but Flexinode is hosed under 4.7.3; the rest of my issue submission stands.

t.a. barnhart’s picture

Title: #5 - sorry, that was dumb » "create content" gives warning: invalid argument

and i did not know i was also changing the issue title....

Stol’s picture

I don't get warning messages. When I want to create content with a flexinode content type the custom fields doesn't show up, only the standard fields.

I run Drupal 4.7.3 on IIS (ISAPI PHP5 en MySQL5)

Stol

ricangroup’s picture

I am having the same problem with Flexinode. I was digging through the PHP code and noticed that in the admin page where you go to add a new field to your content type, once you select the field type and submit, you selection value is supposed to go into the next page in the form into a hidden field called edit['field_type']. However, if you "view source" and look at that hidden field, the value is "" blank. In further looking into the code, the error does not seem to occur from the flexinode module, but from drupal somewhere in the includes/form.inc file. There is a global array that is set called $form_values which is supposed to contain the value $form_values['field_type']. This field is populated from an array $edit which is created from the $_POST. In $edit, there should be a value $edit['field_type'] that sets the $form_values['field_type'], but after the page is submitted, this variable is "" blank. Sorry if this gets confusing for some of you. Just hoping that this give someone familiar with the PHP of flexinode somewhere to start.

ricangroup’s picture

Actually, I just went and copied the includes/form.inc file from Drupal version 4.7.2 and copied it into the 4.7.3 version and flexinode now works fine. (Not sure if this will mess anything else up though)

miccheng’s picture

As far as i know, its caused by the portions that "Save globals in case of indirect recursive call".

Just comment off lines 63, 66 and 168 in misc/forms.inc and it'll work.

** But it did break the File Attachment upload form.

Prob have to modify flexinode.module to cater for this "Save globals" thingy...

darren oh’s picture

Title: "create content" gives warning: invalid argument » In Drupal 4.7.3, New Fields Don't Appear in Submit Form
Component: Miscellaneous » Code

The patch in issue 76904 fixes the problems described in #3 and #9: no flexinode fields displayed in submit form after adding new field.

However, the warning still occurs and new fields do not show up in submit form. I'm changing the title to reflect this issue.

darren oh’s picture

The patch in issue 76904 fixes the problems described in #3 and #9: no flexinode fields displayed in submit form after adding new field. It also fixes the problem of flexinode content not being displayed in nodes.

However, the warning still occurs and new fields do not show up in submit form. I'm changing the title to reflect this issue.

francoud’s picture

I tried apply the patch 76904 and then creating a new flexinode content type and the warning "571" doesn't appear. It's still present for flexinode content types that were created before patching. So I suppose that the right procedure should be: 1) apply the patch, 2) delete old flexinode content types 3) create again the flexinode content types.... Can anyone confirm?

darren oh’s picture

Title: In Drupal 4.7.3, New Fields Don't Appear in Submit Form » Warning when editing old content types in Drupal 4.7.3

Fransesco's method seems to work. And I was wrong about new fields not appearing in the submit form. It was only my custom field that wasn't appearing.

darren oh’s picture

Title: Warning when editing old content types in Drupal 4.7.3 » Warning when editing old content types in 4.7.3
Priority: Critical » Normal
Bèr Kessels’s picture

subscribing.

radev’s picture

@francoud
Yes, you`re right. When creating fields in 4.7.3 without patch mentioned in 76904 - in database "field_type" stored as empty - so for proper functioning you need to recreate content types you created on 4.7.3 without patch.

BTW, I updated patch a little bit.

darren oh’s picture

Status: Active » Closed (duplicate)

That patch solves this issue, so I'm marking this as a duplicate.