1

When saving an internal link to content (within the wysiwyg editor), the paths don't get aliased like they do with D7.

If I have a node (at path /node/10), with an alias of /some/other/path, when that page gets saved, then cached/viewed, the link that gets generated for the user is /node/10.

This has several drawbacks, not the least of which is that we have our breadcrumbs reliant on the URL path.

I've looked at all the input filters on the appropriate text format, but there's nothing there for it. This seems like kind of a huge issue for Drupal, I'm hoping that the fact that I can't seem to find anything on the issue means I just have a config wrong somewhere.

  • CKEditor? I wound up adding LinkIt module on top. – Kevin Dec 13 '16 at 20:32
  • We've got LinkIt installed too, but that's note a great solution either. (LinkIt seems to be a shell of it's D7 version at this point also.) I don't want the alias getting saved--aliases (like the page title) can change, then those links would break--I'd prefer to have the "/node/10" be saved, then the input filter system figure it out when caching the page. – UnsettlingTrend Dec 13 '16 at 20:50
1

Use the Redirect module (a.k.a. Global Redirect in D7).

It automatically changes /node/# links to aliases when rendering.

  • 1
    I went with this answer because--while it doesn't seem to render the link in the editor--it does do the appropriate Redirect and the user sees the correct URL, and I think this is the module I usually have installed; I only noticed the other "problem" with the links themselves because of not having it. – UnsettlingTrend Dec 14 '16 at 14:10
  • I prefer that the link does not get aliased in the editor - that way I know it won't break if the alias of the other node changes. – Darvanen Dec 14 '16 at 22:07
  • I don't want the editor to edit the content saved by the user, I want an input filter to render it to an alias; then any cache clear would fix any inconsistencies. – UnsettlingTrend Dec 15 '16 at 2:31
  • Which is exactly the same as the Redirect module - link would not get aliased in the editor. – Darvanen Dec 15 '16 at 3:38
  • Sorry. We're either on slightly different pages or I'm just confused by what you're getting at. I don't want the field that's saved in the database to be edited, but I WOULD like that, when the page is rendered and cached, it turns the 'node/n' links to aliases (like what input filters on the text format does when a page is viewed for the first time after a cache clear.) I can't seem to get that (pathologic might do it, but I'm going to go with redirect), so I'm going to go with the next best thing with redirect. – UnsettlingTrend Dec 15 '16 at 14:53
1

Drupal 7 doesn't do anything like that in core. You likely used another module. Pathologic provides this, also exists as a D8 version, only as a dev version, though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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