Active
Project:
CKEditor Link
Version:
7.x-2.2
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Jan 2013 at 19:17 UTC
Updated:
21 Feb 2019 at 11:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Garrett Albright commentedWhich path are you using when editing the node? /de, /en, or no path?
Comment #2
hass commented/de - the default language on the site.
Comment #3
Garrett Albright commentedOkay, I was able to replicate this behavior when, as in your example, I put a slash at the end of the path - that is,
<a href="node/656/">instead of<a href="node/656">. So for now, I would suggest removing that slash at the end of your paths. I know that Drupal's menu system will bring you to the same node with either path, but at least in terms of its internals, the latter is the "correct" path for the node. (In code terms,url('node/656')will find and return the alias for that node, buturl('node/656/')will not. And it could be said that Pathologic is just a complex wrapper around the url() function.)Is this a deal-breaker for you? Are you not able to correct those paths somehow?
Comment #4
hass commentedDamn... You are correct, I missed the trailing slash. It seems to have been added by http://drupal.org/project/ckeditor_link. I investigate there first. I do not think you need to support this in pathologic. Once I found the bug I will add a reference here and close. Thanks for your help.
Comment #5
hass commentedComment #6
hass commentedComment #7
anrikun commentedCKEditor Link does not add slashes like this. What makes you think your issue is caused by CKEditor Link? At least, provide some information.
Turning this into a support request for now.
Comment #8
hass commentedTried it again myself and I have no clue how the people who have written the content have been able to created these paths. But once you have added such a path to content manually and edit the link again it's loaded silently and is than corrected to
node/546if I press save. So the problem corrects itself, but I do not expect that the users have added this themself. Need to try to figure out by asking the editors.On my DEV box the paths are
<a href="/foo/node/546">Foo</a>. On my life site it's<a href="/node/546">Foo</a>. The basepath shouldn't be added to the path. Only the Drupal internal path should be saved in content. This is also what pathologic does.Otherwise you will run into troubles; if you move content from live to dev and vice versa as the base path will change. I have done this and all the links are broken now.
Comment #9
hass commentedAdditional if I have path based language negotiation enabled
<a href="/node/123">Foo</a>becomes<a href="/de/de/foo/bar">Foo</a>. You can see, the language is added twice.Comment #10
hass commentedMaybe the last is caused by pathologic...
Comment #11
hass commentedDamn, it's pathologic 2.6 that causes double prefix. I've installed latest DEV and it's fixed now.
However it still stands, this module need to change it's path to
node/11without prefixing in the saved content and the filter handles the rest.Comment #12
anrikun commentedAgain there is no critical bug here!
CKEditor Link works as designed.
I'm OK to help but please stop posting critical bug reports when there are not.
Have you tried latest dev?
Comment #13
hass commentedHave you read my last comments?
Comment #14
anrikun commentedYes I have read your last comments, and you should use Pathologic to handle your case.
This was answered earlier here: #962114: Adjusting Base of Link Path
and here: #1024292: Store only node path in database
Base path is present by design so that links are real links.
You know, you'll run into the same problem with links to files or to images added for instance from IMCE, and even changing CKEditor Link wouldn't fix these links.
So Pathologic is the best way to solve your problem: it was made for thid purpose after all.
If you're experiencing problems to make CKEditor Link and Pathologic work well together, I'm OK to help.
I'm sure it used to work (see previous issues above). If it doesn't anymore, something must have changed in one of the modules that broke this and I need to have a look at it.
Comment #15
feddovdm commentedWell, just as a note: did you try telling your content formats that the path's added needed to be displayed as a alias url?
config > content > formats
ex. full-html, select: CKEditor Link Filter
Comment #16
psicomante commentedI made a patch to have the aliased url for node saved in the database.
Comment #17
psicomante commentedComment #18
jprstoney commentedGenius. Solved my issue. Thanks feddovdm
Comment #19
carchekyI use global redirect for this