Skip to content

Instantly share code, notes, and snippets.

@simesy
Created November 19, 2019 06:45
Show Gist options
  • Select an option

  • Save simesy/b23f3720d1d845c314a5d1efa76aed26 to your computer and use it in GitHub Desktop.

Select an option

Save simesy/b23f3720d1d845c314a5d1efa76aed26 to your computer and use it in GitHub Desktop.
Re-save redirects if manipulating redirect table directly
# If the values change the hash needs to be fixed.
drush eval '$r=\Drupal::entityQuery("redirect")->execute(); $x=\Drupal\redirect\Entity\Redirect::loadMultiple($r); foreach($x as $y) { $y->save(); }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment