Steps to reproduce
Install the module and try to create a redirect rule for a node:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'weight' in 'field list': INSERT INTO "redirect_page_by_role_node" ("nid", "role", "redirect_to", "status_code", "weight") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => anonymous [:db_insert_placeholder_2] => / [:db_insert_placeholder_3] => 302 [:db_insert_placeholder_4] => 0 ) in redirect_page_by_role_form_node_form_submit() (line 243 of modules/contrib/redirect_page_by_role/redirect_page_by_role.module).
Proposed resolution
Update the hook_schema with the content on hook_update_9001
Issue fork redirect_page_by_role-3247410
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 1.0.x
changes, plain diff MR !1
Comments
Comment #4
ccjjmartin commented@wesleyl I saw you had assigned yourself on this but it was a blocker for me so I went ahead and made a merge request for it. As a note, it looks like development is still happening on the 1.0.x branch? As a suggestion, it might be good to create a 2.x branch at the current HEAD in github.
Comment #5
ccjjmartin commentedIf you are more familiar with composer and patching than merge requests, here is the link to the patch for the merge request, I was able to use it in composer.json on the project I am working on: https://git.drupalcode.org/project/redirect_page_by_role/-/merge_request...
Comment #6
wesleyl commentedComment #7
wesleyl commented@ccjjmartin No problem. Thanks for your help. I will commit your suggestion if some changes on hook_update too.
Comment #8
wesleyl commentedIt was commited on a new branch 3.x (https://git.drupalcode.org/project/redirect_page_by_role/-/commit/76b247...)