Possible Bug – CMS Live Preview

I think there may be a bug in the live preview function of the SMS Online Editor.

Context

My site has a top-level folder called ‘cms’. Inside it are five content folders, each containing posts. The cms folder also contains one standalone test .md file.

The Preview URL for the top-level cms folder is set to a test page on the site, which displays data from the standalone test .md file.

Each of the five content folders has its own Preview URL, which should override the Preview URL set at the cms level.

Expected Behaviour

When I click Preview for a .md file, the editor should use the Preview URL configured for that file’s own folder.

So, for files inside one of the five content folders, the preview should use that folder’s Preview URL and display data from the selected .md file.

Actual Behaviour

The Preview button always uses the Preview URL configured at the top-level cms folder instead.

In my project, whichever .md file I preview, the editor opens the test page configured at the cms level and displays the data from the standalone test .md file, rather than the selected file.

Steps to reproduce

  1. Open a .md file inside one of the content folders under cms.
  2. Click Preview.
  3. The preview opens the test page configured at the top-level cms folder, rather than the Preview URL configured for the file’s own folder.

The site is: https://test.hannamfamily.org.uk and this is uploaded to Elements Cloud: elementsapp://downloadDocument/ALJ8Tw3Lhkyr

If @Dan or @ben would like the login details for the project’s Online CMS editor, please let me know.

Many thanks,

Brett

Hi @BrettHannam

Does it work as expected if you add each folder as a new folder in the CMS Online Editor? So rather than just adding the root folder, add each folder individually.

Hi @Ben,

Thank you for the quick reply.

Yes - the bug disappears if all the folders are at the same top level in the Online Editor; it is only if a folder is below that top level that the problem occurs.

I have removed the old structure: CMS/folder1, folder2 etc so everything resides on the top level and works correctly.

Thank you very much indeed for the solution.

Brett