J6.0.x – Gpstool 6.4.3 : Smart Search Tracks -> MysqliQuery::castAsChar Error
J6.0.x - Gpstool 6.4.3 : Smart Search Tracks -> MysqliQuery::castAsChar Error
Hi,
After Joomla 6.0.1 update, GPSTools error on "Track detail" SAVE :
"Call to undefined method Joomla\Database\Mysqli\MysqliQuery::castAsChar() " - Return to Dashboard
Problem is caused by "Smart Search - Tracks" plugin
File : /plugins/finder/tracks/src/Extension/Tracks.php
FIX : Replace
$a_id = $query->castAsChar('a.id');
$c_id = $query->castAsChar('c.id');
with :
$a_id = $castChar('a.id');
$c_id = $castChar('c.id');
Fix tested : J6.0.1 & J6.0.2 - PHP 8.3 - Gpstool 6.4.3
Smart Search - Tracks plugin : enable - Compat 6 = enable
No error in J5.4.1
Updated "track file and plg_finder_tracks plugin" attached
Same issue with Search & SmartSearch
./plugins/finder/tracks/src/Extension/Tracks.php:372: $a_id = $query->castAsChar( 'a.id' );
./plugins/finder/tracks/src/Extension/Tracks.php:381: $c_id = $query->castAsChar( 'c.id' );
./plugins/search/gpstools/gpstools.php:108: $a_id = $query->castAsChar( 'a.id' );
./plugins/search/gpstools/gpstools.php:116: $c_id = $query->castAsChar( 'c.id' );
You should issue a fix as this problem occurs if Smart Search Track is enable and J6 (Compat 6 enable)
You may send me patch to test.
Best regards, Gilles

