Database error on 'Reload strings' - Multilingual
Permalink
Hi there,
Whenever I go to "System & Settings > Multilingual > Translate Site Interface" and try to 'Reload Strings' I get this error:
An unexpected error occurred.
Have no clue what to do or if it is just me. Found nothing about it.
Whenever 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.
concrete/vendor/mlocati/concrete5-translation-library/src/Parser/DynamicItem/Area.php
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.
<?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'; } /**
Viewing 15 lines of 34 lines. View entire code block.
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.
@mlocati:
-- Determine the MySQL version
select @@version;
-- Determine the MySQL mode:
select @@sql_mode;
-- 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
Next concrete5 version will contain a fix for this.
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:
Could you confirm that this new query fixes the problem?
Thanks!
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!
@mlocati:
I confirm, that's a fix! Many 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;