Hi, while upgrading a site that uses FaLang translations I encountered inconsistent routing and contacted the developer. He pointed out that there is a problem in the code of administrator/components/com_k2/tables/k2category.php
And offered the following fix:
line 72
$query = 'SELECT ' . ' FROM ' . $this->_tbl . ' WHERE ' . $this->_tbl_key . ' = ' . $db->Quote($oid);
$db->setQuery($query);
/ since J4 compatibility */
$result = $db->loadAssoc();
The problem is you load 2 time the loadAssoc on the same query and it's make problem with Falang but you are not supposed to make this.
Could you please take a look on the FaLang related routing of k2 items. Sometimes it works, but sometimes the urls are wrong or result is error 500 after a long time of loading.
Hi, while upgrading a site that uses FaLang translations I encountered inconsistent routing and contacted the developer. He pointed out that there is a problem in the code of administrator/components/com_k2/tables/k2category.php And offered the following fix:
line 72 $query = 'SELECT ' . ' FROM ' . $this->_tbl . ' WHERE ' . $this->_tbl_key . ' = ' . $db->Quote($oid); $db->setQuery($query); / since J4 compatibility */ $result = $db->loadAssoc();
try { $result = $db->loadAssoc(); $K2CategoriesInstances[$oid] = $result;
replace it by
$query = 'SELECT ' . ' FROM ' . $this->_tbl . ' WHERE ' . $this->_tbl_key . ' = ' . $db->Quote($oid); $db->setQuery($query); / since J4 compatibility */ //$result = $db->loadAssoc();//sbou5
try { $result = $db->loadAssoc(); $K2CategoriesInstances[$oid] = $result;
The problem is you load 2 time the loadAssoc on the same query and it's make problem with Falang but you are not supposed to make this.
Could you please take a look on the FaLang related routing of k2 items. Sometimes it works, but sometimes the urls are wrong or result is error 500 after a long time of loading.