Questions tagged [uri]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
111 views

How can I field-rewrite a URL?

I need the modified URL to call a view with contextual filter, in Drupal 8. The URL must include the value of a field, that the user's clicking on. This works. <a href="{{ url('view.testview....
Frank Giesecke's user avatar
0 votes
1 answer
1k views

Remove the special characters (like %20) from URL

Is it possible to replace the URL encoded characters for space,?,etc. with the exact character ? Because one of the content in my site takes the following URL and it doesn't looks so nice! https://...
bincy's user avatar
  • 71
0 votes
1 answer
36 views

Using only alias URL for a page [duplicate]

If I've got a page that originally has a node (ie node/20) for the URL and then if I've assigned its own custom URL (ie website.com/landingpage) I'm finding that I can still access the page by using ...
Whirlwind991's user avatar
1 vote
1 answer
136 views

Module to Automatically Create URLs from Article Titles for Drupal 8 [closed]

I am wondering if there exists a module that would automatically create "nice" URLs using titles of posts in Drupal 8. I am aware of aliasing; however, if there is a lot of posting activity on the ...
MadPhysicist's user avatar
0 votes
0 answers
84 views

How do I switch base URL between development and production sites? [duplicate]

The production site is on http://example.com/, while the development site is on http://localhost/~aviram/example.com/. Bringing the production database to the development site breaks all links. How ...
avibrazil's user avatar
  • 201
1 vote
0 answers
1k views

facebook change default og:url and canonical URL with metatags module

I moved my site from HTTP to HTTPS, now a few days later my facebook likes are waaay lower. For example one article under HTTP was 25K likes now under HTTPS it is 3K likes. I am face with the facebook ...
mamesaye's user avatar
  • 261
1 vote
2 answers
20k views

How do I fix a "The requested URL /user/login was not found on this server." error?

I am currently migrating a Drupal 8 site from one cloud server to another. The servers are Ubuntu and CentOS (AWS EC2) respectively. After copying the files and exporting-importing the database, I am ...
MadPhysicist's user avatar
2 votes
2 answers
2k views

/index.php/ appearing in generated clean URIs

I have a Drupal 8 site with clean URLs. Recently, URLs are similar to example.com/index.php/page-url-alias. The page still loads correctly, but I don't want the index.php part to be indexed. If I ...
Tim's user avatar
  • 1,387
1 vote
1 answer
4k views

Nginx Clean URLs don't work

I tried this: How do I enable clean URLs with Nginx? And I tried this: https://www.digitalocean.com/community/questions/how-do-i-enable-clean-urls-with-nginx-for-drupal So, I tried these: location ...
user3108268's user avatar
2 votes
1 answer
794 views

Create link (url) to the full node from a Solr view (search results) with rewrite results

