getgrav / getgrav/grav-plugin-admin

The media_order in *.fr.md file does not match Admin dropzone contents

Open
#2,328 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
377
Forks
225
Avg merge
11h 51m
Merged PRs (30d)
4

Description

I'm working on localizing a site, adding *.fr.md files and renaming/adding images as *.fr.jpg and *.en.jpg, and have run into a strange behaviour:

- When viewing a `modular.fr.md` page in the Admin with Francais selected, the dropzone shows the newly renamed and added images.
- When viewing the `modular.fr.md` file in Sublime Text, the media_order still shows the older (pre-renaming) files. The Expert mode is Admin agrees with Sublime Text.

**Screenshot with `banner.jpg` in Expert view but `banner.en.jpg` in dropzone**

![Screen Shot 2023-01-12 at 8 43 46 AM](https://user-images.githubusercontent.com/998832/212094591-97907f8b-9f74-4e4a-9649-774e50cb1844.png)

Editing & saving the page content in Admin or Sublime Text is reflected in both. This same issue is reproducible with a non-modular *.fr.md page.

## Possibly Related

I'm on a Mac and the `.fr.md` in question is `user/pages/07.service/01.national-accounts/modular.fr.md`. The macOS Finder shows any `.service` file (like the 07.service in this path) as a program (app bundle) instead of a folder. So I have to use Show Package Contents in the Finder to navigate into it.

I can navigate to it just fine in the Terminal, but I wonder if that's somehow throwing the Admin file reading off? What really makes no sense is that the media_order is wrong and the dropzone is right. I'd expected the opposite.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.