silverstripe / silverstripe-admin

Silverstripe Admin Component
BSD 3-Clause "New" or "Revised" License
25 stars 92 forks source link

ReadOnly GridFields don't stay ReadOnly when navigating to url #847

Open lekoala opened 5 years ago

lekoala commented 5 years ago

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.

ScopeyNZ commented 5 years ago

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