-
Notifications
You must be signed in to change notification settings - Fork 81
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
IE10 & IE11: Bulk editing in ModelAdmin generates an error #104
Comments
So this is an IE only issue? Works fine in Chrome etc? |
It works fine in Chrome, Safari and Firefox. I have all the code in my contacts module: https://github.com/i-lateral/silverstripe-contacts That might be easier? I believe I have attached the gridfield to Model Admin the way I am supposed to? The problem I get when trying to use edit appears to be that the URL is incorrect, looks like it is directing to /admin/admin... Hopefully that makes sense? |
Actually, I think this might be 2 symptoms of the same issue... I notice the URL for the issue I posted is: /admin/contacts/admin/contacts/Contact/EditForm/field/Contact/bulkAction/bulkEdit,DataModel /admin/contacts is being duplicated (in the same way as the edit URL). Not sure why the resulting error is not the same (they should both result in a page not found)? |
Do you use Fluent or Translatable or anything that adds localisation and a locale in the URL by any chance? |
Nope, not that I am aware of anyway :-s |
Still an issue @mlewis-everley? |
@robbieaverill I am not sure to be honest, this was an SS3 bug haven't really tested SS4 extensively in IE yet. |
I'm experiencing this issue with ss 4.3.0 aswell I suspect the issue might be somewhere in the Can confirm does not happen in Edge 17 and 18 |
When trying to perform any Bulk action (either the included edit, delete, etc) or custom actions.
Trying to trace this myself, but the message I get is:
[User Error] ModelAdmin::init(): Invalid Model class
GET /cots-app/admin/contacts/admin/contacts/Contact/EditForm/field/Contact/bulkAction/bulkEdit?cacheBuster=1436963033676&records[]=5632&records[]=6144&records[]=7424&records[]=7680&records[]=8192&records[]=5633
Line 127 in /home/morven/Projects/cots-app/framework/admin/code/ModelAdmin.php
Source
118 if($this->request->param('ModelClass')) {
119 $this->modelClass = $this->unsanitiseClassName($this->request->param('ModelClass'));
120 } else {
121 reset($models);
122 $this->modelClass = key($models);
123 }
124
125 // security check for valid models
126 if(!array_key_exists($this->modelClass, $models)) {
127 user_error('ModelAdmin::init(): Invalid Model class', E_USER_ERROR);
128 }
129
130 Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/javascript/ModelAdmin.js');
131 }
132
133 public function Link($action = null) {
Trace
•ModelAdmin::init(): Invalid Model class
ModelAdmin.php:127
•ModelAdmin->init()
Controller.php:139
•Controller->handleRequest(SS_HTTPRequest,DataModel)
LeftAndMain.php:443
•LeftAndMain->handleRequest(SS_HTTPRequest,DataModel)
AdminRootController.php:93
•AdminRootController->handleRequest(SS_HTTPRequest,DataModel)
Director.php:370
•Director::handleRequest(SS_HTTPRequest,Session,DataModel)
Director.php:153
•Director::direct(/admin/contacts/admin/contacts/Contact/EditForm/field/Contact/bulkAction/bulkEdit,DataModel)
main.php:177
The text was updated successfully, but these errors were encountered: