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

Command icon 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 hidden branch
  • 1.0.x Comparechanges, plain diff MR !1

Comments

wesleyl created an issue. See original summary.

ccjjmartin made their first commit to this issue’s fork.

ccjjmartin’s picture

Status: Active » Needs review

@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.

ccjjmartin’s picture

If 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...

wesleyl’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +@ccjjmartin No problem. Thanks for your help. I will commit your suggestion if some changes on hook_update too.
wesleyl’s picture

Issue tags: -@ccjjmartin No problem. Thanks for your help. I will commit your suggestion if some changes on hook_update too.

@ccjjmartin No problem. Thanks for your help. I will commit your suggestion if some changes on hook_update too.

wesleyl’s picture

Assigned: wesleyl » Unassigned
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.