Any attempt of altering default values using hook_form_alter is foiled by a form_alter located at includes/alter.inc. This form_alter is completely redundant, as it is already called by theme-settings.php.

Since the theme's form_alter runs after any module's form alter, it is impossible for modules to change the contents of the form.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

josesanmartin’s picture

Adding patch

Taiger’s picture

I had trouble applying the patch directly. However, applying the changes manually fixes the bug and allows subthemes to alter the theme settings form.

markhalliwell’s picture

Status: Active » Needs review

markhalliwell’s picture

Status: Needs review » Fixed
markhalliwell’s picture

Status: Fixed » Closed (won't fix)

Actually this will be semi-reverted/fixed in #2451107: Fix bootstrap theme settings. I just remembered why there is a form alter to begin with. theme-settings.php is invoked before any module/theme has had a chance to alter the form thus, we cannot properly process alter the form from the file alone. I will move the majority of the "added" code back to theme-settings.php, but limit what the alter does instead.

markhalliwell’s picture

This has indeed been superseded/fixed by #2451107: Fix bootstrap theme settings.