Is this a Joomla 4 change? It used to be set to a proper folder before. We have require_once calls that fail because of this. Worked in Joomla 3, not sure what changed during bootstrap here.

Only place I can find in the code is libraries/src/Filesystem/Path.php:removeRoot where they replace root with the string "[ROOT]".

Maybe using JPATH_SITE would work instead...

Maybe not a problem, just the LogEntry cleaning the message from root folder path.

  • You probably misunderstood something on this. JPATH_ROOT is only set to (removed) ”[ROOT]” in messages, otherwise it is defined in defines.php and in app.php in includes folder at bootstrapping Joomla: github.com/joomla/joomla-cms/tree/4.2-dev/includes . Probably something else is causing problems on require.
    – Zollie
    Mar 21, 2023 at 8:44
  • 1
    @Zollie Yes, thank you, I realized the string was filtered via the LogEntry class. :) So a new feature in Joomla 4. Mar 21, 2023 at 8:47


Your Answer

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

Browse other questions tagged or ask your own question.