Joomla 6 problem

Started by Slacker, 15 October 2025, 16:49:17

Previous topic - Next topic

Slacker

Yesterday I intended to upgrade to Joomla 6, but was stopped by a new plugin that gave JFactory error for Abook router. Also another extension had problems.

RobertG

Hi,

Alexandria Book Library needs the compatibilty plugin for J5, sot the extensions is not Joomla! 6 compatible.
It needs a lot of changes.
Is Federica planning to make these updates?
Regards,

RobertG

Hi,

I changed a lot of classes to "use" declarations. It remains a lot of "jimport" lines to change, but the main problem is very old classes as JToolBarHelper or HTMLHelperSidebar that I won't be able to change.
I don't understand how AB can work with these old classes, even with the compatibility plugin.

Slacker

Thanks for the input. RobertG! I thought it would be a simple fix like one line of code. What you describe is much more complex problem than I realized.

Pino

Posso solo confermare la presenza di un problema di compatibilità con Joomla 6.
Ho aggiornato un mio vecchio sito (più di 10 anni) da Joomla 3 a Joomla 6 e di conseguenza da Alexandria 3.1.5 a 4.0.6. Ho effettuato una migrazione del Database con SQL (abbastanza agevole) ho verificato nel backend che tutto fosse a posto ma ... avviando in frontend il componente mi appare questo errore: "Call to undefined method Joomla\Database\Mysqli\MysqliQuery::castAsCha". Verificato un po' in giro e risulta essere appunto un problema di metodo di accesso non più supportato da Joomla 6. Non posso/voglio andare oltre per cui mi/Vi chiedo se ci sono soluzioni in vista. Grazie

Slacker

I asked ChatGPT:
The error message "Call to undefined method Joomla\Database\Mysqli\MysqliQuery::castAsCha..." (note: likely truncated to "castAsChar") indicates that a method is being called which no longer exists (or never existed) in the current version of Joomla! (or its database query class).

Replace the method call with the new equivalent

If the method castAsChar() is removed or deprecated, change it to use castAs() with appropriate parameters.
For example:
$query->select($query->castAs('CHAR', 'your_value'));

Ensure you match the correct signature (type, value, optionally length) as per Joomla's query builder docs.