Attempting to navigate to a group node (ex. localhost/test01) results in the user being redirected to the a subdomain that the server isn't configured for. (test01./test01). There's no way to use group_purl as a path prefix instead of subdomain and visit the group entity.

Comments

MPetrovic created an issue. See original summary.

freelock’s picture

Hi,

The way we are using it, we configure the "Group" path to use the path -- e.g. localhost/test01 -- and this does not activate the group context (because otherwise you end up at localhost/test01/test01 ). However, if you add anything to that path -- e.g. localhost/test01/node/234 -- the path internally rewrites to /node/234 and activates the group context, which may then be used in Views, block contexts, etc.

To configure a "prefix" path instead of a "subdomain" path, using the Purl module patched to match my github branch ( https://github.com/freelock/purl-d8 ), under Configuration -> Search and metadata -> Persistant URLs, add a PURL provider of type "Group Purl Provider" and method plugin of "Group Prefix".

Does that help?

MPetrovic’s picture

Yes, I understand how Purl works. And we have our Purl provider set up the same way. We're not configured to use subdomains in any way but the redirect from path prefix to subdomain is happening anyway.

MPetrovic’s picture

A patch to get started.

The whole class really needs Purl to step and allow generating urls for objects with an arbitrary purl context.

TravisJohnston’s picture

We are having the same problem. I tried your patch. While it did stop the pages from redirecting to a subdomain that doesn't exist, it also remove the prefix. So the pages are no longer at /group/ID/node/ID - there just at /node/ID. So it removed the purpose of the module.

u_tiwari’s picture

Updated patch, re-rolled for latest dev version

freelock’s picture

Status: Active » Needs work

Hi,

Thank you for your contribution! I just tested on an active project using group_purl, and it's breaking when visiting a node that is part of multiple groups -- it's getting into a redirect loop. Removing the patch fixed the issue, so this still needs work.

Cheers,
John

freelock’s picture

I just updated the purl-d8 project on my Github, incorporating a bunch of commits from OpenScholar. I added one fix to allow visiting the group entity and entityform, and put on a new 2.0.x branch, and this is working fine for me.

Does updating Purl to 2.0.x, and updating group_purl to 2.0.x work for you?

rbrandon’s picture

Thanks, the 2.0 branch is going to help is get back in-line with purl which is great, to confirm is the commit you added https://github.com/freelock/purl-d8/commit/e6cb7030af1dfd86611949de14be8... ?

I will test with our code asap.

freelock’s picture

@rbrandon that looks like the only commit I created -- the rest of the commits on this branch are pulled from other forks...