Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot view dependent pages when the link exists on content outside of SiteTree #436

Open
ScopeyNZ opened this issue Jul 9, 2019 · 2 comments

Comments

@ScopeyNZ
Copy link
Member

ScopeyNZ commented Jul 9, 2019

Description

When viewing dependent pages (added by CMS) with Subsites installed the page will crash when the link to the page exists on a DBField that does not belong to the SiteTree (or a subclass of it).

Versions tested

CMS 4.4.x-dev
Subsites 2.3.x-dev
(Elemental 4.1.x-dev)

Steps to reproduce

  • Install Elemental as an example of something that's not a page that contains content
  • Create a blocks page and add a content block. Add a link to the HTML field provided by the content block and link to an existing page on the site. Save and publish.
  • Browse to edit the page in the CMS that you linked to in the previous step.
  • Click the "Dependent Pages" tab that should appear
  • Observe an error in an alert and that the tab does not load

Running composer remove silverstripe/subsites, dev/build, and then reloading the page resolves the issue.

Notes

From a very brief look, it seems as though there's some code somewhere assuming the existence of a Subsite attribute on whatever the end (Parent) relation is on a SiteTreeLink (I think). This is an invalid assumption.

@michalkleiner
Copy link
Contributor

Still an issue at the end of 2021.

@mikey-harveycameron
Copy link

Still an issue. If stuck, write an extension to sitetree and use updateCMSFields to unset 'Subsite.Title' from the gridfield's setDisplayFields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants