-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed as not planned
Labels
Description
Steps to reproduce the issue
Change "administrator" folder in "/includes/defines.php" and "/administrator/includes/defines.php" to "admin"
rename "administrator" folder to "admin"
Expected result
Everything working
Actual result
Fields not getting loaded due to wrong path
System information (as much as possible)
Joomla 5.x
Additional comments
Fix paths in the "prepareForm" function in administrator/components/com_fields/src/Helper/FieldsHelper.php lines 430 and 431.
CURRENT CODE
$fieldset->setAttribute('addfieldpath', '/administrator/components/' . $component . '/models/fields');
$fieldset->setAttribute('addrulepath', '/administrator/components/' . $component . '/models/rules');
PROPOSED FIX
$fieldset->setAttribute('addfieldpath', str_replace(JPATH_ROOT, '', JPATH_ADMINISTRATOR) . '/components/' . $component . '/models/fields');
$fieldset->setAttribute('addrulepath', str_replace(JPATH_ROOT, '', JPATH_ADMINISTRATOR) . '/components/' . $component . '/models/rules');
Related
Related to issue #44980