White screen of death on Drupal 8

Just install 8.x-1.0-rc6 on a D8 instance and launch update.php for example

Don't use of 'extension.path.resolver' service as it is not available on D8 or disable use of latest update on D8.

Incriminated code: https://git.drupalcode.org/project/slick_extras/-/commit/524c1df919d881e...

The use of this code might be a solution:

\Drupal::service('extension.list.' . $type)->getPath($name);

CommentFileSizeAuthor
#6 slick_extras-d8compatfix.patch509 bytesmably
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

mably created an issue. See original summary.

mably’s picture

Issue summary: View changes
mably’s picture

Issue summary: View changes
mably’s picture

Issue summary: View changes
gausarts’s picture

Thank you.

Sorry for inconvenience. I was too excited upgrading to D10, and forgot the minimum D8 :)

In the meantime, downgrading to RC4 is best for D8.

RC5 to support Native Grid at Blazy 2.5+ as noted at project home.

So RC4 is the max for D8.

You can set strict constraints to RC4 at your composer.json to avoid errors till you have time to upgrade to D9.

The versions are just the same in essense.

I could not create new branches since they cost me more time. But indeed we should fix this.

Patches are welcome. Thanks.

mably’s picture

StatusFileSize
new509 bytes
gausarts’s picture

Status: Active » Needs work

Thank you.

This service is internal, and can not guarantee to survive at D10:
https://www.drupal.org/project/drupal/issues/2940481

Shortly, worried to be gone by D10 or so.

The best we can do is perhaps like this:
https://git.drupalcode.org/project/slick/-/blob/8.x-2.x/slick.module#L85

This way all D8 - D10 will be happy :)

mably’s picture

Could be a solution, yep +1

mably’s picture

Tried to create a MR, first time for me, not sure it was done as it is supposed to be done ;)

gausarts’s picture

Hm, not sure, either. I am new to web based PR :)

But normally merged happens only if committed, or selected below.

Untested against Upgrade Status module for D10, but perhaps something like this:

function slick_extras_get_path($type, $name, $absolute = FALSE) {
  $function = 'drupal_get_path';
  if (\Drupal::hasService('extension.path.resolver')) {
    $path = \Drupal::service('extension.path.resolver')->getPath($type, $name);
  }
  else {
    $path = is_callable($function) ? $function($type, $name) : '';
  }
  return $absolute ? base_path() . $path : $path;
}

Feel free to correct the above in case I missed anything, or update your patch. Thanks.

mably’s picture

My MR have been updated according to your suggestions above.
Code looks ok to me. At least it seems to be working fine on my D8 and D9 instances ;)

  • gausarts committed 76328de on 8.x-1.x authored by mably
    Issue #3256098 by mably: Crashes on Drupal 8
    
gausarts’s picture

Status: Needs work » Fixed

We'll release a hot fix shortly.

Committed. Thank you for contribution and keeping cool on critical matters :)

Much appreciated.

mably’s picture

You're welcome :)

Status: Fixed » Closed (fixed)

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