When I try to add a field on a content type I right created, I optain the "Call to undefined function: form_textfield()" message error.
I am using Drupal 4.7 RC1.

Comments

gollyg’s picture

I am receiving the same error when moving from 4.7b6 > 4.7rc2 and attempting to view the admin . Have downloaded latest CVS of flexinode. Also, some content types are defined but not available when creating new content (these were created in the b5 version before the upgrade).

adamrice’s picture

I'm getting the same thing with a virgin install of 4.7rc2 and the current cvs version of flexinode.

adamrice’s picture

Oh yeah, I should mention: it gives line 878 of flexinode.module as the trouble-spot. That line is:
$form .= form_textfield(t('Content type name'), 'name', $edit['name'], 60, 128, '', NULL, TRUE);

adamrice’s picture

More, sorry. I think this is a duplicate of the bug reported here. The patch provided there is a partial fix.

samc’s picture

Status: Active » Fixed

adamrice's issue is fixed as of v 1.70 of flexinode.module.

OP's issue could be the same, or related to a contrib field in which case more detail is needed.

Marking fixed... Please reopen if you're still seeing this.

voite’s picture

Flexinode module is still throwing this error. I am like the previoous user... fresh 4.7rc2 install latest flexinode cvs.

Fatal error: Call to undefined function form_textfield() in C:\Program Files\Apache Group\Apache2\htdocs\modules\flexinode\flexinode.module on line 878

is the error thrown when clicking on "add content type" in the administer>content>content types.

avpaderno’s picture

I am not getting that message error anymore. I installed the latest flexinode version on drupal RC2, then I updated it to RC3.

voite’s picture

edit #6

I meant to say I'm on rc3 and I do still get this error.

voite’s picture

Status: Fixed » Active
heine’s picture

The latest flexinode.module (downloaded today) doesn't contain a call to form_textfield at line 878 or anywhere else for that matter. Either you've got an older flexinode.module, or you have a different error.

samc’s picture

voite said:

Fatal error: Call to undefined function form_textfield() in C:\Program Files\Apache Group\Apache2\htdocs\modules\flexinode\flexinode.module on line 878

is the error thrown when clicking on "add content type" in the administer>content>content types.

What fields are you using in the content type you are trying to add? Are any of these located in the modules/flexinode/contrib folder?

heine’s picture

Only the contrib field_multiselect.inc does contain calls to form_textfield (on line 74, 77, 78, 79, 80); that means that when you add a 'multiselect menu' and click 'add field' you get the error:

Fatal error: Call to undefined function: form_textfield() in [path]\drupal_cvs\modules\flexinode\contrib\field_multiselect.inc on line 77

Is that the error you get?

avpaderno’s picture

Yes, now I get that error just with multiselect menu.

Before I had more errors like that, but now it's ok, as I don't think I will need the multiselect menu.

Thanks for the kind replies.

voite’s picture

voite said:

Fatal error: Call to undefined function form_textfield() in C:\Program Files\Apache Group\Apache2\htdocs\modules\flexinode\flexinode.module on line 878

*edit*
error is thrown when clicking on "add content type" when pathed to administer>content>content types.

What fields are you using in the content type you are trying to add? Are any of these located in the modules/flexinode/contrib folder?

no I dont use flexinode because it is also not working in 4.7 ^^

I am getting the error while adding containers using a method similar to what is described at http://category.greenash.net.au/node/98

samc’s picture

Voite,

My guess is that you've got an older version of flexinode on your system at C:\Program Files\Apache Group\Apache2\htdocs\modules\flexinode\flexinode.module.

The current cvs version doesn't contain any calls to form_textfield.

In older versions of flexinode.module (circa 1.50, around July 05) clicking on "add content type" called flexinode_page_add_type() which in turn called flexinode_page_edit_type() which contains the offensive call at or around line 878. (Disclaimer: wasn't actually using it back then, but that's what the code seems to suggest).

Please try to pull down the latest from CVS, install to the location mentioned above, and report back on your success (hopefully ;-).

Thanks!

Bèr Kessels’s picture

Category: bug » support

I confirm that there is not more _texfield in the current code. Marking this a support request untill we have found out what is going on.

patchak’s picture

I also have this error only when trying to edit or create a multiselect field..

Fatal error: Call to undefined function: form_textfield() in /homepages/46/d117124046/htdocs/jedebogue/www/chiens/modules/contrib/flexinode/field_multiselect.inc on line 77

I upgraded the test site to 4.7, then installed CVS version of flexynode and upgraded the flexynode as well with the upgrade script...

All seems ok now except those fields?

Any ideas if the fields are working fine? Maybe there was a problem with my update?

Thanks

patchak’s picture

Just to add more details...

On the first test site I updated the flexynode script with the update.php... It was selected no updates available, but still I selected the update 1 in the drop down menu... I don,t konw why I did that....

So I thought maybe that created a problem....

Headed to test site no2. Upgraded to 4.7 as well, reinstalled cvs flexynode version this time without upgrading with the update.php script.

Same error message appears when trying to create a multiselect text field...

Any ideas about workarounds of some sort? I can't delete the fields by habd in the admin section either as the message will pop up when clicking on the edit link as well...

thanks

heine’s picture

It has nothing to do with your update. The contributed module field_multiselect.inc does contain calls to form_textfield (on line 74, 77, 78, 79, 80); that means that when you add a 'multiselect menu' and click 'add field' you get an error.

It still has to be updated to 4.7

patchak’s picture

Heine:

Ok great thanks for the info, I'll wait for a fix or maybe try that multi select checkbox field type ....

cheers,

patchak

holmlund’s picture

One problem here is that when you go to the http://drupal.org/project/flexinode page, the link to download the latest install is still pointing to flexinode-4.6.0.tar.gz. On the http://drupal.org/project/Modules page the link to the lastest version points to flexinode-4.7.0.tar.gz.

My guess is that newbies that are reading about this module for the first time, such as myself, are clicking onto the page describing flexinode and then unknowingly downloading the old version.

P.S. I've been using drupal for all of 2 days now and I like it!

till’s picture

Title: Call to undefined function: form_textfield() » Please fix the link!

Yeah, someone has to fix the link. Luckily there is Google. ;-)

Bèr Kessels’s picture

Title: Please fix the link! » Call to undefined function: form_textfield()

Don't get off topic. Don't change the title.

JJdiego’s picture

Version: master » 4.7.x-1.x-dev
Priority: Normal » Critical

I activated flexinode module and when I want to add a new content type (?q=admin/node/types/add_type) it appears:

Fatal error: Call to undefined function form_textfield() in /home/s/z/c/szczytnacity/www/modules/flexinode/flexinode.module on line 878

So I can't use the module. How can I fix this? Because now flexinode is unserviceable.

samc’s picture

The multiselect field is not currently supported due to its use of form_textfield. Flexinode should still work fine, but if you need to use that field, you may have to fix it yourself. There is a handbook page on converting modules from 4.6 to 4.7 that could help you with that.

Bèr Kessels’s picture

Component: Code » flexinode.module (core)
Priority: Critical » Normal
Status: Active » Fixed

There are no fields in 4.7 that use old form_xxx code. Closing. Please re-open issues for specific fields instead.

Status: Fixed » Closed (fixed)

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