Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [path-aliases]

Use it for questions about path aliases, a way of creating pretty human readable URLs to replace system URLs like node/[nid].

2
votes
0answers
20 views

How can I create an alias to point to an uploaded file?

Users uploading a file within content create a name like my_site.com/sites/default/files/import/CrazyLongNamefile.pdf They would like to alias it for referencing in other media (print) like my_site....
0
votes
0answers
50 views

Automatically I am logout when I visit the home page

Any logged in user (including Admin) on my Drupal 8 site is directly logged out when he visit a the home page. Say I am on whatever page (/user/1), If I visit the home page by clicking on my website ...
1
vote
2answers
28 views

How to remove partricules and apostrophes in url

I'm using drupal 8 and Pathauto. I have title of the type (in French) Personnes d'Allemagne, I would like to delete d' to have like url personnes-allemagne. Pathauto removes the apostrophes well, ...
1
vote
1answer
34 views

Drupal 8 - Pathauto taxonomy terms in content paths

I currently have a pattern set up for my site's basic pages. It pulls in some generic fields associated with the content type, and no problems there. Got a new requirement to associate some data from ...
0
votes
1answer
27 views

Cannot create custom translated path alias for /user/login

I cannot create a path alias for spanish translation. When I try to create, it says Route is invalid or you don't have access Saw this but it doesn't have an answer: https://www.drupal.org/project/...
0
votes
0answers
24 views

Using contextual filters with multiple taxonomies plus dynamic paths

I have a content type, FAQ, which has the Title, Body, and Related AP Course(s) fields. The last is a node reference field, where the target is a AP Exam node. I'd like to create a view page that ...
1
vote
1answer
33 views

Can a view and a content type share the same alias pattern?

I'd like to have this URL structure on a Drupal 8 site: /schools/usa -> handled by custom view /schools/europe -> handled by custom view /schools/school-name -> handled as a normal node So ...
0
votes
0answers
24 views

Pathauto bulk update for taxonomy terms with unchecked “Generate automatic URL alias”

I have the same issue addressed for D7 here: Bulk Generating URL aliases for taxonomy terms doesn't do anything or here: Bulk update for unchecked "Generate automatic URL alias" And I'm ...
0
votes
1answer
52 views

Bulk update pages that use old URL alias by content type

We have a content type, Basic Page that recently had the URL pattern changed from www.example.com/page/page-title to www.example.com/page-title. Under the Pathauto settings found at /admin/config/...
3
votes
1answer
57 views

How do I programmatically update pathauto paths for an entity?

If an entity has opted into auto generated paths, you could simply re-save the entity. However saving an entity is particularly inefficient, and the path/routing system runs outside of the entity ...
4
votes
2answers
106 views

How can I show the user login block on the 403 page?

With D8, I have a node (content type: basic page) that I use as a custom 403 (access denied) page. I set this as the custom 403 page on: /admin/config/system/site-information. The path is /node/21, ...
0
votes
1answer
19 views

Countries Additional Data Tokens not working

I'm using Pathauto and Countries to build path aliases that reflect the country and corresponding continent of a node. For example if a node's country field is set to Spain the url should be: europe/...
0
votes
1answer
21 views

How to reference URL relative to current page in a block

I have a custom block where I need to reference a URL relative to the current page (such as node/7/images or node/293/images) that will link to the "Images" view mode I made for the node. I am using a ...
0
votes
0answers
39 views

Grandchild Pathauto from Nodes

I have a node that has a parent_field (entity reference) that if left empty, that node is a parent. If parent_field has data (ie the nodes parent node name) then I can easily add pathauto in there ...
1
vote
1answer
226 views

How to create URL alias for node edit page

Pathauto can create URL alias for node view page, for example, URL from node/nid to project/nid (project is a name of content type), but the link to the edit page is not /project/nid/edit, but /node/...
0
votes
0answers
45 views

Remove string from [node:url] and node alias

Background We have enabled content translation where we detect based on the content language. This allows us to translate properly as needed, but it has a bad side effect. It will not only add ?...
0
votes
1answer
73 views

Multiple URLs for same node

anyone know how to create a URL alias and not redirect the user? I have a node with its alias set to /sign-up, but I also want it accessible via /caregiver/sign-up. I created a URL alias, but it seems ...
1
vote
1answer
59 views

How to display the path without alias?

With Drupal 8 and Commerce 2.10 I created a php code to display the link of my store. When I go to the link, it displays: https://www.domaine.com/shop/name I want to display without alias: https:/...
0
votes
2answers
33 views

Turn /node off but keep aliases

I want my node page turned off. I don't want mysite/node/3 to work. I want it to display 404. I tried rabbit hole and it worked but the problem ws that it also stopped the aliases from working. Is ...
0
votes
1answer
133 views

Programmatically delete pathauto alias pattern?

I know how to remove a pattern via the UI. Is it possible to do this programmatically to be used in hook_update()? EDIT: I think asking this answered my question. Will post a followup answer. ...
0
votes
2answers
84 views

Select the right pathauto alias for a node

I'm working on a drupal 8 project, I need to access the content type X nodes via two aliases depending on some conditions, for this I've created two Pathauto patterns using Pathauto contrib module: ...
0
votes
1answer
60 views

Alias / to /lang_code

I got a multilanguage configuration with language detection based on URL(/en /fr). Drupal behavior redirects everything to so it would have those two prefixes or, if setup, it will ignore the prefix ...
0
votes
0answers
23 views

Vocabulary Terms redirect 404 page not found

I am using drupal 7.59 Today i see the my taxonomy's terms redirecting page not found. these topic i have done but the issue is still happening. I'm using pathauto module in this module i have ...
1
vote
0answers
68 views

How do I set a url query parameter node/{node}/edit for a specific content type?

I'm trying to add a taxonomy term from the node in question as a url parameter, but am struggling to figure out how to do it without just going through the site and modifying all of the links that ...
2
votes
2answers
258 views

How do I remove the default node path when using a path alias?

When I add path aliases, how do I remove the system path (/node/[nid]) in Drupal 8, to avoid Google to index the page twice?
0
votes
1answer
61 views

Contextual Filter not working wiht URL aliases

I have this issue with contextual filter. I have set the filter so it would get an ID of an article and based on that ID, it would show the name of the author. The problem is, it doesnt work with URL ...
1
vote
1answer
390 views

Create custom URL pattern

Using the pathauto module, we could have created custom URL patterns using the hook_pathauto(). I could not find any such way to achieve the same in D8. ref. https://envisioninteractive.com/drupal/...
0
votes
1answer
59 views

URL Pattern in node entity reference

I have a content type A, which contains an entity reference field. That field references a content type B. I have create automatic URL paths for both content types. When I create a new node of type A,...
0
votes
0answers
35 views

Two different content paths for the same content type with different taxonomy terms

Sorry for the inaccurate title. I have a content type called product display. In product display I use taxonomy terms, 8 different term names, to categorize the different products. However, I have ...
0
votes
0answers
15 views

Admin path broken after localisation removal

I tried to fiddle with some localisation using modules content_translation, config_translation, locale and language. The problem is, after uninstall of all of the above, the frontend links for block ...
0
votes
1answer
185 views

Pathauto conditions

Is it possible for Pathauto to have one pattern for a content type, and a different pattern for the same content type based on the value of a field in that content type? I have a checkbox field and if ...
0
votes
1answer
18 views

How to use user wildcard in a custom path?

I have configured my user path alias pattern as consultant/[user:name]. Now I need to have one custom path from my custom module as consultant/[user:name]/job. Here is my code in hook_menu. $items['...
0
votes
1answer
24 views

How do I display a taxonomy term if another term is active for a node?

I have a content type that has taxonomy terms for Category, like Blog, Publication, and Project. Depending on which term is selected, the content is displayed under blogs, publications or projects. If ...
0
votes
1answer
54 views

Views Contextual Filters - User Name in URL

I have a view set up to function as a blog, and a contextual filter set up to filter by author of the blog post. The point is to be able to click on the blog post author link and go to a page that ...
0
votes
1answer
104 views

Can't migrate alias with Wordpress Migration

I am using the Wordpress Module to migrate from Wordpress to Drupal 8. I am trying to have the alias be set to the link value (<link>https://myurl.com/wordpress-path</link>). I added the ...
0
votes
1answer
41 views

URL alias to access user profile as admin

I realized that users on my site have their path ending in the form "user/number" (for example: user/3) when I check People in the Admin Toolbar and click on their username. I would like to use URL ...
0
votes
0answers
12 views

Language specific node after updation redirects to /node/xyz instead of lang/alias on Drupal 8.5.3

Here are the steps . Load the page in browser mydomain.com/eu/custom-page Click on contextual edit button which opens the drupal editing interface. Make updates on custom-page node. Save and Publish ...
1
vote
1answer
469 views

Get node internal path from path alias in Twig template

I want to get the internal path of a node from its path alias. In Drupal 7 we could use drupal_get_normal_path() directly in the PHP template. With Drupal 8, Is there a function to get the internal ...
0
votes
2answers
139 views

How to map path aliases when migrating from Drupal 6 to 8?

When migrating from Drupal 6 to 8 i can simply map path aliases with the mapping: process: path: alias I have the problem that the path alias is not set properly when pathauto is activated for a ...
0
votes
2answers
301 views

Pre-populate an Entity Reference when Adding a Node : Based on URL Alias

I am trying to pre-populate an entity reference with a specific game node, when a profile node is added; based on URL of the game the add button is on. The game node I want to reference in profile ...
3
votes
1answer
271 views

convert node/id to node/path-alias in content body

I added a link to a content body from ck editor as /node/7. When viewing this page I want to show www.sitename.com/example/alias. This is working fine in drupal 7 (earlier version of my site), but ...
1
vote
1answer
77 views

How to change the system path of a taxonomy vocabulary to correspond a view

I'm using Drupal 8 and i want different vocabularies to be displayed by different views. Each view should have a different path with a contextual filter but when i define my path on pathauto the ...
2
votes
1answer
45 views

Is it safe to allow domain.com/username?

Are there any security risks if we create pathauto roule so that the user account pages are at domain.com/username
0
votes
1answer
38 views

Is it possible to alias paths for contextually generated page views?

I have a content type with a path pattern ([category]/[english_title]) that is generated based on its field values. In the node's page there is a block with referencing news items and a count based ...
1
vote
1answer
210 views

How do I set a path alias for each forum?

I created a forum on a site using the core Forum module. When we create a new forum, Drupal creates it as a taxonomy term. When we create the new forum, if we associate a path alias, that URL alias is ...
2
votes
2answers
639 views

Alter url aliases programmatically

I have a pattern set up to create the URL aliases based on a field of type list text. the field looks like this: selection 1|selection 1 selection 2|selection 2 How can I alter the alias so it ...
0
votes
1answer
48 views

Get current country pathPrefix

How can I get current country pathPrefix in D8 ? I know drupalSettings.path.pathPrefix gives that in JS, but how can I get it in preprocess hook ? Following gives only the path alias, but without ...
0
votes
1answer
54 views

How to set alias pattern of node's source alias?

When I translate a node I want that node's path alias to be like it's source node's path alias. So in the url pattern for the translation nodes I use the token: [node:source:url:path] which ...
0
votes
2answers
137 views

Translation view path broken after upgrade to 8.5.1

After upgrading my site from Drupal 8.3.5 to Drupal 8.5.1, the token {{ path }} is not translated anymore in the selected language. Does anyone have a suggestion or solution?
0
votes
1answer
32 views

make taxonomy terms more human friendly

I work on a news site that has hundreds of articles and all the article urls are written by hand. eg. example.com/world-news-today-28-march-2018 The site has various news categories like: business, ...