I finally got round to looking at the pathauto module project page, and was a
little surprised to see issues such as a conflict with wysiwyg editors and reliance
on another module to prevent duel urls and sandboxing. Also, there is quite a
lot of live bugs.
Now, I'm not that interested in SEO at the moment; my first two sites with Drupal
will be closed to the public and search engines. So that's one main supposed
benefit gone.
The other thing is that I've used the Drupal.org site now for weeks, and I don't think
I've looked at a url once. Do users actually use 'pretty' urls to navigate? Drupal's
default 'clean urls' are a good deal better than some of the cms I've seen.
So, I don't know whether to install, learn and set-up pathauto or not. Some questions:
1) is it really 'set up once and leave alone'? Is it easy to set-up, or is it a day's work?
2) will it interfere with multi-lingual sites?
3) will node/2 and node/my-page both being active cause filtering problems? I don't care about search engine sandboxing, and want to avoid the 'global redirect' module, but will this issue cause other problems with, for instance, Views?
And I'd like to hear anyone's opinion on whether it is a 'must have' module, or
whether 'pretty' urls are only really necessary for SEO.
Thanks!
Comments
Pathauto is one of the first
Pathauto is one of the first modules I install on all my Drupal sites (along with Views, CCK, etc.). Can't say I've ever had a single problem with it.
I doubt many people actually type out the URL to navigate the site; there are other benefits, for example: using the URL alias (generated by path auto) to create hierarchical template suggestions - this is a very convenient trick that I've been using for ages. It's also quite nice to be able to glance at a URL and instantly see where you are without looking for breadcrumbs (which may be disabled) or the navigation (which may not show the active page).
RE 1: Yes, it really is :). Setup takes literally 5 minutes.
RE 2: I've never had multi-lingual sites, but... If you generate the path by using the node's title (or other fields), there could be problems because the title would be different depending on the language used.
RE 3: Filtering problems? Not sure what you mean, but I've never had any problems. I've also never ran into any conflicts with Views (or any other modules).
---
Yuriy Babenko
www.yubastudios.com
---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com
Thanks for your replies:>
Thanks for your replies:
> RE 2: I've never had multi-lingual sites, but... If you generate the path by using the
> node's title (or other fields), there could be problems because the title would be
> different depending on the language used.
I wasn't thinking of differences in titles; when an english node is translated into, say,
spanish, the spanish version becomes a separate node with its own language 'flag'.
What I was worried about is a title containing non-ascii characters like ñ and à
ending up in a url?
> RE 3: Filtering problems? Not sure what you mean, but I've never had any problems.
That's because I don't know what I mean (yet)! For instance, if I'm using the Views module
to list content, using a url argument, will having four urls:
node/1 == node/hello-gorgeous and node/2 == node/hola-guapa
cause any problems for the module or headaches for me trying to make views? I've only
got a vague idea of what the views module does at the moment.
Cheers
The non-ascii characters
The non-ascii characters could definitely be problematic. Pathauto actually includes a feature to strip specified characters/words from the URL (or replace them with something), so you could pre-define that...
About Views... it's essentially a script that collects data without you having to write any custom queries. When you use Views to pull up nodes, any links to the nodes will have only 1 URL. If you have an alias (ex. node/hello-gorgeous), it will be used. Alternatively, Drupal's internal URL (node/1) will be used.
Since you will have two nodes of essentially the same content (just in different languages), you will want to specify some sort of filter within Views to filter out all the non-English or non-Spanish nodes.
---
Yuriy Babenko
www.yubastudios.com
---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com
Thanks for your replies.>
Thanks for your replies.
> pathauto actually includes a feature to strip specified characters/words from the URL
So there is a place where I could specify ñ = n, à = a, etc? Great.
1)
Actually, I was thinking, can pathauto generate urls based on role? So that the admin
rule uses titles in the url, but the auth users get something more numerical & generic?
Edit: On first inspection after installing the module, the answer appears to be 'no'.
> If you have an alias (ex. node/hello-gorgeous), it will be used.
> Alternatively, Drupal's internal URL (node/1) will be used.
2)
Ah, nice to know that Drupal itself knows about and prefers aliases.
So it's just search engines that are confused, then.
Do you bother using the global redirect module?
You've convinced me to install it on a test site, and play with it.
Cheers.
> So there is a place where
> So there is a place where I could specify ñ = n, à = a, etc? Great.
Actually I just looked through the pathauto settings (on 5.7) and it looks like I was mistaken. While strings can be removed from the URL, I don't see any replacement options.
RE 1) I don't think this is possible. A user could have many roles, and what if a user's role was used in the URL, and then the user lost that role? This would get messy real quick.
RE 2) I haven't used the module before (most of the small~ish sites I've made lately did not require much emphasis on SEO), but it looks like it wouldn't hurt to use it - I'll also start using it with all future sites.
---
Yuriy Babenko
www.yubastudios.com
---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com
> Actually I just looked
> Actually I just looked through the pathauto settings (on 5.7) and it looks like I was mistaken.
> While strings can be removed from the URL, I don't see any replacement options.
Replacement is not in the UI - a text file is used called i18n-ascii.txt.
For vD5 I think it needs to be downloaded, and in vD6, it is included.
But I read that apparently pathauto will soon start using the transliteration module instead.
Thanks for your replies.
I didn't know about the
I didn't know about the i18n-ascii.txt file. Thanks for the info!
---
Yuriy Babenko
www.yubastudios.com
---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com
Yup
+1
I also start with a similar config and have no issues.
--
http://www.drupaler.co.uk/
--
https://www.codeenigma.com/
Yes, I have problems with
Yes, I have problems with pathauto and taxonomy views... For example, I've got a view for:
domain.dot/category/
Then, when I go to this URL: domain.dot/category/real_one (a real one alias), I can not see views, only default drupal view for a term
But if I go to: domain.dot/category/invented_new_word (a word is not in any vocabulary nor alias), then I can see my views :-(((
www.calbasi.net
pathauto not working with non English site
I have been testing a site locally on my PC. A strange thing is happening regarding the URL creation process by pathauto. When the site is in English locale, the URLs works very nicely, even when my titles are not in English. However, when the site's default language is changed to other language (in my case it is Bangla/Bengali), the URLs got changed to node/node#. It took me a while to figure it out that pathauto was not functioning properly when I change the site language. Strange.
Yes, this makes sense. The
Yes, this makes sense. The pathauto URL is based on various node parameters, which are (by default) in English. When you change the site language, these parameters change. Now, pathauto could potentially generate new aliases, but Drupal doesn't allow multiple aliases pointing to the same destination, and since there is already an English alias, a new one doesn't get created and Drupal uses the "internal" (node/nid) one, instead.
---
Yuriy Babenko
www.yubastudios.com
---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com
> However, when the site's
> However, when the site's default language is changed to other language (in my case it is Bangla/Bengali), the URLs got changed to node/node#
I am not seeing this behaviour with spanish language.
Have you installed the i18n module? http://drupal.org/project/i18n
The core language feature does have some strange behaviour without it.
Just to clarify:
1) You have one node in english (ie. no translation), and switching the language changes the url of that node?
OR
2) You have one english node, translated to bangla (which is another node), and when you switch language, pathauto doesn't use your bangla title in the url?
If 2), then pathauto probably realises that the title doesn't contain ascii, and so falls back on the node/[N] format. URLs are not international yet (ie. the system only supports ascii character sets), and won't support internationalisation for at least another four years.
Duplicate content with non asc-ii character urls
Hi everyone.
After I got penalized by google I found out the following:
A have a page:
exapmle.com/example = node/123
I change this url in my browser and submit:
exapmle.com/ëxample
exapmle.com/exämple
exapmle.com/examplë
and I open the same page again and again with all those urls!
All the variations of the non asc-ii characters in the url are opening the same page - which leads to duplicate content.
i have pathauto, pathredirect and global redirect modules installed. All modules are up to date. Drupal-5.10.
Is there anyone with similar issue?
Thanks!
Example of duplicate content on drupal.org
http://drupal.org/project/issues/pathauto
has the following duplicate urls with non asc-ii character variations:
http://drupal.org/project/issues/p%C3%A4th%C3%A4uto
http://drupal.org/project/issues/patha%C3%BCto
http://drupal.org/project/issues/pathaut%C3%B6
http://drupal.org/project/issues/päthäütö
Afaik this is not a pathauto
Afaik this is not a pathauto issue, but rather a browser issue.
I assume this is happens because most browsers do not handle these characters in URL's very well, so most just "interpret them" as a nearest equivalent such as "e" (IE7 appears to do this), whereas if you are using Firefox you'll get a 404.
At least that is what I've found in my limited testing for one of our sites that is in Swedish.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
I don't agree
For instance try this url here:
http://sphinn.com/upcoming/mostpopular/
and the non-asc-ii variation give us a custom page-not-found error.
http://sphinn.com/upcoming/mostp%C3%B6pular/
Same browser, different results.
In the end, this is definitely a duplicate content issue, which is penalized by google.
Anyway, thanks for your opinion.
Rgds
You don't actually mention
You don't actually mention which browser, my guess its IE7. Also, SE bots are not browsers, you can't say for sure unless you are pulling that out of your logs if that is what they are seeing.
For what its worth, for the most part duplicate content hysteria is unfounded, at least in my experience its hardly worth raising a sweat over - there is no penalty, duplicate or near duplicate pages just don't get indexed (the original does) or don't rank as well, so what's the big hooey? Take a look at this http://searchengineland.com/070315-100022.php
I wouldn't be loosing any sleep over it:)
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
You'll see what's "the big hoey"
when/if your site gets penalized by google too.
Anyways thank you for sharing your views on the subject of duplicate content.
Excuse me my friend, 10
Excuse me my friend, 10 years in web publishing and 5 of those working in SEO, I think I dam well know what I am talking about.
What's your experience in this industry?
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Dear friend,
I don't want to argue wit you.
Pros and cons of duplicate content penalization is not the issue here, nor your or mine expertize on the subject.
I have a SERIOUS problem and I want to solve it. That's all.
Thanks for your thoughts and your time.
Absolutely, absolutely, you
Absolutely, absolutely, you are right, please forgive my hot headedness, its out of line.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
The browsers
are FF3 and IE 7
Can you modify the .htaccess
Can you modify the .htaccess to redirect any URL with non-ascii characters to a 404 page?
---
Yuriy Babenko
www.yubastudios.com
My Drupal tutorials: http://yubastudios.com/blog/tag/tutorials
---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com
Yuriy thank you for your
Yuriy thank you for your reply. I could try to modify the .htaccess to redirect any URL with non-ascii characters to a 404 page.
Do you know how to do that?
Thanks
Also note that I opened the
Also note that I opened the Pathauto Issue on this subject here: http://drupal.org/node/301373
Pathauto and Languages module
No, this is not the issue...
We only have pathauto url for the default language - while pathauto produce a correct url rewriting.
When you change the default language you will see that it is not an issue about unicode, ipv6 or any browser implementation...
It might be a path and i18n issue - anyone who could help here?
Alexandre
https://asynchr.one
The problem occurs, if you
The problem occurs, if you first set up the site for example in English, with all its nodes and later you switch to an other language (eg. Spanish). The aliases wont work instead you get node/nid.
To solve this (in respect to the previous) comment:
1. change site language to the one you finally want to use ... eg. Spanish (es)
2. change the language of the node to es (there is no option for that, so you have to edit the database: node table)
3. change the language for the alias to all (do this in the alias section: admin/build/path or in the database:
update url_alias set language = ''; )
Now it should work.
problem path auto with Referenced node title
problem path auto with Referenced node title
in modules/token/token_cck.inc
remplace this function:
function nodereference_token_values($type, $object = NULL, $options = array()) {
if ($type == 'field') {
$item = $object[0];
-
+
$tokens['nid'] = $item['nid'];
- $tokens['title'] = strip_tags($item['view']);
+ $node = node_load(array('nid' => $item['nid']));
+ $tokens['title'] = $node->title;
$tokens['link'] = $item['view'];
return $tokens;
}}