I haven't succeeded in finding exactly this problem reported (but similar) for 7.0. When I want to translate a string (into Swedish in this case) and try to go to admin/config/regional/translate/translate, I receive this error (and no real page shows up):
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 ':db_condition_placeholder_1 ESCAPE '\\') )) subquery' at line 2: SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {locales_source} s LEFT OUTER JOIN {locales_target} t ON t.lid = s.lid WHERE ( (s.source LIKE :db_condition_placeholder_0 ESCAPE '\\') OR (t.translation LIKE :db_condition_placeholder_1 ESCAPE '\\') )) subquery; Array ( [:db_condition_placeholder_0] => %% [:db_condition_placeholder_1] => %% ) i PagerDefault->execute() (rad 75 av /xyz/includes/pager.inc).
I test with a clean install of Drupal 7.0 with standard theme and cache cleaned.
Comments
Comment #1
aspilicious commentedNot critical as it doesn't brake your site :)
I translate all the time never saw this issue...
Comment #2
bfroehle commentedRunning the query
SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM locales_source s LEFT OUTER JOIN locales_target t ON t.lid = s.lid WHERE ( (s.source LIKE '%%' ESCAPE '\\') OR (t.translation LIKE '%%' ESCAPE '\\') )) subquerydoesn't generate any errors for me.What version of MySQL are you using?
Comment #3
bengt commentedMy version is of MySQL is 5.0.67. Only non-core module activated is Backup and Migrate 7.x-2.1. The site is installed as multi-site in settings.php:
Comment #4
plachComment #5
damien tournoud commentedMarked #1092126: Sql-error when searching for more than one word, because the root cause is probably the same.
Can you give us as much information as possible about your environment (especially the exact version of each component)? The error you are seeing seems to take its source in a broken version of PHP or PDO.
Comment #6
bengt commentedI can give you all phpinfo if you want, but here is a digest:
As stated above, the MySQL server version is 5.0.67 (it is run on a web hosting).
Can you see any problems from this information? What more information could be of interest in this case?
Comment #7
Proj commentedSubscribe
Comment #8
bengt commentedChanged status
Comment #9
sun@bengt: What's the default collation of your database, and what's the collation of locale_* tables?
Comment #10
sunComment #11
bengt commented@sun: I have the following:
Default Character set: "utf8 -- UTF-8 Unicode"
Default Collation: "utf8_general_ci"
If by " locale_*" you mean "locales_source" and "locales_target", then the collation is "utf8_general_ci" for both (all tables have that collation).
The collation for the "MySQL connection" is "utf8_unicode_ci".
Comment #12
bengt commentedComment #13
Flommy commentedI'm getting the very same error message when I try to enter the "Translate"-tab.
Did you solve your problem bengt?
Comment #14
bengt commented@Flommy: No, not yet. My web hosting company (FS Data) have been looking into it for a long time now, but haven't solved it yet. I guess you don't only have problems with Translate, but also searching for more than one word, or?
Comment #15
Flommy commented@Bengt: Funny thing, we are both using FS-data and translate won't work :P Haven't noticed any problems with searching yet
Comment #16
bengt commentedHave upgraded to D 7.7, but the problem is still there.
@Flommy: Have you found any solution yet?
Comment #17
Flommy commented@Bengt: Have also updated and no change. Haven't found any solution, hoping that it will sort itself out. Last resort is to recode the failing query(ies).
Comment #18
bengt commentedMy web hosting company (FS Data) now confirmed that it is a PHP/PDO error and that it will be solved when they later upgrade to PHP 5.3 (now they have PHP 5.2.14). Does anyone know how to make a quick interims fix by recoding the failing query(ies) (e.g in pager.inc)?
Comment #19
angelg33k commentedJust FYI, I am also using FS Data and I am having the same problem.
On a side note, they told my client that they would have to contact the .se registrar, just to point the domain name to a different sub folder of the web root, and that it would take two days. Clowns.
Comment #20
ropaolle commentedEDIT: I also have this problem on FS Data, i.e. I get the error when I try to show the transaltion page or using more then one word in the search field.
@bengt: Did FS Data give you any indication of when they plan to update to 5.3?
Comment #21
aspilicious commentedDrupal 7: PHP 5.2.5* or higher (5.3 recommended)
You should always verify the minimum specs of drupal and your server before upgrading/installing drupal...
Comment #22
bengt commented@ropaolle: Sometime during "the autumn".
@aspilicious: You are correct, but the version FS Data uses (as stated above), PHP 5.2.14, is a later version than the minimum version of PHP 5.2.5.
Comment #23
ropaolle commented@bengt: Ok I see and thanks for the input. I'll also report this issue to FS Data, the more the merrier.
Comment #24
gerhard1176 commentedI am having the same problem.
I refer to #18 above. According to a message we got from FS-Data yesterday, they have currently no definite plans to go to PHP 5.3.
Does anybody have a workaround?
Comment #25
gerhard1176 commentedTo my surprise, the error has magically disappeared! And the site is still running on PHP 5.2.14 (but FS-Data will install PHP 5.3 on request).
Comment #26
ropaolle commentedFS-Data added a symlink to another nod and asked me to try install Drupal there, but before I tried that I also found that the problem have disappeared. Magic! Maybe we can close this issue. Does it work for you too Bengt?
Comment #27
bengt commentedYes, it seems suddenly to work. But why? I will ask FS Data and if I get an answer I will then close the issue.
Comment #28
bengt commentedFS Data reports that they have made several updates, but they don't know which update did solve this issue. Hmmm... just hope that it will not reappear.