silverstripe / silverstripe-elemental

Create pages in Silverstripe CMS using content blocks
http://dna.co.nz
BSD 3-Clause "New" or "Revised" License
109 stars 115 forks source link

CMS Preview has issues with subsites #1182

Open wilr opened 4 months ago

wilr commented 4 months ago

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

Possible Solution

Additional Context

No response

Validations

PRs