Database error on 'Reload strings' - Multilingual
PermalinkWhenever I go to "System & Settings > Multilingual > Translate Site Interface" and try to 'Reload Strings' I get this error:
An unexpected error occurred.
An exception occurred while executing 'select distinct (binary arHandle) as AreaName from Areas order by arHandle': SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'my_db_name.Areas.arHandle' which is not in SELECT list; this is incompatible with DISTINCT
Have no clue what to do or if it is just me. Found nothing about it.
<?php namespace C5TL\Parser\DynamicItem; /** * Extract translatable data from Areas. */ class Area extends DynamicItem { /** * @see \C5TL\Parser\DynamicItem::getParsedItemNames() */ public function getParsedItemNames() { return function_exists('t') ? t('Area names') : 'Area names'; } /**
This line $rs = $db->Execute('select distinct (binary arHandle) as AreaName from Areas order by arHandle'); must be giving the error. I am no SQL programmer, so I am at a loss.
-- Determine the MySQL version
select @@version;
5.7.15
-- Determine the MySQL mode:
select @@sql_mode;
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
In the meanwhile, you can fix it yourself by changing the failing query (that you correctly identified), by adding "binary " right before the last "arHandle", so that you'll have this query:
select distinct (binary arHandle) as AreaName from Areas order by binary arHandle
Could you confirm that this new query fixes the problem?
Thanks!
I confirm, that's a fix! Many thanks.
In order to determine these values you can run these two mysql queries:
-- Determine the MySQL version
select @@version;
-- Determine the MySQL mode:
select @@sql_mode;