Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Convert the page callback "views_ajax" to a new-style Controller, using the instructions in the WSCCI Conversion Guide.
@see views_menu() in core/modules/views/views.module
Comment | File | Size | Author |
---|---|---|---|
#26 | vdc-1979036-26.patch | 9.57 KB | dawehner |
#26 | interdiff.txt | 2.53 KB | dawehner |
#23 | vdc-1979036-23.patch | 9.67 KB | dawehner |
#23 | interdiff.txt | 2.05 KB | dawehner |
#9 | drupal-1979036-9.patch | 9.39 KB | dawehner |
Comments
Comment #1
xjmSince this is an AJAX callback rather than a full page callback, we should wait on #1944472: Add generic content handler for returning dialogs.
Comment #2
xjmComment #3
jibran#1944472: Add generic content handler for returning dialogs is in.
Comment #4
dawehnerI started already but sadly there are still problems with exposed forms.
Comment #5
dawehnerThere we go.
Comment #7
dawehner#5: drupal-1979036-5.patch queued for re-testing.
Comment #8
ParisLiakos CreditAttribution: ParisLiakos commentedawesome!
lets use the $request here
$request->attributes->get('system_path');
_current_path will hopefully die before release
Comment #9
dawehnerCool.
Comment #10
damiankloip CreditAttribution: damiankloip commentedI guess it's not ideal to use request::get() in a controller like this? I guess it makes sense in this case though?
Comment #11
damiankloip CreditAttribution: damiankloip commentedI think it probably does.
Comment #12
Dries CreditAttribution: Dries commentedGiven that this involves AJAX, I'd like to see us do thorough manual testing of this patch. Could someone please do that and confirm that things still work? Thanks!
Comment #13
xjmAlso, re: #4, it sounds like there was a bug, but the patch still passed? Is there something we could add an automated test for?
Comment #14
glennpratt CreditAttribution: glennpratt commentedManually testing today at Acquia sprint.
Comment #15
glennpratt CreditAttribution: glennpratt commentedNot sure about #13 / #4 but the patch seems to work for me.
http://screencast.com/t/exrj6JdaTv3X
Comment #16
dawehnerThe problem mentioned on #1979036-4: Convert views_ajax() to a Controller was fixed by #1979036-5: Convert views_ajax() to a Controller
Comment #17
glennpratt CreditAttribution: glennpratt commentedComment #18
dawehnerComment #19
alexpottShouldn't we be removing this? I guess we've left this in for the theme callback... have you tried removing it?
Comment #20
dawehnerSo alternative to "theme callback" it would be possible to temporally port it to use hook_custom_theme for now.
Comment #21
dawehner#9: drupal-1979036-9.patch queued for re-testing.
Comment #22
dawehnerSee #1954892: Replace 'theme callback' and hook_custom_theme() with a clean theme negotiation system as related issue.
Comment #23
dawehnerFixed some minor stuff.
Comment #24
ParisLiakos CreditAttribution: ParisLiakos commentedtotally forgot this one
Comment #25
fubhy CreditAttribution: fubhy commentedThe factory for loading a view executable... or: The factory to load a view executable with.
Loads and renderS a view via Ajax.
Missing whitespace before the "The"
Exceeds 80 characters.
Those has() checks are redundant. Simply call ->remove() without them.
You already filled $query_all before, you can re-use that here :)
Comment #26
dawehnerThanks for the good review.
No we can't, because the values have been changed in the meantime.
Comment #27
fubhy CreditAttribution: fubhy commentedRTBC if green
Comment #28
Crell CreditAttribution: Crell commentedThis is a MENU_CALLBACK, which means it no longer needs to exist, I believe. It can be removed entirely.
Comment #29
dawehnerCrell, you followed in the steps of alexpott, but there is still 'theme callback' which is needed, see #1979036-19: Convert views_ajax() to a Controller and #1979036-20: Convert views_ajax() to a Controller
Comment #30
Crell CreditAttribution: Crell commentedD'Oh. At least I have good role models. :-)
Comment #31
dawehner#26: vdc-1979036-26.patch queued for re-testing.
Comment #32
alexpottCommitted 338705a and pushed to 8.x. Thanks!
Comment #33
xjmComment #34
damiankloip CreditAttribution: damiankloip commentedReally? We need a change notice for an ajax path internal to views? We haven't created change notices for all of our route conversions.
Comment #35
dawehnerI totally agree with damian. We don't convert when page callbacks gets converted to controllers.
Comment #36.0
(not verified) CreditAttribution: commentedUpdated issue summary.