🇳🇱Netherlands @tomdewild

Account created on 12 September 2014, over 10 years ago
  • Developer at iO  …
#

Recent comments

🇳🇱Netherlands tomdewild

We've had the same problem as @jimafisk and @Newb_Druper with one of our sites. After debugging some time we found out that User 0 was missing in the database and this caused the problem.

Created a small update hook to fix the problem:

/**
 * Added user 0, otherwise Drupal throws an error.
 */
function hook_update_N() {
  $insert = \Drupal::database()->insert('users')->fields([
    'uid' => 0,
    'uuid' => '2d62a7d8-b5b6-43b2-b513-fa7b3396ec44',
    'langcode' => 'en',
  ]);

  $insert->execute();
}

Hopefully this will also solve your problems.

Production build 0.71.5 2024