I'm using the latest build of J!4. I have a component that has library files under joomla_root\libraries\mycomponent but the namespaced files in this directory aren't loaded by Joomla! 4 autoloader.

So what is the way to do it in Joomla4?

  • Can you share the code you're currently using to try and load them? – Lodder Jan 10 at 8:34
  • The package of the component has the component itself and the libraries(com_mycomponent, the libraries) each has his one xml, i have added in the xml <namespace>Mycomponent\Subname\Libraries</namespace> and i trying to load the libraries by calling \JLoader::registerNamespace('Mycomponent\\Subname\\Libraries\\', JPATH_LIBRARIES . '/mycomponent'); – user3533235 Jan 10 at 10:31
  • Please update your original question with the formatted code. Maybe this has something to do with it: github.com/joomla/joomla-cms/issues/27459 – Lodder Jan 10 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.