Problem

The Social Group Default Route module changes the canonical path for groups from /group/{gid} to /group/{gid}/home

However, this means that /group/{gid} is now unrouted. If a user has already saved this path as a bookmark or linked to it from a piece of content (without a link field) then they now receive a page not found error when navigating there.

Solution

Either just hijack the /group/{gid} path if that's possible or make sure there is a fallback and that it redirects to /group/{gid}/home.

Comments

Kingdutch created an issue. See original summary.

robertragas’s picture

Open Social already changed this canonical path from the beginning in the routesubscriber to

    if ($route = $collection->get('entity.group.canonical')) {
      $route->setPath('/group/{group}/stream');
      $defaults = $route->getDefaults();
      $defaults['_entity_view'] = 'group.stream';
      $defaults['_title_callback'] = '\Drupal\social_group\Controller\SocialGroupController::groupStreamTitle';
      $route->setDefaults($defaults);
    }

This new submodule changes this route to /home, so we only have to worry about /stream, but I think this also exists already correctly?

BTW, I agree with that the group canonical is broken with group/id, but like I said, this was already changed from the beginning and thus broken so not really due to this new submodule.

albertoalaejos’s picture

Status: Active » Closed (duplicate)
Related issues: +#3061282: Group needs to be redirected to stream

I close this issue because it is a duplicate, it has been already fixed