Download & Extend

"display attachments inline" flag not saved properly

Project:Inline
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

In inline_form_alter(), the variable_get() call is dependent on the $node_type, which is specified to come from $form['orig_type']['#value']. However, on several node forms that form value is empty (for what reason I'm not entirely certain). That results in the variable_get() call always returning false/0, so that form field always defaults to "Disabled".

Comments

#1

Status:active» needs review

You've successfully identified some cruft code from 4.7.x good ol' times.

Attached patch fixes this by implementing the same logic like Comment module in core. However, that logic is plain wrong and still a bug in Drupal 7.x, because $form['identity']['type'] is always set in the content-type form and I guess it should be !empty($form['identity']['type']['#default_value']) or similar, to prevent those fields from showing up on content-type creation forms and hence, prevent storing 'module_node_' variables.

AttachmentSize
inline-DRUPAL-5.type-settings.patch 1.05 KB
inline-DRUPAL-5--2.type-settings.patch 1.68 KB

#2

Any updates? Anyone able to test whether this patch does NOT break existing sites/configurations?

nobody click here