Active
Project:
Subdomain
Version:
6.x-1.7
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2009 at 12:01 UTC
Updated:
1 Mar 2010 at 10:11 UTC
Currently I've set subdomain to maps organic groups to subdomains.
For example I've a group called "group name" so pathauto+subdomain correctly create "http://group-name.domain.com" (where domain.com is my domain). The subdomain works perfectly and it displays the content of the group.
Now I've created a node for this group (node audience), the title is "first news posted in the group". I've set [title-raw].html in pathauto settings so the the URI of this node is:
http://domain.com/first-news-posted-in-the-group.html
What I'd like now is to have the subdomain for nodes posted in the group, like:
http://group-name.domain.com/first-news-posted-in-the-group.htm
instead of:
http://domain.com/first-news-posted-in-the-group.html
Is this possible with the current subdomain+pathauto implementation? Does this need only a different configuration?
Many thanks!
Comments
Comment #1
finex commentedI've done some tests. In all of them I've set "[subdomain]" as path pattern for group node type.
If I manually set the alias of a node posted into a group to:
the URI will be:
which is correct.
So I've tried to set the following pattern into the default path pattern:
This partially works: nodes posted into a group now are correct but nodes which aren't posted in a group became:
So the final URI is:
which obviously doesn't work.
Finally I've done one last test. I've set the following pattern for the default path pattern:
In this case "subdomain" pattern is not used and the final URI is:
(like when the pattern is [title-raw].html)
Comment #2
finex commentedComment #3
finex commentedI've looked at the demo site (eslwell.com) which does exactly this thing. It should be interesting to know how it has been configured.
Comment #4
finex commentedI've tried to look the source code but I didn't understand how to configure it... :-(
Comment #5
redben commentedsubscribing
Comment #6
redben commentedI had the same problem. but it found that this issue is only related to group content created prior to setting pathauto alias. I went and created new content and subdomain works perfectly.
The pathauto for group content should be [subdomain]/my/custom/path/[title-raw]
which results in og-name.example.com/my/custom/path/my-title
Comment #7
redben commentedPlus its seems like subdomain gets out of sync when you update path aliases for existing nodes :
Comment #8
finex commentedNow the path alias of nodes posted into groups are correctly generated. But there is still the problem of nodes which aren't posted in a group, they became:
instead of:
So the final URI is:
A workaround is to duplicate the content type, but I'd like to have only one content type.
Googling around the net I've found this:
http://sefikuv.net/~computers/drupal-how-i-got-subdomain-pathauto-module...
The suggestion is to hack the path module for removing the unneeded string "~/" in the path:
I'll have to try it, but if it works, could be introduced in the subdomain module?
Comment #9
finex commentedThe hack is not correct, the right code is:
We don't have to add the tilde before the alias :-)