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

make compatible with SilverStripe 4.0 #136

Closed
wants to merge 2 commits into from
Closed

Conversation

wtajak
Copy link

@wtajak 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 "
Copy link
Author

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

Copy link
Contributor

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
Copy link
Author

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

Copy link
Contributor

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.

@sheadawson
Copy link
Contributor

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

@sheadawson
Copy link
Contributor

Hang on I didn't realise this was a PR I thought it was just raising the issue. Great! Can this be merged @nglasl ?

@sheadawson
Copy link
Contributor

@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

@nglasl
Copy link
Contributor

nglasl commented Jan 25, 2018

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!

@sheadawson
Copy link
Contributor

@nglasl cheers. I built from scratch before I realised this work had been done already by @wtajak . Will test tomorrow

@sheadawson sheadawson mentioned this pull request Feb 8, 2018
@nglasl
Copy link
Contributor

nglasl commented Feb 19, 2018

#137 has been merged. Thanks for your work here, it's greatly appreciated :)

@nglasl nglasl closed this Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants