This is an extension of an issue reported under the Forward module - http://drupal.org/node/966388. As reported in that issue, when trying to use the Forward service link in Service Issues an extra "node/" is added to each link, which results in a page not found error.
The link created is: http://localhost:8082/forward?path=node%2Fcontent%2Fabout
Which creates a forward page that points to: http://localhost:8082/node/content/about - which doesn't exist
It should point to: http://localhost:8082/content/about
However, upon installing the 6.x-2.x-dev version (2010-Nov-23) version of the Service Links module I have discovered that the same problem is present in the Print HTML, Print Mail and Print PDF services. This indicates to me that the problem needs to be addressed in the Service Links module.
For example, the Print Mail service creates the broken link: http://localhost:8082/printmail/node%2Fcontent%2Fabout
I suspect that the problem is partly due to the fact that I am using URL Aliases on my site but I cannot see how to fix it.
Grateful if this matter could be addressed.
Paul
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | service_links.patch | 960 bytes | TheCrow |
| #11 | 988632-11-service-links-query.patch | 1.59 KB | nedjo |
| #7 | 988632-7-service-links-query.patch | 1.43 KB | nedjo |
| #6 | service_links.patch | 602 bytes | maximiliam |
| #5 | service_links.patch | 578 bytes | maximiliam |
Comments
Comment #1
TheCrow commentedHi Paul,
thanks for report it, cold you test the patch attached?
Comment #2
phiscock commentedNot quite working. It still inserts an extra preceding forward slash (where it inserted node before) which breaks the links. For example:
Paul
Comment #3
TheCrow commentedcold you print the result of this:
Comment #4
phiscock commentedprints:
//Comment #5
maximiliam commentedThis patch should work.
Comment #6
maximiliam commentedComment #7
nedjoWe shd fix this in both places is appears. We can use url('') to get the base prefix. Updated patch attached.
Comment #8
phiscock commentedSorry but that patch doesn't work either. In this case it strips too many forward slashes producing:
http://localhost:8082/printmail/contentabout
where it should be:
http://localhost:8082/printmail/content/about
Paul
Comment #9
TheCrow commentedDon't know why u have an output like that, but this should work:
I can't provide a patch now, im sorry
Comment #10
phiscock commentedIt still inserts an extra forward slash as before with that change.
Comment #11
nedjoProblem with patch in #7 was use of str_replace() since the prefix could be just / and was replaced in all instances.
Revised patch instead uses strlen and substr to strip the prefix.
Comment #12
phiscock commentedGood news and bad news. The good news is that the latest patch results in the right address.
However, the Print services are still not working because they are choking on the use of the escaped character %2F in the address instead of / (e.g. http://localhost:8082/printmail/content%2Fabout).
Paul
Comment #13
nedjoThanks for the testing feedback. The remaining issue appears to be a distinct bug, presumably caused by the use of encoded-query instead of just query for this particular service. Please look for a relevant issue or open a new one.
Comment #14
TheCrow commentedUnfortunately every solution which use
url('')doesnt work well for not-clean urlsi reproduced the same output of #4 adding an url alias '/' for 'node'
the patch attached work well for me with and without clean urls...
Comment #15
phiscock commentedThe patch in #14 seems to produce the same problem as I reported in #12 so still doesn't work for my purposes.
Paul
Comment #16
TheCrow commentedgood news @phiscock,
how @ndejo said in #13, that's just a tag's trouble, i committed all the fix, if there are still troubles, reopen this issue, thanks
Comment #18
carvalhar commentedhi,
i'm using i18n and for the non default languages it's getting a wrong path as :
http://localhost/client/en/client/en/comunicado/release-video
So i'm checking for the language and correcting it, but of course this isn't the best approach.
Comment #19
TheCrow commentedThis issue is not related to i18n, please let's continue here #1230778: Local links (print, pdf) don't work on multilingual sites using path prefix language negotiation