In admin/config/search/search-api/index/default_index/fields I added URI field. But how can I create a link to the full content? In the view, when I click on Add fields I am able to select: URI (...
meez's user avatar
  • 1,333
0 votes
0 answers
27 views

Re-write URL path before it appears to the user

I have a node with path my-awesome-node. Whenever I am accessing that node I am redirecting to a fixed path via hook_preprocess_page(). As a next step I also want to overwrite the path in the browser ...
Potney Switters's user avatar
1 vote
1 answer
78 views

Query in URL not affecting view filters

I currently have a view that has a page display and a block display. The page is disabled, but I have exposed the form in a block, which is then displayed on the homepage of the site. When the user ...
mistrytheory's user avatar
1 vote
0 answers
32 views

Pathauto URL allowing unauthorised user to view

I have a content type that only authorised users are able to view i.e. mysite.net/node/66 (Access denied message for non authorised users) but when I view the same content using an alias of node/66 i....
hobbsie's user avatar
  • 53
6 votes
1 answer
3k views

Load an entity from a URI

I have a URI 'entity:node/27' and I want to load this entity, but I cannot find the correct helper function or class to use. I do not want to explode the string or regex the string, I am fairly sure ...
Rob Holmes's user avatar
1 vote
1 answer
951 views

Generate https image URL

In order to generate full path of images(URL) on views for rest endpoint on my decoupled Drupal project I'm using Image Url Formatter module, everything works correctly until I decide to put the ...
Yuseferi's user avatar
  • 22k
2 votes
1 answer
741 views

Destination property uri not provided migrating uri

I'm working on a file migration from D6 -> D8, and in my case, all the files are already on S3, and they don't need to move, so all I need to do is migrate the URL to a new fid. Based on direction ...
wonder95's user avatar
  • 1,201
1 vote
2 answers
4k views

How do I pass a URL to a route?

I need to send the URL of a Drupal 8 route to a template. I read some documentation on Drupal API, but when I implement this in my module, nothing happens. My route in my routing file looks like the ...
JimmyD's user avatar
  • 410
1 vote
1 answer
28 views

Is it possible to show contents in a specific sites for multilingual site?

Is it possible to show contents in a specific sites for multilingual site? I have a site of multilingual support with english and bangla language. There is a content type blog. so Now I want to ...
Roni's user avatar
  • 17
0 votes
0 answers
789 views

How to load page content by url programmatically

My custom module needs content of a page generated by another custom module. Please note I am not trying to pull a node content, so my question is different than one on How to load page content by url ...
Nick's user avatar
  • 347
1 vote
2 answers
305 views

OutboundPathProcessor is not appending $options array?

I have a simple OutboundPathProcessor that should append a query string and a URL fragment, but nothing is happening. mymodule.services.yml services: mymodule.path_processor: class: Drupal\...
Neograph734's user avatar
  • 8,409
2 votes
1 answer
582 views

The path_processor_outbound service only work after clearing the cache

I tried overwrite all links from my site in Drupal 8 in accordance with a URL parameter. I use the service path_processor_outbound and implemented the processOutbound() method, extending the ...
Daniel FS's user avatar
0 votes
1 answer
2k views

RouteNotFoundException thrown when trying to reroute

I am converting a Drupal 7 module to Drupal 8. The purpose of this module is to have shorter URLs which can be shared, as an alternative of /node/123 the module should send people typing /n/123 to the ...
Samuel Caudenberg's user avatar
3 votes
3 answers
1k views

How do I redirect users visiting a path matching a regular expression?

My question is the same asked in How do I redirect from /index.php/event/* to /event? but for Drupal 8. Since the module suggested in the accepted answer for that question doesn't have a version for ...
Tran's user avatar
  • 51
1 vote
3 answers
2k views

Is it possible to give a language prefix to all the nodes without third-party modules?

I have a site with about 500 pages, all in Hebrew. I want to change all the all paths to include the language prefix. This would be the first stage in turning this site into a sub-site (with a sub-...
9 votes
5 answers
11k views

How to get a user's profile picture URL?

I need to get the user's profile picture using the following code: \Drupal::service('renderer')->renderPlain(\Drupal\user\Entity\User::load(\Drupal::currentUser()->id())->user_picture->...
user1960's user avatar
  • 131
2 votes
1 answer
498 views

Absolute or relative URLs?

Never thought Drupal's way to use relative URLs everywhere in template files was a problem until I happened on https://stackoverflow.com/questions/17187437/relative-urls-in-wordpress and read some ...
Nick's user avatar
  • 347
9 votes
1 answer
11k views

Programmatically set URL Alias when creating node in form plugin

I'm currently importing data from a database to create nodes based on them. My node save code looks like this $node = \Drupal\node\Entity\Node::create([ 'type' => 'issue', ...
Amy's user avatar
  • 5,662
2 votes
1 answer
2k views

How to get Fragment value from url in Drupal 8? [closed]

I need to get the Fragment value from url like: admin/config/system/meta_custom?query=test#abc=xyz in Drupal 8. Need value of abc - ideally using Drupal's API, rather than doing my own Url Parsing.
harsh_behl_0007's user avatar
1 vote
1 answer
1k views

Error with link field: "Unrouted URIs do not have internal representations" [closed]

I am trying to a menu link to a node and getting this exception: "Unrouted URIs do not have internal representations" Backtrace: The website encountered an unexpected error. Please try again later. ...
Kevin's user avatar
  • 27.8k
1 vote
1 answer
533 views

How to edit image URL in node field?

I am using Media Browser widget for uploading and editing images in nodes. My images are stored using image fields. Is it possible to edit URL of the image after uploading? I would need to achieve: ...
tomas.teicher's user avatar
2 votes
2 answers
4k views

How to change url for a page?

We have a production system xxx.org and a test system at test.xxx.org. We copy production to test. Some of the URL's on the test system keep pointing to production where we want them to point to test....
user469's user avatar
  • 121
3 votes
2 answers
4k views

creating links containing anchors

In relation to Drupal 8 ... if a user wanted to create a link such as the following: <a href='#' onClick='testfunction ();'>link</a> How could such a link be created, normally creating a ...
Mo-ster's user avatar
  • 393
1 vote
1 answer
128 views

Prepopulate new Taxonomy Term's Parent via the URL

I currently have a views page made up of taxonomy terms. Each term has a link next to it that redirects to the Add Term page. The add term page should auto-populate the parent of the corresponding ...
NWOM's user avatar
  • 238
1 vote
2 answers
8k views

How do I generate URL by term_id

I have a taxonomy term ID that I would like to generate the the URL alias for. In other words, instead of /taxonomy/term/{id} I would like to get the alias I have defined for this, eg: /some/path/...
mogio's user avatar
  • 687
1 vote
1 answer
160 views

How to find Image URI in Kint via .entity in the node tree

I am working on Drupal 8 finally and using the replacement for Krumo which is Kint. It packs a lot more information in than Krumo did, and came with a bit of confusion. While trying to get the image ...
NicholasByDesign's user avatar
2 votes
2 answers
403 views

Multiple URL for one Drupal 8 website configuration

I want create one Drupal 8 website (one database) with changing contents depending of the URL the user used, I mean: If the user goes to the main URL http://foo.com, the main page of the website is ...
spacecodeur's user avatar
  • 1,329
0 votes
1 answer
29 views

Serving an image programatically

I want to serve an image programatically and execute custom code, something usal and simple in plain php. <img src='test.php?image=1234.jpeg' /> Then you just serve the image in "test.php" and ...
voskyc's user avatar
  • 11
2 votes
3 answers
2k views

Wrong URL being generated in a view

I have a very strange issue with a Drupal 8 install. My production setup is running on NGINX in a subdirectory - something like www.example.com/abc. The site is running great, but I have seen an ...
Joum's user avatar
  • 336
1 vote
0 answers
220 views

How to preserve special characters like '&' in the views exposed filter form?

There is a view with exposed filters and few more filters added using hook_views_exposed_form_alter. Now these form elements/filter values are getting passed in the url like http://my_site?key1=value1&...
neha's user avatar
  • 662
0 votes
2 answers
105 views

How to get the part of URI and pass it to as a argument?

I can access current path using method \Drupal::request()->getRequestUri(); as shown below. function bartik_preprocess_node(&$variables) { $variables['current_path'] = \Drupal::...
CodeNext's user avatar
  • 3,721
1 vote
0 answers
325 views

Adding a URL Prefix

We currently have a product catalog that has a URL structure like this: www.domain.com/catelog/product-category www.domain.com/catelog/product-category/product-1 going forward we would like to ...
summerg's user avatar
  • 71
8 votes
1 answer
6k views

How to get the Route object from an URI?

If I have a Url object, or even a simple string representation of path such as /node/2, how can I get the full Route object?
pfrenssen's user avatar
  • 1,137
1 vote
1 answer
2k views

Where do I get a webhook url for a facebook messenger bot?

I want to check out and explore this interesting drupal module made by the white house: https://github.com/WhiteHouse/fb_messenger_bot I've successfully installed drupal on my Mac thru MAMP. I've ...
fdcang's user avatar
  • 13
3 votes
0 answers
284 views

How to append text of user input for affiliate marketing URL? [closed]

I'm a site administrator/content manager who wants to add functionality to a Drupal 8 site. I do NOT have a background in development (though I can make small modifications to code). I am creating ...
idiotprogrammer's user avatar
-1 votes
1 answer
46 views

Newbie question - where do I find the php file for the desired link?

I hope my question is asked properly since I have been seriously looking for about 2-3 hours how to find the php file to the url on the drupal website. Lets say the url is www.example.com/profile/...
J. Doe's user avatar
  • 19
0 votes
1 answer
3k views

How to set a session variable when a link is clicked?

I have created a search block. It outputs multiple results (names) as links. User can follow the link. How can I pass the user name into $_SESSION variable? I tried doing this, the result shows a page ...
ana's user avatar
  • 143
1 vote
0 answers
183 views

Views URL GET Query exceeding apache2 maximum limit

I am building a views based report that allows selection of fields using views dynamic fields [https://www.drupal.org/project/views_dynamic_fields]. The view also has more than 15 filters for ...
Amit Sedai's user avatar
0 votes
1 answer
526 views

How to prevent duplicate URL patterns and not have "-#" appended to the URL alias?

We have a situation where we need to prevent the same URL from being generated within the same language. Current situation (all for en): Create nodeA with a URL alias of "page/node-title" Create ...
sf_admin819's user avatar
0 votes
1 answer
26 views

How to make method entity_uri work when $entity_type is taxonomy_vocabulary?

I have a table with entities of type content, taxonomy_vocabulary and terms. For content and terms, I can show a link to each detail page by using the method entity_uri. But for entities with type ...
dxvargas's user avatar
  • 950
0 votes
2 answers
113 views

Drupal URL encoding breaks redirects/links

I added a link to my Toolbar Shortcuts list and the path is: admin/content?title=&type=slides&author=&status=All&vid=All But when you click it, Drupal redirects to: admin/content%...
user3108268's user avatar

1 2 3
4
5
23