Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In commerce_extra_panes-termsofservice.module
the #weight option of a pane is being set as an attribute:
// Add a generic class.
$form[$pane_id]['#attributes'] = array(
'class' => array('terms-of-service'),
'#weight' => 0,
);
Which results in a faulty #weight attribute:
<fieldset class="terms-of-service form-wrapper" #weight="123" id="edit-extra-pane-node-123">
Comment | File | Size | Author |
---|---|---|---|
#1 | commerce_extra_panes-remove-weight-2097831-1.patch | 720 bytes | spatical |
Comments
Comment #1
spatical CreditAttribution: spatical commentedI agree the #weight should just be removed. The # character shouldn't be used in HTML attribute names, and it isn't having any affect on any ordering or any other usage. And the position of the checkbox is handled by the #weight a few lines above
'#weight' => variable_get('cep_tos_position_' . $pane_id, 'below') == 'below' ? 1 : -1,
Attached is a patch to remove the #weight from the attributes array in the commerce_extra_panes_termsofservice module.