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.
Cannot submit settings form, because $values['dlayout_max_width']['#default_value'] doesn't exist, only $values['dlayout_max_width']
/**
* Validate the form.
*/
function storefront_theme_settings_validate($form, &$form_state) {
$values = $form_state['values'];
// Validate max_width values seperatly.
if ($values['dlayout_set_max_width'] == 1) {
if (empty($values['dlayout_max_width']['#default_value'])) {
form_set_error('dlayout_max_width', t('Standard layout max-width is empty - you forgot to enter a value for the max width!'));
}
}
}
Comment | File | Size | Author |
---|---|---|---|
#1 | validation-2209311-#1-7-x.patch | 768 bytes | benelori |
Comments
Comment #1
benelori CreditAttribution: benelori commentedUploaded patch
Comment #2
benelori CreditAttribution: benelori commentedComment #3
bunnicula CreditAttribution: bunnicula commentedThe #1 patch directory tree seems to be broken, but I manually edited theme-settings.php with the changes and I can confirm this worked for me.
Comment #4
dudenhofer CreditAttribution: dudenhofer commentedThanks for the patch, but this was already fixed in this commit of the latest dev version. I didn't realize it wasn't tagged as a stable release yet, so I'll do that today.
http://cgit.drupalcode.org/storefront/commit/?id=da51834