Elements CMS Online editor: array in the Markdown frontmatter

Hi Ben and Dan

first of all, congratulations on publishing the Online Editor, wonderful!

I’d like to report a bug in the Elements CMS Online Editor (v2). Let me know if it’s not.

When entering an image filename in the ‘Image’ metadata field via the Online Editor, the value is saved incorrectly as an array in the Markdown frontmatter:

image: [modern-agency-space.jpg]

However, Elements expects a plain string:

image: modern-agency-space.jpg

This causes the image to not display on the live site, even though the file exists and is accessible via the correct URL (e.g. https://yourdomain.com/resources/modern-agency-space.jpg).

The issue only occurs when the image is entered through the Online Editor. Articles created via the Elements Mac App save the image field correctly as a plain string, and the image displays as expected.

Workaround: Manually editing the .md file via FTP and removing the square brackets fixes the issue.

Steps to reproduce:

  1. Open the Online Editor
  2. Create or edit an article
  3. Enter an image filename in the Image metadata field
  4. Save the article
  5. Check the .md file on the server — the image value will be wrapped in square brackets

Expected behavior: The image field should be saved as a plain string.
Actual behavior: The image field is saved as an array.

I hope this helps! Please let me know if you need any further information.

Best regards

Thanks for the report, I wonder if the default is wrong :thinking:

Can you check your fields are set up correctly, you’ll want the image to be set to “resource”.

Let me know how you get on.

Dear

Dan. Ah, mine is set to “text”, but without a purchased license I can’t change that path? Or where else can I change it? Let me know if this is the reason, a missing license. Thanks a lot

Hi @JGWeiland

Thank you for the detailed bug report, it’s very much appreciated :slight_smile:

I’ve taken a look at this issue, and without your existing markdown files, I’m unable to be certain if this is a bug in the Online Editor or some malformed frontmatter.

Would you be able to send me the project file? You can do so via Elements Cloud :slight_smile:

Thanks!

Hi Ben. I am happy to share the link, would I do this here in the forum, or how can I contact you?

you can share it here if you’re ok with that, or email to ben at realmac software :slight_smile:

Hi Ben

Just found the email forumsupport@realmacsoftware.com and did send you the project link :)) Thanks a lot