- Issue created by @mwrbg
- Merge request !8Refactor to avoid calling parent constructor in price alterator config forms → (Open) created by mwrbg
The following error occurs when trying to navigate to the price alterator settings for specialNights, sundayCheckin, saturdayNightOnly
ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/www/html/web/modules/contrib/bee_hotel/modules/beehotel_pricealterators/src/Form/SpecialNights.php on line 105 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 44 of core/lib/Drupal/Core/Form/ConfigFormBase.php).
On a Drupal 11 install with BEE Hotel, navigate to one of the price alterator settings pages via "BEE Hotel" and "Price Alterators".
It looks like it's caused by a parameter being optional in Drupal 10, but required in Drupal 11:
https://www.drupal.org/node/3404140 →
At least in the case of SpecialNights, I've found it to be fixable by avoiding calls to the parent constructor and setting $this->configFactory directly.
Active
2.24
Code