I do a fresh install of this module on a D7 module that already has content.

On the admin panel I get the message
"The content access permissions need to be rebuilt. Rebuild permissions."

When I click Rebuild Permissions I am presented with the following error:

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?render=overlay&id=23&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 4: SELECT t.* FROM {taxonomy_index} r INNER JOIN {taxonomy_term_data} t ON r.tid = t.tid INNER JOIN {taxonomy_vocabulary} v ON t.vid = v.vid WHERE (r.nid = :db_condition_placeholder_0) AND (t.vid IN ()) ; Array ( [:db_condition_placeholder_0] => 13 ) in _tac_lite_get_terms() (line 460 of /var/vhosts/friendsandheroes.com/web/sites/all/modules/tac_lite/tac_lite.module).

Comments

Dave Cohen’s picture

While this certainly needs to be fixed, I suspect if you configure at least one scheme on the tac_lite admin pages, then rebuild permissions it might succeed, just as a workaround.

matthewdolman’s picture

wonderful, thanks

esculcar’s picture

+1 suscribing

mcaden’s picture

I can confirm both the problem and the workaround in #1

shadowmihai’s picture

I confirm both the problem and the workaround in #1

shadowmihai’s picture

subscribe

anthonyR’s picture

Great temporary fix in #1

thekevinday’s picture

Status: Active » Needs review
StatusFileSize
new480 bytes

The problem seems to be that there are duplicate resets on terms with the same ID.

Here is a proposed fix that solves the problem by directly specifying the array id to be the term id.
The problem is that this feels like a work-around of the real problem.

How exactly are duplicate tids happening and should this be allowed?

Please review that this patch neither hides any real issue nor breaks any existing functionality.

mikel.artaso’s picture

Hi.

I am a newbie to drupal but I got the same error and none of the above solves the issue for me. Any info I can post so you can help me to try to solve it?

Bests,
Mikel

FrequenceBanane’s picture

The problem seems to be in tac_lite.module where :

  // Get the vids that tac_lite cares about 
$vids = variable_get('tac_lite_categories', NULL);
[...]
$query->condition("t.vid", $vids, 'IN');

After creating a scheme and applying the proposed patch, the value of my 'tac_lite_categories' variable is a:1:{i:11;s:2:"11";} but permission reconstruction encounter an unknown issue each time I try to do it, although there is no issue in the issue report of my website !

Any idea ?

schultetwin’s picture

Possibly related to this?
http://blog.richardknop.com/2009/10/sqlstate42000-syntax-error-or-access...

So I believe Dave is correct.

garethsprice’s picture

StatusFileSize
new1.44 KB

The module is blowing up if there are no tac_lite vocabularies defined, it's running "AND (t.vid IN ())" where the IN is empty, and MySQL does not like that.

Fixed by adding an if(empty()) check in _tac_lite_get_terms() around line 453.

Note that the attached patch also includes the previous patch posted to this thread, which I had tried as a first-fix.

Dave Cohen’s picture

Status: Needs review » Fixed

This is an old issue that I lost track of. Looking it over, I'm pretty sure that patch is reversed.

At any rate, I believe the problem was fixed some time ago.

Status: Fixed » Closed (fixed)

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