-
Notifications
You must be signed in to change notification settings - Fork 333
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
DependentPages should use a DataList, not an ArrayList #2327
Comments
I'm going to try out a POC |
Another option is that we could add some config to disable back link tracking and dependent pages entirely. Large data sets make the CMS completely unusable by processing all of this data on every page load (in the CMS). |
This seems to be working OK: https://gist.github.com/robbieaverill/9a185078f1883daf30ff039e00c504b4 - we lose the identifier string for the type of relationship, but that could be added back in in the GridField that renders this list if we want to (by checking the class type) |
ping @silverstripe/core-team for feedback on whether you think it'd be acceptable to change this in 4.3 or not |
Isn't this an issue because back links aren't necessarily pages? I think that's why it's using the |
I think that that this would be okay but really, the lesson here is that our public API should have been declared to be SS_List not ArrayList. We need to be much more careful about not being overly restrictive in how we declare our public API. This also applies to, for example, the choice of private vs protected vs public members. So the typing hinting should be changed to be SS_List, not DataList. |
If that's the case then I guess we need to follow up on the todo in BackLinkTracking to implement a polymorphic many many list |
I've explored re-factoring DependentPage while looking at #2276 (comment) That was my thought at the time. We decided to put that on the back burner because of time pressure, but I think all of my point are still relevant ... except maybe the "put your head in the sand" bit.
|
Hi @chillu, should @maxime-rainville's points, mainly the
be extracted into a separate issue? Or changing the type of this issue to a bug? That specific thing is a bug causing 500 error anytime a CMS user visits the Dependent pages tab in SS4 where a page is linked from a content block (as it's trying to fetch a subsite details for blocks that are not using the subsite extension — default CWP recipe). |
Not sure I came across the subsite issue before. That's going to be a different problem. Do you want to raise a separate issue. |
@michalkleiner Yep separate issue for broken edit links please |
Hello @robbieaverill Getting this issue on CWP now, was there a solution to this? Thanks |
Not as of yet, as far as I know |
This got me again on a CWP project, grrr. New issue for the subsites problem: |
Version: SS 4.3.x-dev
The fact that
SiteTree::DependentPages()
generates an ArrayList means that it's executed whenever it runs. This is a major problem for high volume websites, particularly because this is called every time you callgetCMSFields()
on a page.I really think we need to modify this functionality so it can return a lazily executed DataList instead.
The text was updated successfully, but these errors were encountered: