silverstripe/silverstripe-elemental

CMS Preview has issues with subsites

Opened this issue · 0 comments

wilr commented

Module version(s) affected

All

Description

The CMS Preview when using subsites with Elemental always shows the main website and not the relevant subsite.

This is because on the Element class, CMSPreviewLink uses the 'Link' method of the page (which may return mainsite.cwp.govt.nz/page/url) not subsite aware version of the correct CMS preview link (mainsite.cwp.govt.nz/page/url?SubsiteID=1)

How to reproduce

This will manifest itself in a few ways the the easiest way to reproduce is

  • When using subsites and editing a subsite from the main site domain (i.e *.cwp.govt.nz).
  • The block is non-inline editable.
  • The CMS Preview will incorrectly displaying the main website and not the subsite.

Possible Solution

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)

PRs