1

I am trying to create a new simple node with url alias as test+node. when i save the node the page is not showing the node, the url changes as

http://server/packets/test%2Bnode

but it only shows the following error

Page not found The requested page "/packets/test%2Bnode" could not be found.

Can anyone help me to fix this issue out...

1
  • I had the same issue but the "+" signs were on old URLs that I can't change. We have, on our current platform, old URLs that are going to be decommitioned when we change for Drupal, but I want the SE to be able to find the new links. By changing the "+" for " " in the source old links worked as expected. Thank's for the question! Commented Nov 28, 2014 at 16:13

3 Answers 3

1

Drupal url do not accept the + sign, so it will convert the url into "space" so that only i t return page not found value. Please remove the + sign from url.

4
  • the url changes as http://server/packets/test%2Bnode and its not a pblm. I need the created node to be shown. But its showing as Page not found The requested page "/packets/test%2Bnode" could not be found.
    – Mukilan R
    Commented Jul 30, 2014 at 8:30
  • but the drupal read your url like server/packets/test node
    – Leopathu
    Commented Jul 30, 2014 at 8:35
  • when u change the seperator as '+' in the settings the url will be shown as u said. without changing it will look like http://server/packets/test%2Bnode.
    – Mukilan R
    Commented Jul 30, 2014 at 8:37
  • Its the url was encoded using urlencode() method, but the drupal again decode the url with urldecode(). it agian read your existing url with + sign
    – Leopathu
    Commented Jul 30, 2014 at 8:39
1

RFC 2396 defines how URI works. URL is just a special case of URI, so all rules apply. See section 2.2:

2.2. Reserved Characters

Many URI include components consisting of or delimited by, certain special characters. These characters are called "reserved", since their usage within the URI component is limited to their reserved purpose. If the data for a URI component would conflict with the reserved purpose, then the conflicting data must be escaped before forming the URI.

 reserved    = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
                "$" | ","

The "reserved" syntax class above refers to those characters that are allowed within a URI, but which may not be allowed within a particular component of the generic URI syntax; they are used as delimiters of the components described in Section 3.

On the other hand, as you can read here:

RFC 1738 (as modified by 2396 and 3986) defines the scheme (http:), authority (//server.example.com), and path (/myfile/mypage.htm) component, and does not define any special meaning for the + character. The HTML spec defines the query component to be mime type application/x-www-form-urlencoded which is defined as "replace spaces with + and other special characters as in RFC1738".

This means that when you use +, Drupal tries to prevent it from being interpreted as space, so it encodes it. And then it fails to recognize your alias properly.

Probably you should file a bugreport. Given that Drupal 8 is almost out of beta, I highly doubt it will be fixed, though. So consider simply avoiding special characters in your aliases.

0

Special characters and few other characters are not accepted by the url. So it encode these characters to a plane string by replacing space and + (and special characters) by other characters.

So better to enter alias that will remain simple or let drupal generate alias itself first and then edit it later nearly similar to your format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.