tldr; $path_alias = /drupal_strtolower(drupal::service('path.alias_manager.cached')->getPathAlias($path)); broke my site
===
Installing the latest version of colorbox crashed my D8 site. I got a blank screen showing only:
If you have just changed code (for example deployed a new module or moved an existing one) read http://drupal.org/documentation/rebuild
I followed the steps, it didn't help in this instance. I then got lost in reading serialized PHP in the DB to try to disable it. No avail :/
The PHP logs said:
Exception thrown when handling an exception (Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: You have requested a non-existent service "path.alias_manager.cached". Did you mean this: "path.alias_manager"?)
I found the line in the .module that references "path.alias_manager.cached" and changed it to "path.alias_manager" but then I got a new error calling an undefined function. I ended up just changing line 92 to (in order to match path):
$path_alias = current_path();//drupal_strtolower(drupal::service('path.alias_manager.cached')->getPathAlias($path));
AND IT WORKED!
Comments
Comment #1
frjo CreditAttribution: frjo commentedThanks for the bug report! D8 is very mush a moving target and I have gotten it to work from time to time. When D8 is in Beta I will make a bigger effort.
Comment #2
bdawg8569 CreditAttribution: bdawg8569 commentedI believe that it should be:
$path_alias = drupal_strtolower(\Drupal::service('path.alias_storage')->lookupPathAlias($path, 'en'));
based on how i have seen some of the other core code
Comment #3
beatnbite CreditAttribution: beatnbite commentedHave installed the module on Drupal 8 beta 3 and got a white screen with this error message:
Fatal error: Call to undefined function drupal_strtolower() in E:\http\travel\web\modules\colorbox\colorbox.module on line 186
Search over files didn't find any other files referencing drupal_strtolower() function, so I guess you may not use this function now.
---
EDITED: here is a note from the cached version of the D8 API documentation page (removed now) on unicode functions:
Comment #4
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedI believe this is resolved.