Conditions:
Contrib modules enabled:
- ctools;
- bean;
- entity;
- panelizer;
- panels;
- entity;
Version php8.0.
Steps to reproduce:
Run drush rr command.
We see warnings- in console:
[warning]
Attempt to read property "language" on null common.inc:7950
[warning]
Attempt to read property "language" on null node.module:707
Please see screenshot console.png.
During investigation I found, that problem was on php7.4 ( hidden notice), but on php8.0 we have Warnings(see above). It arises after call registry_rebuild() in drush_registry_rebuild() on the DRUSH_BOOTSTRAP_DRUPAL_DATABASE level after bootstrap_invoke_all('registry_rebuild'). Then call function drupal_alter('registry_files', $files, $modules) . There is global variable $language is empty. Please see screenshot with call stack on this level (please see screenshot DRUSH_BOOTSTRAP_DRUPAL_DATABASE.png).
But after drush_bootstrap_to_phase(DRUSH_BOOTSTRAP_DRUPAL_FULL) on DRUSH_BOOTSTRAP_DRUPAL_FULL and call registry_rebuild() global variable $language is object of stdClass(please see screenshot DRUSH_BOOTSTRAP_DRUPAL_FULL.png).
So I suggest to add check in ctools_registry_files_alter():
if (drupal_get_bootstrap_phase() < DRUPAL_BOOTSTRAP_FULL) {
return;
}
Comment | File | Size | Author |
---|---|---|---|
#3 | ctools-3284043-php8-compatibility.patch | 456 bytes | alena_stanul |
#2 | DRUSH_BOOTSTRAP_DRUPAL_FULL.png | 123.94 KB | alena_stanul |
DRUSH_BOOTSTRAP_DRUPAL_DATABASE.png | 118.87 KB | alena_stanul | |
console.png | 33.77 KB | alena_stanul |
Issue fork ctools-3284043
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
Comment #2
alena_stanul CreditAttribution: alena_stanul at EPAM Systems commentedComment #3
alena_stanul CreditAttribution: alena_stanul at EPAM Systems commentedComment #4
alena_stanul CreditAttribution: alena_stanul at EPAM Systems commentedComment #7
lesleyfernandes CreditAttribution: lesleyfernandes commentedThe #3 worked for me.
Comment #8
lesleyfernandes CreditAttribution: lesleyfernandes commentedComment #9
lwalley CreditAttribution: lwalley commentedComment #10
joelpittetComment #11
fenstratConfirming #3 also fixed the issue for me, with PHP 8.2.