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
If you try to put particles into their own subfolder e.g. particles/my-particle on Grav, Gantry will crash at preg_match() with Unknown modifier: m on layout save.
Create a subdirectory, e.g. /particles/my-particle, and put your particle files there.
Use the particle in the Layout editor and save the layout.
Expected behavior:
It should either save the layout without throwing an exception or display a better error message that would indicate what should be fixed such as "Please make sure your particle files are inside the root of the particle directory".
Possible fixes:
Make it possible to put particles into their own directories (Fix #3191 #3192 makes the layout save and work, but options for particles in dirs still won't work).
Mention in the docs that particle files should be in a flat directory and either make the error message more descriptive or do not show the particles inside subdirectories in the Layout editor.
The text was updated successfully, but these errors were encountered:
fcFn
added a commit
to fcFn/gantry5
that referenced
this issue
Oct 20, 2023
Just my 2-cents here @fcFn. The documentation doesn't discuss the ability to place a particle into it's own subfolder under the TEMPLATE_DIR/custom/particles folder so the expected behavior is that this would fail, not that it would work.
So you're proposed "fix" isn't actually a fix, but rather it is considered to be an enhancement. If the files for the particles were all under one folder, i.e. .scss.yaml.twig & .js (if needed) then I could understand this but since those files are all under separate folders, I don't find your proposed enhancement necessary.
Can you provide a good case for the reasoning behind wanting to do this? I'm honestly curious because under the /particles folder there are only 2 files per particle, the .twig and the .yaml files.
@N8Solutions You're right. Perhaps it should just fail with a better message instead of what it does now, such as "Please make sure your particle files are inside the root of the particles directory" (this is on Grav by the way, I'll edit the post). Or maybe it should be mentioned that particles has to be a flat directory in the docs.
fcFn
changed the title
Particles in their own subdir show a non-descriptive error on Layout save
Particles in their own subdir show a non-descriptive error on Layout save with Grav
Oct 20, 2023
Description
If you try to put particles into their own subfolder e.g.
particles/my-particle
on Grav, Gantry will crash atpreg_match()
withUnknown modifier: m
on layout save.Steps to reproduce:
/particles/my-particle
, and put your particle files there.Expected behavior:
It should either save the layout without throwing an exception or display a better error message that would indicate what should be fixed such as "Please make sure your particle files are inside the root of the particle directory".
Possible fixes:
The text was updated successfully, but these errors were encountered: