Vox Populi(x) forum

Alexandria Book Library => Errori (Bugs) => Topic started by: Slacker on 15 October 2025, 16:49:17

Title: Joomla 6 problem
Post by: Slacker on 15 October 2025, 16:49:17
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.
Title: Re: Joomla 6 problem
Post by: RobertG on 23 October 2025, 10:50:24
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,
Title: Re: Joomla 6 problem
Post by: RobertG on 23 October 2025, 18:12:58
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.
Title: Re: Joomla 6 problem
Post by: Slacker on 29 October 2025, 09:19:24
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.
Title: Re: Joomla 6 problem
Post by: Pino on 08 November 2025, 18:36:59
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
Title: Re: Joomla 6 problem
Post by: Slacker on 11 November 2025, 20:37:13
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.
Title: Re: Joomla 6 problem
Post by: RobertG on 01 December 2025, 16:22:08
No Slacker, the first step needs to make changes to exclude the use of the J5 compatibility plugin, and therefore make a lot of changes, even more than I have managed to do.
Federica told me she will work on it when she has time. Let's be patient. ;)