I just want to test the Module for D7 but i get this error on fetching new mails with my Client.

PDOException: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined: SELECT t.nid FROM {support_ticket} t LEFT JOIN {node} n ON t.nid = n.nid LEFT JOIN {support_states} s ON t.state = s.sid WHERE t.client = :t.client AND n.title = :n.title AND isclosed = :isclosed ORDER BY nid DESC LIMIT 0, 1; Array ( [:t.client] => 1 [:n.title] => test anfrage [:isclosed] => 0 ) in _support_identify_ticket() (Zeile 3466 von /var/www/dafmr/html/sites/all/modules/support/support.module).

No support Ticket exist and the most settings are on default.

Comments

sslider999’s picture

Hello,

I get the same error

Is there a fix for this.

Thanks

nzcodarnoc’s picture

It seems that my setup hates periods in the field holder names.

So :n.title doesn't work, but :ntitle does.

I've updated the field holders like so, and the mail imports fine now.

    case 3: // Match against open tickets.
      $message['nid'] = db_query_range("SELECT t.nid FROM {support_ticket} t LEFT JOIN {node} n ON t.nid = n.nid LEFT JOIN {support_states} s ON t.state = s.sid WHERE t.client = :tclient AND n.title = :ntitle AND s.isclosed = :isclosed ORDER BY t.nid DESC", 0, 1, array(':tclient' => $client->clid, ':ntitle' => $message['subject'], ':isclosed' => 0))->fetchField();

I don't know enough about PDO to know if it's a problem with my setup that is causing field holder names with periods in them to fail.

I would appreciate comments from someone who know's about this.

nzcodarnoc’s picture

Just to report back, I thought it might have been a PHP version issue, as the server was running on PHP 5.2.10

Upgrading to PHP 5.3.2 did not resolve the issue.

I read that dashes are not ok, so :t-client would be illegal.

I'm wondering if it's the same with periods.

Is it OK with PDO to use periods in field place holders?

For example :t.client

bdragon’s picture

Status: Active » Fixed

It doesn't make sense to have dots in the placeholders anyway.

Should be fixed now.

http://drupalcode.org/project/support.git/commit/ea18a7a659ccb6a45484fa0...

sslider999’s picture

Hello,

The last update fixed the issue for me.

Status: Fixed » Closed (fixed)

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