PDOException: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "`" LINE 1: INSERT INTO role_permission (`rid`, `permission`, `module`) ^: INSERT INTO {role_permission} (`rid`, `permission`, `module`) VALUES (:rid, 'use exclude node title', 'exclude_node_title'); Array ( [:rid] => 1 ) in exclude_node_title_install() (line 18 of /Users/satchwinston/Sites/drupal7/sites/all/modules/exclude_node_title/exclude_node_title.install)

I'm using Postgres if that matters. This error occurred when I saved the module install page.

CommentFileSizeAuthor
#3 exclude_node_title-postgres-1645344-3.patch625 bytesgease

Comments

gabrielu’s picture

Status: Active » Needs review

Hi,
You can simply assign Permission "use exclude node title" to all users (including Anonymus). Otherwise title will be visible to all regardless of settings.

The install script was only tested on MySQL so it's most probably a compatibility issue with Postgres

Gabriel

pcpal’s picture

I have the same issue. I am using adaptive_theme. I checked all nodes for articles and custom contents. It does not hide the title.

gease’s picture

Status: Needs review » Patch (to be ported)
StatusFileSize
new625 bytes

You shouldn't use backticks in SQL statements - they are MySQL-specific.

greggles’s picture

Title: Does not work » Fatal error on postgresql - ERROR: syntax error at or near "`" LINE 1: INSERT INTO role_permission
Status: Patch (to be ported) » Reviewed & tested by the community
gabrielu’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Added to next release. 7.x-1.6

moskito’s picture

Version: 7.x-1.4 » 7.x-1.x-dev
Status: Closed (fixed) » Reviewed & tested by the community

Releases 7.x-1.6 and 7.x-1.x-dev still have this bug. Patch in #3 still works on 7.x-1.x-dev.

fizk’s picture

Status: Reviewed & tested by the community » Closed (fixed)

  • Commit 5f786d3 on 7.x-1.x, 8.x-1.x by fizk:
    #1645344 gease: Remove backticks in SQL query to support Postgres.