Problem/Motivation
Since upgrade to Core 8.8 removes the url_alias table (see https://www.drupal.org/project/drupal/releases/8.8.0), fast 404 needs to change the table it checks or you get a fatal error like this:
The website encountered an unexpected error. Please try again later.
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.url_alias' doesn't exist: SELECT pid FROM {url_alias} WHERE alias = :alias; Array ( [:alias] => /blog ) in Drupal\fast404\Fast404->pathCheck() (line 158 of modules/contrib/fast_404/src/Fast404.php).
Drupal\Core\Database\Statement->execute(Array, Array) (Line: 634)
Drupal\Core\Database\Connection->query('SELECT pid FROM {url_alias} WHERE alias = :alias', Array, Array) (Line: 357)
Drupal\Core\Database\Driver\mysql\Connection->query('SELECT pid FROM {url_alias} WHERE alias = :alias', Array) (Line: 158)Because of this code:
// Check the URL alias table for anything that's not a standard Drupal path.
// Remove any trailing slash found in the request path.
$path_noslash = rtrim($path, '/');
$sql = "SELECT pid FROM {url_alias} WHERE alias = :alias";
$result = Database::getConnection()->query($sql, [':alias' => $path_noslash])->fetchField();
if ($result) {
return;
}Proposed resolution
Update table being checked.
Remaining tasks
Patch coming shortly.
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
Compatability with Drupal 8.8.
Marking as 'Critical' because it renders a site unusable and has no workaround.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | fast404-table-not-found-3102050-12-D8.patch | 1.36 KB | gg4 |
| #9 | pathalias_tables-3102050-9.patch | 1.07 KB | prempatel2447 |
| #8 | 3102050-8.patch | 1.32 KB | akashkumar07 |
| #7 | fast404-table-not-found-3102050-7-D8.patch | 1.22 KB | gg4 |
| #2 | fast404-table-not-found-3102050-2-D8.patch | 881 bytes | scott_euser |
Comments
Comment #2
scott_euser commentedFirst patch applies to alpha 4, second patch applies to dev.
Comment #3
scott_euser commentedComment #4
scott_euser commentedComment #5
amateescu commentedLooks good to me.
Comment #6
gg4 commentedI think we will also need to add
core_version_requirement: ^8.8to fast404.info.yml and remove the currentcoreanddependencieskeys.Comment #7
gg4 commentedComment #8
akashkumar07 commentedPlease review the patch. Thanks
Comment #9
prempatel2447 commentedPlease review the patch. It will work for Drupal core version 8.8 and below 8.8 as well.
Comment #10
vatsalkhanna commentedReviewed the patch provided on #9. It works great!
After applying patch this issue got resolved. Tested the patch on Drupal 8.8.1 and PHP 7.3.9
Comment #11
vatsalkhanna commentedComment #12
gg4 commentedComment #14
gg4 commentedCreated a 8.x-2.x branch for Drupal ^8.8 and committed #12 (minor adjustments to #7).
Comment #15
gg4 commented