Skip to content

Instantly share code, notes, and snippets.

@drogers98
Created March 1, 2017 17:41
Show Gist options
  • Save drogers98/d34be4d36dbad2e2462833bcc26b1641 to your computer and use it in GitHub Desktop.
Save drogers98/d34be4d36dbad2e2462833bcc26b1641 to your computer and use it in GitHub Desktop.
D7 update all pathauto checkboxes to use auto generated
<?php
// For the following query:
// UPDATE `pathauto_state` SET `pathauto`=1 WHERE `entity_type` = 'node'
$update_auto_aliases = db_update('pathauto_state')
->fields(array(
'pathauto' => 1,
))
->condition('entity_type', 'node', '=')
->execute();
?>
@drogers98
Copy link
Author

Temporarily add to template/node/etc or custom module, to set all checkbox values that are currently unchecked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment