I couldn't get the ModelAdmin example from the documentation http://doc.silverstripe.com/doku.php?id=modeladmin to work with SilverStripe 2.3.2. On 2.3.1 it worked out of the box.
Anyone else with this issue and/or solution?
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
I couldn't get the ModelAdmin example from the documentation http://doc.silverstripe.com/doku.php?id=modeladmin to work with SilverStripe 2.3.2. On 2.3.1 it worked out of the box.
Anyone else with this issue and/or solution?
Hi, Have you checked out the Presentation, link at bottom of page you mentioned. You can download the code and that worked for me on 2.3.2.
I have other issues tho; validation? I have added the method to tell it what fields are required (getCMSValidator()) but when you are on the create/add form and submit with missing data, presumably the redirect is based on url but as the url in browser is admin/mycms it goes back to a blank on the rightside. If you click on create again the form (rightside) is displayed again, this time with the validation errors, good but not what I expected. How to stay on same form? I think the member one uses js for validation? Is this easy to implement for custom ones too? But I would have thought the framework validator to work as it does for other forms.
Also are some *.ss changes needed to display form fields correctly (rightside). eg. new CountryDropdownField('Country', ..) displays on frontend or other forms as expected but not in my create/add form generated by modeladmin.
Thanks.
Strange, I really can't get it to work with 2.3.2. I have copied 2.3.2 files into root. Added the code/ folder from the presentation and run dev/build... I still get a blank page :(
When replacing folders cms/, sapphire/, and jsparty/ with those from 2.3.1 release I can run dev/build without a problem.
I removed 'protected' from
static $managed_models = array(
and it worked...
Hi,
I have the same problem to get validation to work with the ModelAdmin as rpw2 already described. Is there any solution? ModelAdmin already uses the getCMSValidator() function but it is not working correctly. I wanted to check if this problem is already solved in the current trunk. But when I use the trunk version of "cms" ModelAdmin is showing no UI anymore.
Is there any workaround to get validation to work with ModelAdmin in 2.3.2?
Thanks,
Gerrit
I am also having the same problem as rpw2 and gp with the validation messages. Would be very grateful if anyone who solved it could share.
Just bumping this thread up to generate some interest!
Thanks!
John