Is it possible for when a "+" is selected as a separator for it to be written to the db as a "+" instead of a " " - so that the url will appear to both users and crawlers in the exact same way as defined by Views Summary?

Related (though not the same) request at:
http://drupal.org/node/140806

Comments

greggles’s picture

Status: Active » Fixed

Can't you already do this in the "Separator:" field under the general settings of Pathauto? I just tested creating a node with the title "asdf asdf asdf" after setting my separator to "+" and it created the URL alias as

http://localhost/5testbed/?q=content/asdf+asdf+asdf

My test was on Pathauto 5.x-2 - but I imagine it's the same in 1.x

mwander’s picture

greggles,

Thank you for your quick response. In 5.x.2, is it writing the URL to the table as "adsf+adsf+adsf" or "adsf adsf adsf" - yes, I am still running 5.x.1.1?

I realize that from a browser perspective, these are the same. I'm trying to get consistency for all my URLs so that there is no possible quirk with a Google crawl thinking these are duplicate links to the same content.

(I certainly am 100 percent satisfied with what Pathauto does.)

Mitch

mwander’s picture

greggles,

My latest thought, I'm right with you on closing this one. Works fine.

I need to make sure that if I want the URLs to appear with the "+" as the URL on a page, that I make it happen (from a formatting perspective. The module and related table are just fine.

Thank you for your patience (and sense of humor) with me.

greggles’s picture

Version: 5.x-1.1 » 5.x-2.x-dev
Status: Fixed » Active

I guess I see what you're saying now. It is creating the alias as "asdf asdf asdf" in the database but when it's in a link the link is "asdf+asdf+asdf". If I type into the url bar "asdf%20asdf%20asdf" or "asdf asdf asdf" then it pulls up the same piece of content potentially confusing users and search engines about duplicate content, but they are getting better about ignoring that rather than penalizing. Also, if every link comes through l() or url() in drupal then they should always be consistent, so I'm not sure how someone would learn about the "+" vs " " vs "%20" situation.

I don't see how this really presents a problem, though it is somewhat interesting. I'll leave this as active, but don't plan to work on it. If someone else has strong feelings and wants to provide a patch then I would test it and commit it (and appreciate it).

Also, looking at your other issue where you discuss the words that pathauto replaces - remember that those are optional. You can remove all of the text in that box and it will leave your words alone ;)

mwander’s picture

greggles,

Regarding the "+" versus " " - I think we're both saying the same thing. It would be great to have the "option" to write a "+" in the table instead of a " " - just in case. I agree that the problem with search engines could be more theoretical than real - however, you never know how any of the major search engines could wake up on the wrong side of the bed and make this into a problem. On the user side, for the specific site I'm trying to build, it's important for the URLs that can be bookmarked or sent by email to appear consistent - in addition to working (as they already would with either "+" or " ").

The second issue that I listed under views seems like it falls between the Views and Pathauto modules. It looks like an opportunity for someone (with technical expertise well beyond my current level) to enable Views to fully leverage Pathauto's capabilities. It's more of an integration request than anything else.

Thank you for your efforts - and please drop me a line if I can help in a reasonable untechie way or if you want me to be a tester.

greggles’s picture

I definitely think we're in agreement on the point about + vs " ".

About better integration with views - I'm not sure what more could be done. If you can describe the exact set of features that you wish were available then I'll be happy to consider them, but saying "better integration" leaves me scratching my head wondering what that means :/

Thanks.

mwander’s picture

Greggles:

Please have a sense of humor about my requirements suggestion. I'm not very techie though I think I know where I'm going with this.

I guess the dream functionality would be to be able to - in some way - use the pull-down field selections in Views to link to pages accessed via pathauto's simple URL formatting. For example, let's say that I wanted to display a list of everyone's usernames with a link to a specific page for that user, such as showing their blog, using a user friendly URL from pathauto. Right now, (I think) the easiest way to do this is to theme the View and enable the theme to show the username with the link, instead of as static text. It would be nice if Views could have an option so that any field - within views - could show a pathauto-formatted URL.

Again, I'm not sure if this is something that needs to be done on the pathauto side at all, It might be an enhancement to Views.

Please drop me a line with any questions or thoughts. Thanks again for a great module.

Mitch

mwander’s picture

Greggles,

This feature request for Views is related:
http://drupal.org/node/144654

Mitch

greggles’s picture

Status: Active » Closed (duplicate)

This was apparently a core problem that was fixed in 6 http://drupal.org/node/191116

About pathauto/views integration...I think I finally understand this a little better but it's going to take a fair bit of work to get it going...