Hi,

Not sure if the purpose of this modules, but pathologic can translate URLs with node/id with the corresponding url alias?

thanks for the clarification

Comments

Garrett Albright’s picture

It's not the purpose of the module, but yes, it will do that in the same instances where Drupal itself would do it. (I think.)

alex.cunha’s picture

Thanks for the answer.

The problem I have is: when creating and editing content, the editors (humans) will create links with node/id. I need a automatic way (filter?) that when the content is viewed the links appear with url/alias instead of node/id.

The default installation of drupal take care of this? It is needed a filter for that? Pathologic can do that?

I have several sites with drupal 6.14 and Pathologic but node/id ulrs are not translated.

Thanks for your help

Garrett Albright’s picture

That answer I gave yesterday was more than a little unclear. Sorry.

When Pathologic process a path, it tries to guess if it is a path to something inside your Drupal installation, such as a node. If it looks like it is, it runs the through Drupal's url() function, which will convert node/X paths to aliases if the aliases exist.

So, if you're using Pathologic and this is not happening, unfortunately it means there could be several things wrong:

  • Pathologic is not processing the paths. (Are the paths changing at all?)
  • Pathologic is processing the paths, but thinks they're external paths for some reason, and so therefore not running them through url(). (What format are the paths in? Do the nodes you're trying to link to actually exist?)
  • Pathologic is processing the paths and running them through url(), but since there are no custom paths set for the node being linked to, the paths are not being converted.

You should also remember that the output of input filters like Pathologic is cached; Pathologic is not reprocessing the text every time the node is viewed. So if you create a link to node/123 before that node has a custom path, then give node 123 a custom path, your link will still point to node/123 until you either edit the node with that link in it or clear your site's cache.

Hope this helps.

narendrak’s picture

hi,

How can i get corresponding translated node/id of the node id?

Thanks in advance..

gsnaveen’s picture

Hi,

I am using 6.x-1.2 version. I am not able to translate http://ganaveen-xyz.com:90/drupal/forum/2 ... here in location of 2 i want to have the Forum name.

Is it possible to have that? by even using another module.

any guidance will be appreciated.

Thanks,
Naveen

Garrett Albright’s picture

gsnaveen, you should be able to do that using the core "Path" module and creating a path alias for forum/2.

Garrett Albright’s picture

Status: Active » Closed (fixed)
tmsimont’s picture

Version: 6.x-2.0-beta22 » 7.x-2.10
Category: support » bug
Status: Closed (fixed) » Active

this doesn't work in the latest release if you use single quotes in your href attribute. it took me a while to figure out why href='node/12' wasn't being replaced... that was why, it has to be href="node/12"

marking as a bug because either is valid HTML, right?

Garrett Albright’s picture

Category: bug » support
Status: Active » Fixed

tmsimont, yes, Pathologic won't work if the href value uses single quotes instead of double quotes. I thought the former was incorrect HTML, but a quick search proves me wrong. I guess single-quoted attributes are not incorrect, though they're still wrong. :P

At any rate, if you want it fixed, please start a new issue. Re-closing this issue for now, since it's unrelated to the single-quote problem.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.