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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ybabel created an issue. See original summary.

ybabel’s picture

Version: 7.x-1.0 » 7.x-1.0-rc1
Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, autoassignrole-addperrolepath-sqlite-1.diff, failed testing.

mike.davis’s picture

Hi, 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.

mike.davis’s picture

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

mike.davis’s picture

Status: Needs work » Needs review

Updated the status

n.buisson’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +psql

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

n.buisson’s picture

Assigned: ybabel » Unassigned
Issue tags: -psql +pgsql
Liam Morland’s picture

Issue tags: -pgsql +PostgreSQL

  • mike.davis committed bb6713a on 7.x-1.x
    Issue #2611754 by ybabel, mike.davis: PDOException: SQLSTATE[HY000]:...
mike.davis’s picture

Status: Reviewed & tested by the community » Fixed

I have committed this now

Status: Fixed » Closed (fixed)

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