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

A "Uniform Resource Idendifier" identifies a resource on a network.

2
votes
0answers
40 views

How to change the title of a modal window?

I have a link that displays a modal window. The link redirects to a page view. When I click on it, it is marked in the title of the modal window Array. How to customize the title ? <?php ...
1
vote
1answer
42 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
1answer
25 views

Views Link Display Settings Is Not Accepting External URL

I want to add an external URL to the Views More Link Display Settings. It is also mentioned in the guide lines as well ("A Drupal path or external URL the more link will point to. Note that this will ...
2
votes
1answer
29 views

how rewrite pagination URL views for SEO?

i am trying to rewrite the views url pagination : /mypath/cat?page=1 to /mypath/cat/1 or > /mypath/cat/page/1 or /mypath/cat-1 cat is a taxonomy term. I have tried to rewrite url with Drupal\...
0
votes
1answer
37 views

Can't clean URL from custom query parameters

I have a client whose company has different branches. The data are retrieved from a DB (not the Drupal one). For example, the url mydrupalsite.com/branch?branchID=1 should lead to mydrupalsite.com/...
1
vote
1answer
27 views

How can I correctly include a (non-fragment) # in a URL?

I need to build an external URL that looks like this: https://searchapp.foo.gov/search-org/#/collection-name?q=search%20terms%20here First thought is that /#/ is entirely invalid according to RFC ...
2
votes
0answers
18 views

Register an object with the Service Container and give it a setRequest() (get base url)

I'm looking for a way to get the hostname of a multisite, and I've found several answers about it. One of the solutions was to use: Answer link $host= \Drupal::request()->getHost();   or \...
0
votes
0answers
21 views

Make the title field an external URL

I have a view in Drupal 7 that has a title field and a URL field. The latter contains external URLs. I'm trying to configure it where the title links to the external URL once the user clicks on the ...
0
votes
0answers
24 views

handle URL alias with URL query Parameter

Im using the newest Drupal 8 Version, which is hosted by Bitnami on an ec2. Basicly im trying to transform an URL which contains URL querys to an user friendly URL. So: www.xxx.com/article?shop=A&...
0
votes
2answers
45 views

Not getting complete URL parameters

My url is node/3?filter-value=67&filter-value=80 and when i try to do this code: $param = \Drupal::request()->query->all();` $param['filter-value'] It shows the value 80 only. I want to ...
0
votes
1answer
28 views

How to pass dynamic parameters through a local action button?

I created a local action button with the following in my_module.links.action.yml: my_module.content.action: route_name: node.add_page title: 'My action' deriver: 'Drupal\my_module\Plugin\...
0
votes
2answers
20 views

How to get the current path, keeping the langcode?

For my button I need to specify the destination path, as my site is multilingual it is imporatnt for me to keep the langcode in the path. So how can I get from drupal-site/fr/page_1 to drupal-...
0
votes
0answers
23 views

Blazy images are loaded as http in https website

I am bit of confused here with all these technologies i experimented. I have a nginx-proxy container (https://github.com/jwilder/nginx-proxy) where i run some websites using nginx-php_fpm images (...
1
vote
1answer
34 views

How can I avoid the installation directory appears in the site URLs?

I installed Drupal 7 through the hosting service tools, which installed Drupal inside the drupal1 folder. All the site URLs contain the folder name. How can I avoid the URLs contain that folder name? ...
2
votes
2answers
78 views

Finding the host node of a paragraph

I'm trying to find all the absolute URLs in a site (in wysiwyg content, url fields, config) to convert them into relative URLs later via manual administration. All the URLs in question are within the ...
0
votes
1answer
42 views

How do I get link the files in libraries.yml with absolute url path

In my libraries.yml files the css files are linked with the relative url paths. Eg : /css/mycss.html So when in the page source the linked url shows as relative. How do I link those files with ...
0
votes
1answer
16 views

How are contextual arguments specified explicitly in the URL?

The examples in contextual arguments simply call for specifying them with slashes without specifying the name of the filter, but if you wish to apply the second or third filter in the contextual link, ...
0
votes
0answers
49 views

Get image url with https instead of http

When I use file_create_url it return url with http instead of https. Code Snippet: $desimg = file_create_url($node->field_image->entity->getFileUri()); Due to which i m getting warning ...
0
votes
2answers
31 views

How can I pass a parameter to the URL?

In Drupal 8 I customize the filter in the block in the sidebar menu. When the user clicks on the option in the block, I need to pass his choice to the URL. $this->args = \Drupal::request()->...
0
votes
1answer
70 views

How to make Dynamic Term Link based on content type?

My web site has three content types ( Event, Course, Video) and 2 taxonomies(city and schools) All of them have same taxonomy referenced field. Eg:New York City events or New York City courses will be ...
0
votes
1answer
38 views

How to get drupal to remove /drupal/ from all the links on the website

I first ran the install.php when drupal was reachable as example.org/drupal/, then later I changed the Apache configuration to make it into a virtual host. Now that I can reach the site at example....
0
votes
1answer
82 views

Paragraph migration for link field not working

I have below migration script for paragraph migration, where I have 2 fields, (1) icon_type --> List(text) field type (2) icon_url --> Link field type UPDATED WORKING CODE BELOW If I run the ...
0
votes
1answer
37 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
1answer
59 views

How can a controller change the url reported to browser?

I have got two routes - one is for pausing mail jobs, the other one for listing them. When I click on "pause" - the pause route: does it's thing internally calls the list route with a couple of ...
1
vote
1answer
82 views

Home Page rel=“canonical”

We created a home page as node/1850 which is specified in /admin/config/system/site-information. When I look at the generated code, I see: <link rel="canonical" href="/node/1850" /> This ...
0
votes
0answers
34 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 ...
1
vote
1answer
37 views

How do I manually configure the Link module?

I would like to be able to add the file:// protocol to the list of filter_protocols so that we can add links to shared company files on a mapped drive from within our intranet website, but I'm not ...
1
vote
2answers
42 views

Pages are created for each image

The Drupal 7.59 installation we have a new page for each uploaded image in the files directory. (It's been like this at least since Drupal 7.39 when I joined this project.) If the image is awesome-...
0
votes
1answer
54 views

Get dynamically created image URL in a block with paragraph and media bundle

I have seen a lot of related answers to this question but nothing specific to my issue - apologies in advance if it has already been answered. In Drupal 8, I have a custom block type that references ...
1
vote
1answer
132 views

Make canonical URL in document HEAD absolute

I have a requirement to use absolute URLs for the canonical URL element generated by Drupal 8. hook_page_attachments_alter doesn't seem to have access the HTML element. Is there any other way I can ...
0
votes
2answers
27 views

View Path TaxonomyTerm/sub-page

I am looking to create a QUESTIONS view for all terms in a taxonomy vocabulary. Let's say I have a taxonomy that has terms apple, orange, banana. We use pathauto to go to domain.com/apple which shows ...
4
votes
1answer
856 views

Load a file entity by URI

Is there a way to load a file by URI in Drupal 8? In Drupal 7 it is possible by the next example: $uri = 'public://file.xyz'; // Take a look at: file.inc::file_load_multiple $files = ...
0
votes
0answers
198 views

How to Change the URL of an AMP page to clean URL instead of a Query String

I have enabled the Accelerated Mobile Pages Module for Drupal 8.5 and configured the module and set to work for a Content Type Article. The Amp page is available at /articles?amp and this URL needs to ...
0
votes
1answer
34 views

How to send comma separated taxonomy term (as link to taxonomy term url ) from preprocess to twig file as single variable?

According to my requirements I have to use views preprocess and views-view.html.twig function MYTHEME_preprocess_views_view(array &$variables) { $aliasManager = \Drupal::service('path....
1
vote
0answers
184 views

Keep randomly getting /index.php/ in link Urls with Pantheon (nginx)

I have a live D8 pantheon site and keep randomly getting index.php in the menu link urls. It's now happened four or five times. We've set a base url for the sitemap, so it has prevented the sitemap ...
0
votes
1answer
127 views

Redirect Module doesn't redirect from node/{nid} to alias

I installed the redirect Module in Drupal 8 but sorrily can't get it to work properly. I enabled all checkboxes in the settings, also the "Enforce clean and canonical URLs" option. In my page source,...
0
votes
1answer
20 views

Views field that links to fragment URL of comment on /node/ instead of /comment/

With Views, I want to output a list that links to each comment of the current node. But instead of linking to /comment/42#comment-42 I want to link to /node/23#comment-42 I tried these fields, ...
3
votes
1answer
216 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 ...
0
votes
0answers
21 views

Generating a URL with set base_url on multilingual site, ignores set base_url

I am working locally on a site that has two languages (Danish and English), these use domains to negotiate the language to display. I want to create a url from a custom route, where I define a custom ...
0
votes
1answer
65 views

Change the url path of /sites/default/files/myfile.pdf

When you click to view a pdf file on a page the url is always this: http://yoursite.com/sites/default/files/myfile.pdf. You can modify this path in the field setting and add tokens, dates. But what if ...
0
votes
0answers
28 views

Drupal urls include absolute paths

I just updated drupal core on website and my drupal alias do not work unless the full path to a directory is included Example: http://michael.tsikerdekis.com/ (works) http://michael.tsikerdekis.com/...
0
votes
0answers
36 views

How to fix canonical http due to proxy (should be https)

I am aware of the reverse_proxy settings; however, I have seen different methods of fixing the problem - none seem definitive. One method (which doesn't seem to work for me) says to set the reverse ...
0
votes
0answers
126 views

Stop pages being accessible via index.php/XXXX [duplicate]

I have a Drupal 8 (served via Apache) site with clean URLs enabled, however, I'm having an issue where every page is accessible over two URLs, for example example.com/index.php/example and example.com/...
0
votes
0answers
58 views

LinkItem: how to create a disabled / null link

How do I create a LinkItem that will render into <a href="javascript:void(0)">Do nothing</a> or another form of unclickable link? Motivation: I am implementing a computed field of type ...
3
votes
1answer
669 views

How to debug 404 on user/login user/register user/logout?

I have a Drupal 8 site on 8.4.2. When I upgrade it to 8.5.1, after running the database updates, the paths /user/register, /user/login, and /user/logout return a 404. I can log in with Drush (drush ...
1
vote
1answer
34 views

Pass id from URL to next page

I have made a product page overview that displays all the products of my webshop. On the left, I have placed a filter where people can filter the products (e.g. country can be France, Germany...). ...
0
votes
1answer
507 views

Get Entity from Path or Url Object Retrieved from Menu (Node or Page)

Linking through menu link tree elements I'm getting a series of url objects and paths. What I'd like to do is turn those url objects or paths into entities. I want access to the actual entities that ...
1
vote
1answer
41 views

Drupal admin pages https

I have a multilingual site running Drupal 7.57 I want to use https everywhere - and I have set the $base_url = "https://en.website.com". But a lot of the generated url's on the site is still without ...
1
vote
0answers
300 views

Front page identification and page--front template not working

After install URL Redirect module not able to check the current page is front page or not by programmatically. Following code does not return anything: \Drupal::service('path.matcher')->isFrontPage() ...
0
votes
2answers
125 views

Default frontpage showing http instead of https

How/where can I update the domain for the default front page to https?