- After migration Joomla 3.10.11 to 4.22.
- PHP 7.4
- Astroid 2.5.20
- A JoomDev template that works without issues on Joomla 3.
In frontend I get a white page with error
0 Call to undefined method Joomla\CMS\Factory::getXML()
/libraries/astroid/framework/template.php:60
It comes from these lines (method templateVersion()): https://github.com/templaza/astroid-framework/blob/v2.5.20/framework/template.php#L58-L63
Background: Method JFactory::getXML() has been removed in Joomla 4. See https://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_4#Factory
Factory::getXml has been removed along with JXMLElement. Use SimpleXMLElement directly instead.
I haven't made further investigations yet but the method templateVersion() itself has a bug with Joomla 4.