You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is a bug or a side-effect of something that's not supported but almost works by accident.
If you create a fieldset in a subdirectory, such as /resources/fieldsets/components/image.yaml, it appears in the UI with the handle components.image, and you can use it elsewhere correctly. However:
Although the fields function perfectly in the CP, on the frontend the values are not converted to Value objects
If you try to edit it in the CP it gets saved to a different location: /resources/fieldsets/components.image.yaml
it does not appear to be possible to create a subdirectory fieldset in the CP, as the . and / characters are invalid
I realise this is probably just an unsupported feature, but as the CP does almost handle it correctly I thought it could be a bug. If it is unsupported, it would be a very useful feature to add.
How to Reproduce
Values issue
Create a /resources/fieldsets/components/image.yaml file
Use it in a Bard field
Check the field values on the frontend, they're not Value objects
File issue
Create a /resources/fieldsets/components/image.yaml file
Go into the CP and edit and save it
Check for /resources/fieldsets/components.image.yaml file
Environment
Statamic 3.0.40 Solo
Laravel 8.25.0
PHP 7.3.16
local/extensions dev-main
Install method (choose one):
Existing Laravel app
The text was updated successfully, but these errors were encountered:
Yeah, it sounds like fieldsets in sub directories aren't supported yet. However, it's probably not a massive effort to actually add support for it, by the sounds of it.
I also found, that the find and exists methods in Statamic\Fields\FieldsetRepository will actually look for a subfolder path. The following will only return true if the fieldset exists at fieldsets/components/image.yaml. It will return false if it's fieldsets/components.image.yaml.
Bug Description
I'm not sure if this is a bug or a side-effect of something that's not supported but almost works by accident.
If you create a fieldset in a subdirectory, such as
/resources/fieldsets/components/image.yaml
, it appears in the UI with the handlecomponents.image
, and you can use it elsewhere correctly. However:/resources/fieldsets/components.image.yaml
.
and/
characters are invalidI realise this is probably just an unsupported feature, but as the CP does almost handle it correctly I thought it could be a bug. If it is unsupported, it would be a very useful feature to add.
How to Reproduce
Values issue
/resources/fieldsets/components/image.yaml
fileFile issue
/resources/fieldsets/components/image.yaml
file/resources/fieldsets/components.image.yaml
fileEnvironment
Statamic 3.0.40 Solo
Laravel 8.25.0
PHP 7.3.16
local/extensions dev-main
Install method (choose one):
The text was updated successfully, but these errors were encountered: