Stack Exchange Network

Stack Exchange network consists of 174 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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

0
votes
0answers
13 views

Wildcard path element for content type, based on referenced taxonomy as restriction

I have a custom content type product with multiple fields: product |- title |- description |- ... |- variants variants is an entity reference referencing one or more paragraphs of type ...
2
votes
2answers
94 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
12 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
33 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
26 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
28 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
22 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
16 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
18 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
34 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
41 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
21 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
151 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
1answer
28 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
91 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
119 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
29 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
41 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
30 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
59 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
195 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
34 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
35 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
81 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
30 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, ...
0
votes
1answer
16 views

Entity id availability in Custom Field

I've created a Custom Field (let's call it 'Reference') whose value requires the Entity Id. To accomplish that I modify the Field value in the postSave method, like this: if (!$update) { $this->...
0
votes
1answer
25 views

How to do path aliases for views like news/%?

Let's suppose we have a view like news/%. Where news is my content type, and % is tid of term id from vocabulary "categories". Obviously that urls like news/3, news/5 etc. works great. But how to do ...
1
vote
1answer
44 views

delete URLs of all terms for a specific taxonomy vocabulary

Using pathauto module, I know we have a Delete aliases tab to delete URLs in bulk but what if we need to delete URLs of all terms for specific vocabulary? Any idea how to do that?
0
votes
1answer
31 views

Where does the menu trail get added into the $data parameter in pathauto_tokens()?

I have seen this post: where does $data come from in hook_tokens?, but that did not help me answer my question, maybe it could've but there's no way for me to interact with that post. I am working in ...
0
votes
1answer
24 views

Why the path alias is like http://domain/http://domain/path?

Adding a simple alias for media [media:url] causes the domain to be listed twice in the URL on media listing page in admin, for example http://domain/http://domain/path. How do I change it to http://...
0
votes
2answers
41 views

is there a way to customize url alias by content type?

I have several contentypes, url alias are working fine, by default if there is a space in node title (or another token) is replaced with a dash "-", is it posible to change that beheavior by ...
0
votes
0answers
72 views

Parent taxonomy term token not translated

I have a vocabulary like this : Vegetables Potatoes Eggplants They're all translated this way : Légumes Pommes de terre Aubergines Default language is in french. In my URL Aliases patterns for ...
1
vote
1answer
174 views

How do I get the path alias without the language code?

Suppose I have an alias like http://www.example.com/en/the-new-webpage.html. I want to get the the-new-webpage.html part in hook_preprocess_html(). The language code might change into 'ja' or some ...
3
votes
1answer
250 views

How do I define a Route with multiple different paths?

Does Drupal's routing system support a regular expression or other means for multiple route paths? I have a route that I would like to be able to hit from two different endpoints, /api/v1/foo and /api/...
1
vote
2answers
50 views

Creating two aliases for the same node

I have a content type with a field allowing to select public or private. I am using the Pathauto module for generating path aliases using this field, using /[node:field_evt_diffusion]/[node:title] as ...
0
votes
0answers
26 views

Trying to get it to correctly display the language with the alias in the URL

I have a form that I want that taking the alias of the taxonomy create a URL path and take me to it. The submit has two options, show the default URL that does it correctly and the second that is ...
0
votes
2answers
30 views

Bulk Generating URL aliases for taxonomy terms doesn't do anything

In D7, I've imported ~8000 taxonomy terms. All these need to have a url alias, based off their names. I can check the 'Generate automatic URL alias' checkbox when editing each taxonomy term ...
0
votes
3answers
87 views

D8 generate double URL for commerce product

I need to create double URL alias for commerce product. I tried with code below : function mymodule_entity_update(Drupal\Core\Entity\EntityInterface $entity) { if($entity->getEntityTypeId() == ...
0
votes
0answers
7 views

Drupal 7: Custom Module Paths keep disappearing

Recently, I've noticed on two Drupal 7 sites that any custom menu paths defined in hook_menu in custom modules disappear seemingly at random until the cache is flushed. The most recent time this ...
0
votes
0answers
23 views

Pathauto is converting special characters (accented) by interrogation points

I created a Drupal website some years ago and everything was working well until now. But since yesterday (when the client came back to me), the Pathauto module is now replacing all accented ...
1
vote
1answer
63 views

Cannot use the alias “/libraries”

I am trying to make a node have the alias "/libraries" but I get a Page Not Found error which looks to be returned before Drupal has fully bootstrapped (I don't get the usual Drupal 404). I checked a ...
0
votes
1answer
114 views

url alias not working on https

I am using Drupal 7.40. I just found a redirect issue on my website. When I enter "http://www.website.com/node/439432" in the browser, it will 301 redirect to "https://www.website.com/myalias.html" ...
0
votes
0answers
32 views

How to have “generate automatic URL alias” selected by default on taxonomy term display?

I have some content as taxonomies, additionally there doesn't seem to be a default "generate automatic URL alias" by default on content types. I must be missing something here a settings somewhere, ...
2
votes
1answer
79 views

What happens to URL alias when a node is unpublished?

We have many pages where we set "Generate automatic URL alias" to true and false. Then we will eventually unpublish some of the pages. Looking at Webmaster tools, we have found the URLs are still ...
0
votes
1answer
105 views

Multiple aliases per node (and active trail)

Our site is split down the middle for tenants and landlords. But we have content the is the same for both such as "how to report antisocial behaviour". User would normally navigate something like "...
0
votes
1answer
51 views

Can I use taxonomy field to display in URL using [current-page:query:?] token?

How to display header field in URL with query token with Drupal 7? Working on this site, and I disabled title field for taxonomy terms, instead I put a header in there...didn't know could lead to ...
1
vote
1answer
36 views

Multilingual pages links showing node instead of URL alias

My web has 2 languages, English and Malay. The language selection is by session of ?lang=en or ?lang=ms. English is the default language and it is working fine. All internal links are using the ...
-3
votes
4answers
173 views

Admin edit … page not found because of alias with characters

hi everyone … my problem is in the title I can not edit pages that have accent in alias path e.g.: http://localhost:8888/MYSITE/bôbô/ïèéà/my-contënt i got a page not found .. but i still able to ...