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.
From #2452637: Remove function system_rebuild_theme_data() from system.module
Function is still in use in ThemeSettingsInfo.php which provokes a PHP Fatal error
(drupal8-beta9)
Comment | File | Size | Author |
---|---|---|---|
#4 | 2460437-4.patch | 666 bytes | marthinal |
Comments
Comment #1
kiwad CreditAttribution: kiwad commentedThis should fix it
- $this->data = system_rebuild_theme_data();
+ $this->data = \Drupal::service('theme_handler')->rebuildThemeData();
Comment #2
mbrett5062 CreditAttribution: mbrett5062 commentedI did the following and it worked.
- $this->data = system_rebuild_theme_data();
+ $this->data = \Drupal::state()->get('system.theme.data', array());
Taken straight from latest (04/11/2015) Drupal 8 Dev. In the following file.
core\includes\module.inc (Line 36)
Comment #3
mbrett5062 CreditAttribution: mbrett5062 commentedActually, just checked and the code from @kiwad in #1 is the correct way to go.
Comment #4
marthinal CreditAttribution: marthinal commentedPatch attached :)
Comment #5
kae76 CreditAttribution: kae76 at Open Code Limited commentedThis patch worked (2460437-4.patch), haven't received any errors since.
Thanks
Comment #6
Jeff Burnz CreditAttribution: Jeff Burnz commentedOK, good catch, lets get this tested and committed asap. Cheers.
Comment #8
Jeff Burnz CreditAttribution: Jeff Burnz commentedThank you for the patch and reviews, committed!