php_value open_basedir '/home/user/Joomla6/public_html/:/tmp/'Warning
: is_dir(): open_basedir restriction in effect. File(/images//) is not within the allowed path(s): (home/user/Joomla6/public_htm/:/tmp/) in
/home/user/Joomla6/public_htm/libraries/src/Form/Field/FilelistField.php
on line
194
in code
joomla-cms/libraries/src/Form/Field/FilelistField.php
Lines 191 to 197 in 56a0940
Since the CMS parent directory is not specified in the $path field, it returns an error.
The important thing is that I did not specify the directory path anywhere. The default path is set in the plugin and in the field.
php 8.3.25
I suggest inserting a dog sign (@) before the is_dir() functions.
if (! @is_dir($path)) {
$path = JPATH_ROOT . '/' . $path;
}| Labels |
Added:
No Code Attached Yet
|
||
The XML file has nothing to do with it.
I use the article fields.
I have created fields in the fields component.
And then I opened the articles editor. The user fields tab displays this error.
So it is bug in custom field. It have to use relative path without leading slash
| Labels |
Added:
bug
|
||
| Title |
|
||||||
@Fedik Please help me if I can't create a layout override for this IMAGELIST field.
I copied and renamed the layout file, but it does not appear in the layout list field.
/plugins/fields/imagelist/tmpl/imagelist.php
to
/plugins/fields/imagelist/tmpl/images.php
but it doesn't file appear in the field in the layout list.
I do not think it will work like that,
The override should be under template in its html folder:
templateName/html/plg_fields_imagelist/imagelist.php
Or something like that.
No, it doesn't work.
I opened the default Cassiopeia template.
In the settings, I created a redefinition of the plug-in layout plg_fields_imagelist
I checked the availability of the layout at
templates/cassiopeia/html/plg_fields_imagelist/imagelist.php
And created a copy
templates/cassiopeia/html/plg_fields_imagelist/pictures.php
There is still 1 default layout in the field layout list.
I use Cassiopeia by default. I also used CMS resources to create the layout. Unfortunately, it does not appear in the list.
I thought I didn't know much, but I did as you said.
I can confirm that the layout field in the field settings does not display that you have an override in the template
I can also confirm that changes in override in the templates/cassiopeia/html/plg_fields_imagelist/imagelist.php file are used when the field is displayed. NOTE: this is the display of the field output and NOT the display of the field input
But why is there a layout list field in the field parameters, because there is no information in this list? And from the point of view of the content administrator, there is confusion and misunderstanding.
That's exactly how I felt, I didn't understand what this list was for if there was no information and no choice either.
If this parameter is very important, then it can be hidden.
I would suggest it's a bug
Should me create a new issue?
yes please
No.
There a few levels of "field layouts".
What you see in field params, is looking for layout in /html/layouts/...
joomla-cms/administrator/components/com_fields/src/Field/FieldLayoutField.php
Lines 104 to 108 in 508ac3d
Create my-imagelist.php in one of these folder, and you should be able to pick it in the field configuration.
This layout is used for rendering the field value after it was rendered with tmpl layout of the plugin.
To override layout from tmpl use my previous comment.
@brianteeman Sorry maybe my comment was not clear.
There is 2 layout systems working here:
tmpl/ which render the field value ("plugin level" override),layouts/ which you can select in the field drop-down. This is kind of wrapper around the value which was already rendered by tmpl/Do not ask why.
I agree it is very confusing, but it is what it is.
You are missing the important part. When you create an override in the template manager it is created in a folder in a path NOT include in the list of paths. That is the BUG. Either fix the creation of the override so it is in an included path or fix the array of paths to include the correct path. Use joomla instead of reading the code to see the problem!!
Please check my comment again.
It is how it coded to work. There no way to connect these 2 override system in to ONE drop down. They serve for different purpose.
Look in Module system for example. There tmpl/ for rendering the module and the chrome layout to render result.
It kind of the same.
You can open an issue if you like.
But it is not a bug in the code because it works as it should. But limited documentation.
The documentation is very generic, and do not explain what exactly it is.
The layout field does not have any description.
Later I will hide all unrelated comments here.
Sorry you are wrong. Use the template manager to create an override. Edit it and check to confirm that it is used. That override should be displayed in the layouts drop-down just like all overrides. The code doesn't do that and that is the bug.
Use the template manager to create an override. Edit it and check to confirm that it is used
What exactly is used html/plg_fields_imagelist/imagelist.php or html/plg_fields_imagelist/foobar.php?
html/plg_fields_imagelist/imagelist.php will be used because it is tmpl/ override. But no, it should not be in existing drop-down. Existing layout field is for D I F F E R E N T purpose.
There no field for selecting layout for tmpl/ override. If you need such field then it will separated field, because it is DIFFERENT.
i am obviously using a different joomla to you
No, I understand what you doing. But you seem did not understand that there are TWO layout systems involved, and they not interchangeable.
Create file templates/cassiopeia/html/layouts/com_fields/field/foobar.php. And it will be available in that layout dropdown.
But then there's a mistake.
The template parameters override the layout at
/templates/cassiopeia/html/plg_fields_imagelist
but to display it in the layout list, you need an address.
/templates/cassiopeia/html/layouts/plg_fields_imagelist/field
I'm not arguing that the layout file should be located elsewhere. I don't have to create the file myself through the file manager. The template has an override function. The override function tells us that by overriding the layout with the built-in CMS functions, it should have been included in the layout list. This means that automatic redefinition is not being done in the right way.
Either the layout display list is not working, or the automatic layout override function is not working.
No.
There a few levels of "field layouts".
What you see in field params, is looking for layout in/html/layouts/...
I'm sorry, I didn't figure it out, but there is an assumption that your code example is a redefinition of layouts not of user fields, but a redefinition of input fields.
$template_paths = [
Path::clean(JPATH_SITE . '/templates/' . $template->element . '/html/layouts/' . $extension . '/field'),
Path::clean(JPATH_SITE . '/templates/' . $template->element . '/html/layouts/com_fields/field'),
Path::clean(JPATH_SITE . '/templates/' . $template->element . '/html/layouts/field'),
];It's very similar to redefining input fields.
I was asking about redefining plugin fields.
But in this case, if these overrides are displayed in the layout list, the strange thing is that the automatic override in the template parameters does not create an override at the correct address.
I hid unrelated comments.
I suspect you use FilelistField incorrectly.
Please post here the XML you use for the field.