Just tried the 7.x branch - which is a fantastic step forward.
One error I've found when selecting node types generated by other contib modules (Panels & SimpleAds) and one custom content type (that contains a title, an image and a URL field) :
Notice: Undefined variable: field_names in multi_node_add_page() (line 64 of .../multi_node_add/multi_node_add.pages.inc).
Which is within in this snippet:
$form['fields_to_utilize'] = array(
'#type' => 'checkboxes',
'#options' => $field_names,
'#title' => t('Fields to manage'),
'#attributes' => array('class' => array('multi-node-add')),
'#description' => t('Choose those fields that you would like to edit on the new nodes'),
);
And $field_names is initialised by field_info_instances('node', $type); at line 32. For the 3 referenced cases, the array $field_names is empty, hence the error, when viewing /node_multi_add/node_type
Comments
Comment #1
aron novakThank you for the detailed and exceptionally clear bugreport, i committed a fix now:
http://drupalcode.org/project/multi_node_add.git/commit/338347f
Let me know if it helps!
Comment #2
robcarrSeems to work well and spot-on for my needs. The message "Failed to detect usable fields" is helpful, but may not mean much to a content administrator.
In such cases the form to create a number of rows should be hidden (as the form submission generates an error), and a more direct message: "Unable to create multiple nodes of this content type" if no fields are available... or even hide the tab for that content type (although you might see downstream issues of 'Why doesn't it detect my content type?" being posted).
Comment #3
aron novakhttp://drupalcode.org/project/multi_node_add.git/commit/d0d8ac8
You're right, improved.
Comment #4
aron novakand it's rewritten to use drupal_set_messages()
Comment #5
robcarrFantastic! My only thought is that the error message is still a bit of a 'so what?' as it doesn't inform the user why the error is generated and what impact it has on the ability to generate multiple nodes. The warning notice can sometimes convince the user that they've done something wrong, when it's actually a technical issue, possibly out of their control.
How about 'Unable to generate multiple nodes for this content type (failed to detect usable fields).' as a message? More a usability issue than a technical concern.
Comment #6
aron novakIndeed, thanks for taking care of such UX aspects, i updated the text.
Comment #7
robcarrLooks like it's a sorted problem. Thanks for updating the latest DEV release too.