?
Referenced as Related to: # 5318
avatar marneu
marneu
1 Dec 2014

An SQL Error occurs within com_finder in a German environment when saving an article.

The weight value is not quoted, thus making a value of 1,5 looking like an other value instead of translating it to 1.5

I've found a workaround here:
http://getserver.de/bugs-fixes/12-joomla-3-x-finder-plugin-verursacht-fehler-beim-speichern-eines-beitrages.html

avatar marneu marneu - open - 1 Dec 2014
avatar jissues-bot jissues-bot - change - 1 Dec 2014
Labels Added: ?
avatar zero-24
zero-24 - comment - 1 Dec 2014

I've found a workaround here:
http://getserver.de/bugs-fixes/12-joomla-3-x-finder-plugin-verursacht-fehler-beim-speichern-eines-beitrages.html

Translation for the non german here:
Error Message

Speichern fehlgeschlagen! Fehler: Column count doesn't match value count at row 1 SQL=INSERT INTO `jos_finder_tokens` (`term`,`stem`,`common`,`phrase`,`weight`,`context `,`language`) VALUES ('impressum', 'impressum', 0, 0, 0,6, 1, 'de') 

note the 0,6 that is not quoted.

The Autor noted that this is a issue with the Hosting envoirment (LOCALE) that can be fixed by.
dpkg-reconfigure locales (<-- Debian)

Or by code here: administrator/components/com_finder/helpers/indexer/driver/mysql.php Line: 602
Old:

. (float) $token->weight . ', '

New:

. (preg_match('/,\d+$/', $token->weight))?str_replace(array('.', ','), array('', '.'),$token->weight):str_replace(',','',$token->weight) . ', '
avatar marneu
marneu - comment - 1 Dec 2014

btw: Both solutions did not work for me, I did instead:

. str_replace(',', '.', $token->weight) . ','

avatar zero-24 zero-24 - change - 1 Dec 2014
Category Administration SQL
avatar Hackwar
Hackwar - comment - 4 Dec 2014

See the fix in #5318

avatar brianteeman brianteeman - change - 4 Dec 2014
Status New Closed
avatar brianteeman brianteeman - close - 4 Dec 2014
avatar brianteeman brianteeman - change - 4 Dec 2014
Closed_Date 0000-00-00 00:00:00 2014-12-04 10:46:10

Add a Comment

Login with GitHub to post a comment