Running drush sql-sanitize fails with a SQL syntax error when access_token is enabled. Inspection of the debug output shows a missing semicolon after the access_token update query. While it seems like the drush code should manage for this, perhaps it is simpler to just add the semicolon.
access_unpublished_drush_sql_sync_sanitize has the sql query with the problematic syntax.
I've attached a patch for this with the one-character change.
P.S. This is my first issue report + patch on drupal.org, so feedback would be appreciated!
| Comment | File | Size | Author |
|---|---|---|---|
| sanitize-semicolon.patch | 515 bytes | woodseowl |
Comments
Comment #3
chr.fritschThank you for your first contribution. 🎉👏
The next time you upload a patch and expect to get some feedback set the issue status to "Needs review" 😀
So I just committed the patch. Thanks
Comment #5
keboca commentedThank for the patch!
After I applied it then I got a different error message saying "access_token" table does not exists. Then I verified the database to find out that the table wasn't there. It took me some time to finally see that `Access unpublished` module wasn't installed, however Drush was grabbing the hook function even when module wasn't enabled.
To make it works. I decided to include a way around as follow:
if (!\Drupal::moduleHandler()->moduleExists('access_unpublished')) {return;}