avatar hsm-berlin
hsm-berlin
22 Jan 2022

Steps to reproduce the issue

There is an open_basedir exception on line 1221 see:
[22-Jan-2022 15:44:57 Europe/Berlin] PHP Warning: is_file(): open_basedir restriction in effect. File(/metadata.xml) is not within the allowed path(s): (...www:/tmp/) in ....www/administrator/components/com_menus/src/Model/ItemModel.php on line 1221

as reportet in the closed issue #35895 if you create an new MenuItem.

Expected result

/metadata.xml may not located at the root directory of the filesystem.

System information (as much as possible)

Joomla 4.0.6 with Apache | PHP on CentOS 8

avatar hsm-berlin hsm-berlin - open - 22 Jan 2022
avatar ChristineWk
ChristineWk - comment - 22 Jan 2022

Confirm the issue (see also closed one)
Hoster had a suggested solution, but I can't understand resp. comprehend it.
I don't know the right solution.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36788.

avatar Fedik Fedik - change - 22 Jan 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-01-22 18:46:33
Closed_By Fedik
avatar Fedik Fedik - close - 22 Jan 2022
avatar Fedik
Fedik - comment - 22 Jan 2022

please test #36789 for Joomla 3

avatar Fedik
Fedik - comment - 22 Jan 2022

and for Joomla 4 #36791

avatar richard67
richard67 - comment - 23 Jan 2022

@hsm-berlin Could you test if the changes from pull request (PR) #36791 fix this issue for you and if so, report back in that PR? Thanks in advance.

avatar durian808
durian808 - comment - 31 Jan 2022

I just discovered this on the site I'm working on, when attempting to add a new menu item. I rebuilt menus, but error remains.

Joomla 3.10.5
PHP 7.4.27

Error message:
Warning: is_file(): open_basedir restriction in effect. File(/metadata.xml) is not within the allowed path(s): (/var/www/vhosts/mywebsite.org/:/tmp/) in /var/www/vhosts/mywebsite.org/httpdocs/new/administrator/components/com_menus/models/item.php on line 1153

I am now attempting to debug this.

So far I've found that $base is empty in this code...

                // Now check for a component manifest file
                $path = JPath::clean($base . '/metadata.xml');

//jjj: debug
echo "base: [" . $base . "]
";
if (is_file($path))
{
$formFile = $path;
}
}


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36788.
avatar durian808
durian808 - comment - 31 Jan 2022

I just discovered this on the site I'm working on, when attempting to add a new menu item. I rebuilt menus, but error remains.

Joomla 3.10.5
PHP 7.4.27

Error message:
Warning: is_file(): open_basedir restriction in effect. File(/metadata.xml) is not within the allowed path(s): (/var/www/vhosts/mywebsite.org/:/tmp/) in /var/www/vhosts/mywebsite.org/httpdocs/new/administrator/components/com_menus/models/item.php on line 1153

I am now attempting to debug this.

So far I've found that $base is empty in this code...

                // Now check for a component manifest file
                $path = JPath::clean($base . '/metadata.xml');

//jjj: debug
echo "base: [" . $base . "]
";
if (is_file($path))
{
$formFile = $path;
}
}


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36788.

Add a Comment

Login with GitHub to post a comment