From entity browser issue https://www.drupal.org/node/2902831 . The entity browser base display redefines ajaxEnabled() to force use of Ajax for these Views in ckeditor modals. The recent SA patch breaks displays that rely on this API mechanism to determine ajaxness.
API function $display->ajaxEnabled() should be used to determine whether a display is using AJAX because it abstracts the underlying setting (and would helpfully reveal downstream usage to the function autodoc). Views source is currently consistent in this usage except for the recent SA patch, which bypasses the API:
if ($view && $view->access($display_id) && $view->setDisplay($display_id) && $view->display_handler->getOption('use_ajax')) {
// show the view
}
else {
// 403
}
See https://api.drupal.org/api/drupal/core%21modules%21views%21src%21Plugin%...
Comment | File | Size | Author |
---|---|---|---|
#8 | interdiff-2904798.txt | 599 bytes | dawehner |
#7 | 2904798-7.patch | 1.56 KB | dawehner |
#5 | 2904798-5.patch | 15.1 KB | dawehner |
view_ajax_check.patch | 827 bytes | ahebrank | |
Comments
Comment #2
samuel.mortensonComment #3
samuel.mortensonComment #4
dawehnerLet's fix the unit tests ...
Comment #5
dawehnerHaha, this time with a patch.
Comment #7
dawehnerNote: This broke an entity browser view for me, as use_ajax was false in this case. Given that I'm moving it to major.
This time here is a patch which actually has the right fixes.
Comment #8
dawehnerHere is also an interdiff.
Comment #9
BerdirLooks good, trivial fix.
Entity Browser now also has an RTBC workaround by overriding both methods. but still makes sense to fix this asap.
Comment #13
catchCommitted/pushed to 8.5.x and cherry-picked to 8.4.x. Thanks!
I don't think we'll do another 8.3.x release so leaving fixed at 8.4.x, but if that changes we can cherry-pick it back.
Comment #14
keithdoyle9 CreditAttribution: keithdoyle9 commentedAnyone know where I can get an 8.3.x patch? I guess I could just generate one, it looks like the only difference is that it's line 145 instead of 142.
Comment #15
BerdirThis is fixed in the latest entity_browser version as well, so if you have this problem because of that module, you can update that and should be fine. It's even enough to edit the views and explicitly mark them as ajax-enabled, both the core and the entity browser patch are only there to prevent that from being necessary.
Comment #16
keithdoyle9 CreditAttribution: keithdoyle9 commentedAfter updating entity_browser to the latest version and going into each view used to make sure AJAX is selected and re-saving, I still get an AJAX / 404 error when trying to select files in the file_browser_modal.