Drupal 8.0.2 on Pantheon

From:
/admin/config/development/performance/advagg

I disable the checkbox for "Enabled advanced aggregation" and hit "Save configuration."

This results in the following error:

The website encountered an unexpected error. Please try again later.
Recoverable fatal error: Argument 2 passed to advagg_bundler_advagg_setting_form_submit() must be an instance of FormStateInterface, instance of Drupal\Core\Form\FormState given in advagg_bundler_advagg_setting_form_submit() (line 31 of modules/advagg/advagg_bundler/advagg_bundler.module).

I can go back and reload the page, but the value has not been saved (it is still enabled).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ptmkenny created an issue. See original summary.

irishdan’s picture

By removing the type hinting on the advagg_bundler_advagg_setting_form_submit the form can be submitted without error.

irishdan’s picture

Issue tags: +london_2016_january
irishdan’s picture

Status: Active » Needs review

Status: Needs review » Needs work
ChandeepKhosa’s picture

Issue tags: +SprintWeekend2016
mikeytown2’s picture

Status: Needs work » Needs review

retesting #2

digitaldonkey’s picture

Patch (advagg-cannot-enable-or-disable-advanced-aggregation-2659322-1-8.patch) worked for me. Thx.

freality’s picture

The issue is namespacing. Adding use \Drupal\Core\Form\FormStateInterface; to the top of the file. Or changing the function signature to function advagg_bundler_advagg_setting_form_submit(array &$form, \Drupal\Core\Form\FormStateInterface &$form_state) resolves the issue without removing the type-hinting.

The file being advagg_bundler.module.

mikeytown2’s picture

  • mikeytown2 committed 8723f84 on 8.x-2.x
    Issue #2659322 by irishdan, mikeytown2, freality: Cannot enable/disable...
mikeytown2’s picture

Status: Needs review » Fixed

Going to go ahead and mark this as fixed. Will look into the PHP 7 issues in the other thread. Thanks for the help here!

Status: Fixed » Needs work

The last submitted patch, 10: advagg-2659322-10-formStateInterface.patch, failed testing.

mikeytown2’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.