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.

Comments

Lionfish’s picture

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.

aaron’s picture

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.

aaron’s picture

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).

csc4’s picture

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?

shiraz dindar’s picture

I'm experiencing this issue as described by Aaron.

matteogeco’s picture

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.

matteogeco’s picture

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