Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
user.module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Sep 2013 at 15:11 UTC
Updated:
29 Jul 2014 at 22:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ekes commentedTwo instances, both in user module, both in views default_argument.
Comment #2
ekes commentedAll instances of this (and one of menu_get_object('node')) are in Drupal\user\Plugin\views\argument_default\User::getArgument
cf.
#1817630: Cleanup get_argument() on node/user default argument
#2028505: Provide the request object for ArgumentDefaultPluginBase::getArgument() as argument
Comment #3
ekes commentedThe present getArgument(), returns the user object from any path defining user, or one with node and then the related author. This only makes sense in a non-page context (ie not for a conditional argument on a page.)
Attached patch does the same from the route.
It's confusing to say this comes from the URI now - that's more Raw - however the replaced 'route context' is probably not good for usability.
Comment #4
dawehnerIt is great to see that there is some effort behind removing menu_get_object().
Maybe we should first check for the interface just in case maybe someone came to the idea that naming something user is a good idea.
Some with node then.
Comment #5
dawehnerThese two changes should be possible done by a novice.
Comment #6
ekes commentedAdd patch with instance check.
Comment #7
dawehnerThank you for the final change.
Comment #8
ekes commentedCorrecting the comment.
Comment #10
ekes commentedSeems there are issues with the testbot at the moment.
Comment #11
ekes commented8: user_default_argument.2095961-08.patch queued for re-testing.
Comment #12
ekes commentedRe-upload to force final test.
Comment #13
dawehnerStill like before
Comment #14
catchI don't like that we replaced one magic string with another for getting router arguments, but that's not the fault of this patch. Committed/pushed to 8.x, thanks!