Problem/Motivation

When trying to access the configuration (settings) form of the Acquia Cloud Backup Manager module on a Drupal 11 site, a fatal error is thrown and the page returns a 500 error.

From the PHP error logs:

Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/www/html/docroot/modules/contrib/acquia_cloud_backup_manager/src/Form/SettingsForm.php on line 48 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 44 of /var/www/html/docroot/core/lib/Drupal/Core/Form/ConfigFormBase.php).

Steps to reproduce

Start from a Drupal 11.x site.
- Install the contrib module Acquia Cloud Backup Manager (acquia_cloud_backup_manager).
- Clear caches (drush cr or via the UI).
- Navigate to the module’s configuration form (for example, via Configuration → … → Acquia Cloud Backup Manager or through the module’s “Configure” link on the Extend page).
- Observe that the page returns a HTTP 500 / fatal error, and the logs show:

Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in modules/contrib/acquia_cloud_backup_manager/src/Form/SettingsForm.php ...

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lpeidro created an issue. See original summary.

lpeidro’s picture

Status: Active » Needs review

In Drupal 10.2, a new argument was added to the \Drupal\Core\Form\ConfigFormBase constructor, but it was optional.
In Drupal 11, this parameter became required, which is the cause of the current issue.
You can find more details in the related issue: https://www.drupal.org/node/3404140

To resolve this, I updated the module to ensure compatibility with Drupal versions 10.2 and 11, and adjusted the dependency accordingly.

My question is whether we should keep the current major version and update it with the new compatibility, or create a new major version that supports only Drupal 10.2 and 11. This would allow the existing version to remain compatible with Drupal 9 and earlier 10.x versions.

eduardo morales alberti’s picture

Status: Needs review » Fixed

Merged! Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

tunic’s picture

Given that support for 9 and <10.2 has been dropped, this implies a new major version is required.

We should open a 2.x branch and move the commit there.

Status: Fixed » Closed (fixed)

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