I'm trying to make my news module modification working with Joomla 4. My module is calling custom fields and I use this autoloader below to make it work in Joomla 4. Can you tell me what is the proper way to use autoloader on Joomla 4 instead of using this legacy one?

JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');

1 Answer 1


This should still work in 4.0 but will break in 5.0. You are advised to use fully qualified class names. Remove JLoader::register() call and instead add a use statement:

use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.