Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
only with SQLite when I try to add new Per Role Path:
PDOException: SQLSTATE[HY000]: General error: 1 ESCAPE expression must be a single character: SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {menu_links} m WHERE (link_path LIKE :db_condition_placeholder_0 ESCAPE '\\') ) subquery; Array ( [:db_condition_placeholder_0] => expert/register ) in autoassignrole_page_form_validate() (line 335 of /var/www/drupal/sites/all/modules/contrib/autoassignrole/autoassignrole.admin.inc).
Comment | File | Size | Author |
---|---|---|---|
#5 | pdoexception-2611754-5.patch | 650 bytes | mike.davis |
| |||
autoassignrole-addperrolepath-sqlite-1.diff | 816 bytes | ybabel | |
Comments
Comment #2
ybabel CreditAttribution: ybabel commentedComment #4
mike.davis CreditAttribution: mike.davis at Deeson commentedHi, thanks for the patch.
It looks like you have created the patch on the project that you are working on rather than relative to the autoassignrole module, which is why it is failing the test.
You can do this by using the --relative option when using git diff.
If you provide a new patch which is relative to the autoassignrole module then it should apply correctly and we can review it then.
Comment #5
mike.davis CreditAttribution: mike.davis at Deeson commentedHi @ybabel, did this patch actually fix the error?
Looking at it I wouldn't have thought that changing the case would have made any difference, however having had a search for this issue I did come across this core patch from 2009 - https://www.drupal.org/node/671348.
Here is an updated patch which is created against the module rather than from your Drupal site.
Please confirm that this is working by makring as RTBC and I can look at applying this.
Comment #6
mike.davis CreditAttribution: mike.davis at Deeson commentedUpdated the status
Comment #7
n.buisson CreditAttribution: n.buisson commentedHi Mike,
I came across the same issue using PgSQL, and after some investigation I found that the error had the same origin than the one with SQLite and that your patch should correct it. I tested it, and it does fix the issue.
Comment #8
n.buisson CreditAttribution: n.buisson commentedComment #9
Liam MorlandComment #11
mike.davis CreditAttribution: mike.davis at Deeson commentedI have committed this now