Error when submitting changes to the field settings screen

chrisada - May 7, 2007 - 14:46
Project:Addnode
Version:5.x-1.2
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

For example, I had an irreversible error after trying to change the widget of a node_reference field from "add node" to "select list". After hitting submit, I get a "page not found" error, and that field disappeared from the "manage field" page of the content type's config page. The field still exist in database and in the "display field" page, but could no longer be edited or deleted.

I set the priority to critical because this basically make it impossible to uninstall the module successfully.

#1

Lionfish - May 8, 2007 - 11:17

Thanks for the bug report,

Currently I'm not handling the "multiple" and "required" selections. I wonder if that might be causing the problem... (eg if something like that broke in the 'default value' field that might cause a problem).

I've only tried to reproduce the bug with version 1.1 (but failed).

Have you tried upgrading to version 1.1? (Although that might be hard if you can't uninstall it :/)

I really can't think what could have caused that to happen at the moment... it's most likely to be in the way I added the subforms in version 1.0, so version 1.1 might fix the bug...

Thanks for the help!

Mike.

#2

aaron - August 25, 2007 - 02:18
Version:5.x-1.0» 5.x-1.2

If you add an addnode field to a type, then later try to change it to a select list, you get the following errors:

* Title field is required.
* The default value is invalid.

This also happens if you try to make any changes at all to the field.

I've tested this against a nodereference to a type with an imagefield field, and also against a Page type. Note that this is with required unchecked, and multiple unchecked, so that is not an issue. This is using version 5.x-1.2.

Definitely a critical issue.

#3

aaron - August 25, 2007 - 02:20
Title:Error on changing widget from addnode to something else» Error when submitting changes to the field settings screen

the error also happens if you attempt to select a default value on the field settings screen (as an attempt to work around the issue).

#4

csc4 - February 25, 2008 - 14:30

Bump - this problem is still there it seeme to revolve around the Default fieldset which seems to be triggering an entire form validation - which always fails....

Anyone any idea how this can be fixed?

#5

Shiraz Dindar - March 28, 2008 - 04:41

I'm experiencing this issue as described by Aaron.

#6

matteogeco - September 12, 2008 - 08:33

I solved putting a && arg(0) != 'admin' in the if at line 49, so now line 49 looks like this:
if ($field['widget']['type'] == 'addnode_select' && arg(0) != 'admin')
I don't know if it's a good solution, however it works.

#7

matteogeco - September 12, 2008 - 08:40

Sorry, I realized that my solution prevents submit of field settings from raising errors, but prevents also the module from working correctly... :_(

 
 

Drupal is a registered trademark of Dries Buytaert.