Accessing the Fragment from PHP - is it possible?

peashoter has raised a good point in an issue report for GlobalRedirect. What happens to a URL which has a fragment in it - such as:

http://www.example.com/node/100#comments

I have done a google and cant find any answer to this. It appears that the fragment is not passed to PHP. This makes it a LOT harder to fix!

On a positive note, if a user was to user a proper browser then they should have the fragment preserved for them.

A potential case could be if drupal.org decided to enable the path module and pathauto to improve site SEO. If there were embedded links to the comment form or comments on another node, then the redirection will break (if GlobalRedirect were also chosen). Obviously there are a LOT of if's in this sentence - but there certainly IS a case for a large site enabling path + pathauto and having all their links with fragments in them broken.

So - does anyone have any suggestions? If so - PLEASE report them to this issue.

Cheers :-)

Comment Icon

0 Comments

There are no comments yet. Why not be the first?

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <img> <p>
  • You can use BBCode tags in the text. URLs will automatically be converted to links.
  • You can enable syntax highlighting of source code with the following tags: <code>, <pre>, <bash>, <css>, <html>, <js>, <jquery>, <mysql>, <php>. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.