-
Notifications
You must be signed in to change notification settings - Fork 62
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
Breaks when used with GridFieldManyRelationHandler #40
Comments
What version of SilverStripe are you using? As well have you tried eliminating GridFieldManyRelationHandler see if that solves the issue? Also what does your model look like (the dataobject and the page type)? And the implementation code for the gridfield, for the model simplified versions are fine i.e just the getCMSFields and relationship definition on the dataobject. For the managed object just the database statics at the top are really all I need. |
Also in looking at the module you're referencing it maybe the case that GridFieldSortableRows may not work with this type of list. I'll need to do some experimenting, but please do provide the information I asked for in the previous post. It will help me narrow things down, and could lead me to discovering the issue may not be related to this module at all. Hard to say :) |
Silverstripe 3.1 master here is relevant code:
|
I just had a flash of genius and modified addComponent to force GridFieldSortableRows to go before GridFieldManyRelationHandler. This seems to be working. You might add a note to the readme.
|
Sweet thanks, I will definitely do that. |
Thanks for your help. As far as I'm concerned you may close this issue. |
I'll leave it for now so I'll remember to update the readme lol |
When using the GridFieldManyRelationHandler module https://github.com/simonwelsh/silverstripe-GridFieldRelationHandler on the same GridField, GridFieldSortableRows::fixSortColumn breaks on line 134.
ERROR [User Error]: Sort column SortOrder could not be found in Biography's ancestry.
The problem is occuring because the list being passed in is a DataList and not a ManyManyList, even though it Should be a ManyManyList.
I"m not really sure if this is a problem in SortableGridField or in GridFieldManyRelationHandler, but the error is occuring in code in SortableGridField so I thought I'd start here.
Relevant Code:
Error Report
The text was updated successfully, but these errors were encountered: