Multilanguage: UI broken after saving page + file extension broken when saving page in second language: default.md.fr.md
When saving a new page in a multi-lingual site, the Admin UI is broken.
Steps to reproduce:
-
Create a fresh install from zip with Grav 1.7.33. + Admin
-
Open Admin
-
Create new page and save: All is well

-
Add languages
enandfrin Configuration panel -
Create new page and save: Faulty page layout

-
Save current page as second language: Page throws error

-
Inspect the filesystem: Faulty file extension
user/pages/ ├── 01.home │ └── default.md ├── 02.typography │ └── default.md ├── 03.pageone │ └── default.md └── 04.pagetwo ├── default.en.md └── default.md.fr.md <-- Note the file extension
Perhaps this is caused by an outdated version of the Admin plugin. I'm running with v1.10.27 against Grav 1.7.33 and experiencing the same. @pamtbaau, what version of Admin are you experiencing this with?
Also saving a content item into another language (e.g. English item being saved as French) caused superfluous suffix added to the markdown file resulting in item.en.md.fr.md.
I did my tests on a fresh install of the latest versions: Grav 1.7.33 + Admin 1.10.33.1.
This is weird. Created another fresh install and saving the page in the first language return a correct UI and saving the page in second language gives an error because of a faulty file extension: default.md.fr.md
I've update my initial post
After some more tests, it seems to be a Grav core issue and not Admin.
- Installed from zip latest Grav 1.7.33 + Admin
- Downgraded Admin to earlier version
- Admin shows issues
- Installed from zip Grav 1.7.32 + Admin
- All goes well
- Upgraded Grav to 1.7.33 (not the plugins)
- Admin shows issues
Looking at the changelog of Grav core, the following sound suspicious:
- When saving yaml and markdown, create also a cached version of the file and recompile it in opcache
- Fixed missing changes in yaml & markdown files if saved multiple times during the same second because of a caching issue
@rhukster please help figure this out.
I'm looking into this now. I am able to reproduce the issue, so I'm just trying to figure out what goes wrong.
Clearing cache fixed the issue for me. Huh..
Phew, that was a hard issue to track down. It's fixed now in CI!
(Was fixed in Grav)
Great! Something I can do to test?
Looks like we didn't have CI builds available, lol. OK, so here's the fix:
https://github.com/getgrav/grav/commit/6fa96ca5545346cea152f2a748ada8950acba837#diff-c392650076318a0cca3f36706cc910159a2f35242ef8b7db4da2bcb61bad761dR141-R144
Cloned branch 'develop' and ran above steps. All seems to be working well!
Thank you!
Or that, lol.