Open michalkleiner opened 4 years ago
I didn't have time to dig deep and couldn't find it during the 5 minutes I had spare. Changing the custom model admin's $url_segment
to not start with 'campaigns', e.g. just removing the trailing s, makes the issue not appear.
I’ve not tested this, but I’d guess it’s related to trimming the trailing slash here as I believe this is where the client side routing data comes from: https://github.com/silverstripe/silverstripe-admin/blob/0faee38d2c905d3d4baef8e9f340f566f6ecef99/code/LeftAndMain.php#L342.
It's not just the trailing slash, there can be another whole word, as long as it starts with the same 'campaigns', then it's doomed.
It seems that if a model admin's URL segment starts with
campaigns
, it looks like the JS is trying to mount the campaigns admin app over the model admin (that is not the correct one, e.g. when usingadmin/campaigns-scheduling/
).