silverstripe-admin icon indicating copy to clipboard operation
silverstripe-admin copied to clipboard

ReadOnly GridFields don't stay ReadOnly when navigating to url

Open lekoala opened this issue 6 years ago • 1 comments

So here is my scenario

I have a Model with a GridField for my SubModels. These SubModels have an SubSubModels GridField as well.

if I do $fields->makeReadonly() on my Model, it updates the GridField so that it's a GridFieldConfig_RecordViewer config that is used for my SubModels. Great! I can even navigate to my SubSubModels : it's still readonly.

Problem is : I go back (using back arrow, or breadcrumb) from my SubSubModel to my SubModel : it's not readonly anymore. I'm not sure why!

So basically : navigate once : stays readonly, navigate twice : still readonly. go back : not readonly anymore.

Tested in 4.3.2.

lekoala avatar Mar 18 '19 11:03 lekoala

Related issue: https://github.com/silverstripe/silverstripe-versioned-admin/issues/101

ScopeyNZ avatar Mar 20 '19 01:03 ScopeyNZ