I use pathauto but linkit set url like node/5 ...
it's bad for SEO

and other: by default add user 1 to any profile will be good :)

CommentFileSizeAuthor
#19 url.patch905 bytesthisisjoe
#12 pathlocig.png102.67 KBsunchaser

Comments

anon’s picture

Priority: Major » Normal
Status: Active » Closed (won't fix)

First, a feature request ISNT major.

If you need SEO url, there is a module named "pathologic". Use that and you will be ok.

About the user1.
I think that all users should be assign to one or more roles, so I will not implement this.

protools’s picture

Hm ...If you use path module, and clean url, you must use module, like global redirect. And so, all link made with linkit module will be redirected link ...
then the benefits of this module is reduced to zero, I will try to use pathologic, but i am not sure that is help in this situation.

protools’s picture

Yes, pathologic fix this

profelm’s picture

Protools, I found myself doing the exact same thing.

I was enthused to find out that this would allow relative links, but was disappointed with it's integration with aliases.

protools’s picture

@profelm

http://drupal.org/project/pathologic

tune text format and all ok

Tony Finlay’s picture

Version: 7.x-2.2 » 7.x-2.3

I'm having issues with this in the latest stable release, I have installed pathologic but to no avail

protools’s picture

tune text format - enable "Correct URLs with Pathologic"

kspal’s picture

In a multi-language site, note that you have to use the development version of Pathologic (7.x-2.x) to get localized alias. Else, if using the stable version (<= 7.x-1.4), you'll always get the neutral-language alias. See http://drupal.org/node/348421 for more info

-Mania-’s picture

I'm having problems with this too. User links work fine and are displayed as /user/[name] instead of user/[id] but node links are not changing and display as node/[id] instead of the pathauto alias. What gives? I'm using CKEditor 7.x-1.9, Linkit 7.x-2.5 and Pathologic 7.x-2.1.

sunchaser’s picture

Same behavior for:
Linkit 7.x-2.5
Pathauto 7.x-1.1
Tiny MCE 3.5.6

Node links also not changing and display as node/[id] instead of the pathauto alias.

The silver lining regarding this 'issue':
Using the url syntax like "node/#" for internal links obviously avoids having broken links if a node's alias changes.

anon’s picture

Have you configurated pathologic correct?

For each text format you have you and use, you most add "/" to the All base paths for this site

sunchaser’s picture

StatusFileSize
new102.67 KB

Yes, I have.
I've attached a screenshot of my Full HTML text format settings (that's the text format I'm using (by default))

anon’s picture

Try give the pathologic filer a lower weight.

-Mania-’s picture

Altering the pathologic filter weight (tried them all) had no effect for me. I've also tried the "/" setting to no avail.

anon’s picture

Status: Closed (won't fix) » Fixed

Ok, I have tested this now, and the I also got this issue.

It turns out that pathologic is language sensitive and prob. contains a small bug.

I have a site with only one languare (en) and both my nodes has "en" as language.
In this senario, it will not work.

But if I change the target nodes languge to "Language Neutral" and clear the case (yupp, the filterns are cached) it will work.

It also turned out that there is no need to add a slash (/) in the pathologic config anymore. As far as I can see anyway.

thisisjoe’s picture

Why should this module depend on Pathologic (which I wasn't able to get working anyway) to output the path alias?

Seems like it could be done straight-away with the following edit...

Line 89 in linkit-plugin-entity.class.php changed from:
$options += array('alias' => TRUE);
to:
$options += array('alias' => FALSE);

Or really, leaving it to default by not sending $options?

Am I missing something or breaking a feature or code somewhere?

Thanks.

Edit: I am using linkit-7.x-2.5.

-Mania-’s picture

I have a site with only one languare (en) and both my nodes has "en" as language.
In this senario, it will not work.

But if I change the target nodes languge to "Language Neutral" and clear the case (yupp, the filterns are cached) it will work.

I can confirm this fixed the aliases for me. At first I tried looking at where to change the node language but couldn't find it as the "Multilingual support" was disabled for my content type. Unfortunately you can't have "Language Neutral" as default because new posts are saved with whatever is the default language. So is there a fix expected for this?

anon’s picture

@thisisjoe:

Linkit does not depends on pathologic!
If you want to use aliases (which not everyone wants for different reasons) you should do like you do for all other Drupal functionality, download a module that extends something to give you the "extra".

The reason for inserting generic paths is just that it is generic. "/node/18" will always work.

Tho, I have started to implements different insert plugins in the 7.x-3.x verison of Linkit. That will come with a plugin for using the "core" aliases as paths which seems to be what you are looking for.

thisisjoe’s picture

StatusFileSize
new905 bytes

I'm not sure I understand (or maybe I'm mistaken). From the comments and documentation, it sounded like Pathologic was required to have alias'ing work correctly. As I see it, the code as-it-is simply forces path aliasing to not work.

"buildPath" is being sent "/node/18" (or "node/18" actually, I forget now). And $options->alias is set to TRUE (in linkit-plugin-entity.class.php), which is incorrect, since it's not alias'd. Per Drupal API (url).

Attached is a patch.

anon’s picture

If you want transform the hrefs to be alises you need pathologic or some other text filter module.
This functionality is outside of the Linkit scope.

Linkit is inserting generic urls (/node/18) just because that will work even when you dont have pathologic.

Its not incorrect to set the alias to true, as I DONT want an alias, I wanna use the url() function to construc a generic url.

-Mania-’s picture

Do I understand correctly that there's just a single line (true/false setting) that makes the linkit have generic urls instead of aliases? If that is the case could there be a simple admin setting to toggle this on/off? Having it on means wouldn't even need pathologic for aliases.

anon’s picture

-Mania-, Yes its just a single line.

Tho I will not implement a UI setting for this in 7.x-2.x.

There is some work going on with this in 7.x-3.x.

thisisjoe’s picture

The API for url() states: "'alias': Defaults to FALSE. Whether the given path is a URL alias already." Given what you're saying, you might as well just skip using url(). To me, this just seems to be an API usage issue - not scope (since aliasing is core functionality), supporting Pathauto, or requiring Pathologic.

I'm guessing that your intention is to allow the usage of Pathologic? Since generating the aliased URLs would preclude Pathologic from working on the URLs? Either way, if 3.x offers a choice, great!

Anyway, not trying to argue the point further... just one gripe I had with an otherwise very useful module. Thanks!

Status: Fixed » Closed (fixed)

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

finex’s picture

I want to suggest to explain on the module page that pathologic is not a full working solution to convert internal node links (like /node/150) to the relative url alias. Thanks.

finex’s picture

Issue summary: View changes

add user 1 to any profile