Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Jun 2014 at 19:08 UTC
Updated:
29 Jul 2014 at 23:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ParisLiakos commentedComment #2
dawehnerNice.
Comment #3
chx commentedTruly the end of an era. arg() was added in the first days of 2003, debuted in Drupal 4.1.0. Few things as ancient as those. Only getting rid of node_invoke (from 2001) last summer compares.
Comment #4
alexpottCommitted 0a54fea and pushed to 8.x. Thanks!
Comment #6
hass commentedThis killed by code. Can you share an example for the upgrade, please? This is inside
hook_page_alter():This looks like serving a specific need.
Please note that:
arg(0) == 'search'matches all paths/routes starting withsearch. e.g.search/nodeorsearch/fooorsearch/bararg(1)gave menodeor any other keyword depending on the pathsearch/nodeorsearch/fooorsearch/barI cannot see how I can implement this with RouteMatch.
Comment #7
hass commentedComment #8
dawehner@hass
Please have a look at https://www.drupal.org/node/2274705 and have a look at available routes defined by the search module:
search.view, search.view_$entity_id. This should be enough for you to solve the question for yourself. Please fix the duplicated support question.
Comment #9
hass commentedI have read https://www.drupal.org/node/2274705, but i do not understand how this could help. This change notice does not help me solving the migration. I have no fixed route. This is all dynamic. It's also not possible to grab the path elements. There is no duplicate support question open.
If not possible we may need to rollback the patch here.
Comment #10
ParisLiakos commentedPlz, if you have more questions, open a support request instead of reopening this issue
Comment #11
hass commentedAnd what about arg(1) value? This is all missing in the changelog message and needs documentation.
Comment #12
ParisLiakos commentedComment #13
alexpottWe need to update change records... eg. https://www.drupal.org/node/2088511
Comment #14
alexpottComment #15
ParisLiakos commentedthat was the only one i could found
i just removed the references to arg from the example code
Comment #16
hass commentedWhy are you not documenting how it could be upgrade from arg? For me this is not really easy to guess.
Comment #17
hass commented@ParisLiakos:
\Drupal::routeMatch()->getParameter('entity')->getPath();does not return anything.