I have enabled PURL module and spaces, spaces_og. For PURL i've enabled subdomain type and entered base url http://example.com/. Then created new group with prefix test which redirected me to http://test.example.com. When I tried to edit existing group and change the prefix to test2 I was redirected to http://test2.test.example.com/.

I am not sure if this patch is solving the problem but it worked for me.

CommentFileSizeAuthor
#5 592324_beta10.patch1.23 KBTKS
#1 592324.patch1.37 KBjmiccolis
purl.diff1.52 KBmhrabovcin

Comments

jmiccolis’s picture

StatusFileSize
new1.37 KB

I'm fairly sure that patch doesn't address the core issue here. The problem is that once you change the subdomain you're effectively removing the current subdomain from purls memory. So on form submission purl assumes that it's not a part of the domain it's responsible for. Thus you get two subdomains.

I'm not sure the best way forward here. Attached is a patch that checks the domain against the 'purl_base_domain' and it they match it doesn't remove any elements. This will work well so long as your base domain is never one of your purl domains. I haven't used the prefix system in production so I'm simply not sure if it's fair to assume that you'll always want a not treated domain as your base.

socialnicheguru’s picture

following

socialnicheguru’s picture

has this also been committed to purl?

socialnicheguru’s picture

This is needed for purl to work with url_alter

TKS’s picture

Version: 6.x-1.0-beta4 » 6.x-1.0-beta10
Status: Needs work » Needs review
StatusFileSize
new1.23 KB

That patch from jmiccolis was not committed in the latest version (6.x-1.0-beta10), and the code in question now lives in purl/includes/purl_subdomain.inc, instead of purl.module itself.

The patch attached here implements the same code tweaks in that new file. It's working fine for me on a test install right now, but the testing so far has been very quick and cursory.

Hope this helps...

yhahn’s picture

Status: Needs review » Fixed

Thanks, committed with adjustments: http://drupal.org/cvs?commit=358690

Status: Fixed » Closed (fixed)

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