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.
D8Beta6 Enabled Colorbox
Fatal error: Class Drupal\colorbox\Form\ColorboxSettingsForm contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Drupal\Core\Form\ConfigFormBase::getEditableConfigNames) in /home/d8green/public_html/modules/colorbox/src/Form/ColorboxSettingsForm.php on line 350
Comment | File | Size | Author |
---|---|---|---|
#5 | 2421907-5.patch | 1.16 KB | j4 |
Comments
Comment #1
frjo CreditAttribution: frjo commentedThanks for the report.
New stuff seems to break with each beta, I will most likely wait for beta 7 before I do anything more.
Comment #2
GreenSkunk@frjo have you seen @AlexPott's Change record "Configuration objects by default are immutable."
It works after adding the following within the class "ColorboxSettingsForm" in ColorboxSettingsForm.php
I will learn how to make patches.
Comment #3
j4 CreditAttribution: j4 commentedHi,
Could you tell us exactly which line number you added this to?
After adding it I get an error while trying to save colorbox settings, though the other error has disappeared.
Drupal\Core\Config\ImmutableConfigException: Can not set values on immutable configuration colorbox.settings:custom.style. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object in Drupal\Core\Config\ImmutableConfig->set() (line 34 of C:\Users\Hp\Sites\devdesktop\drupalbangalore-dev\docroot\core\lib\Drupal\Core\Config\ImmutableConfig.php).
Thanks
Jaya
Comment #4
j4 CreditAttribution: j4 commentedHi
Changing
$config = $this->configFactory->get('colorbox.settings');
to
$config = \Drupal::configFactory()->getEditable('colorbox.settings');
removes the above error and allows me to save the configuration settings.
But colorbox doesnt work yet.
Thanks
Jaya
Comment #5
j4 CreditAttribution: j4 commentedHi,
Thanks to my mentor Hussain Deghamwala (https://www.drupal.org/u/hussainweb), my first patch in drupal.org!
Comment #6
GreenSkunkGreat job @j4 for further testing and a patch!
Comment #7
frjo CreditAttribution: frjo commentedAnd committed to 8-dev, thanks for the contribution and testing!
Comment #9
frjo CreditAttribution: frjo commented@j4, here is your first commit https://www.drupal.org/user/242456/track/code, the first of many I hope!
Comment #10
j4 CreditAttribution: j4 commentedThank you! Glad to have contributed a miniscule drop in the Drupal ocean!! :)
Jaya