-
Notifications
You must be signed in to change notification settings - Fork 91
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
make compatible with SilverStripe 4.0 #136
Conversation
wtajak
commented
Dec 22, 2017
- pending fix for "Call to a member function setFieldFormatting() on null" in MemberProfilePage line 196
- pending fix for removed DataModel in code/formfields/MemberProfilesAddSectionAction.php line 81
- pending fix for "Call to a member function setFieldFormatting() on null" in MemeberProfilePage line 196 - pending fix for removed DataModel in code/formfields/MemberProfilesAddSectionAction.php line 81
'Unique' => function($val, $obj) { return $obj->dbObject('Unique')->Nice(); }, | ||
'Required' => function($val, $obj) { return $obj->dbObject('Required')->Nice(); } | ||
)); | ||
// TODO investigate as it breaks with error "Call to a member function setFieldFormatting() on null " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so far I was unable to resolve this issue so I left the code commented out as it breaks when trying to load a profile page in the admin panel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wtajak try $grid->getComponentByType(GridFieldDataColumns::class)
@@ -66,6 +77,7 @@ public function handleAddSection($grid, $request) { | |||
); | |||
$handler->setTemplate($this->template); | |||
|
|||
// TODO DataModel is removed in 4.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could not figure out how to change this code, DataModel class has been removed in SilverStripe 4.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say it can just be removed and just give it a wee test. There are no handleRequest functions defined that take a second parameter.
I am currently upgrading a site that uses this module from ss 2.4 to 4.0. I will get stuck into ss4 upgrade very soon |
Hang on I didn't realise this was a PR I thought it was just raising the issue. Great! Can this be merged @nglasl ? |
@nglasl I have an upgrade in progress that follows some conventions missing in this PR, it might be preferred https://github.com/sheadawson/silverstripe-memberprofiles/tree/ss4 |
Cheers @sheadawson, and thanks for putting this PR through @wtajak. I'm happy to review and merge this through when we confirm the above are no longer issues. If you've taken the upgrade from here @sheadawson, can you please submit a new PR with the changes when they're ready? Also, did you build from this existing fork with your changes? Thanks! |
#137 has been merged. Thanks for your work here, it's greatly appreciated :) |