I use the OG_Forum module, which creates the link "Group forum." The function for altering links change all the dashes to underscores, so for any forum name with a space (i.e. "test forum"), the URL gets changed from "forum/test-forum" to "forum/test_forum". Obviously, this isn't a correct path.

Should the hook_og_link_alter only change the links for the "Create content" links?

Comments

somebodysysop’s picture

Do you have a code suggestion?

joewang’s picture

Status: Active » Needs review
  // Convert the dashes in the URL back to underscores.
  foreach($links as $key => $value) {
    if(substr($key,0,7) == 'create_') {
      $links[$key] = str_replace('-', '_' , $value);
    }
  }
somebodysysop’s picture

Status: Needs review » Fixed

Good idea. Thanks. Committing to dev. Should be available in 12 hours or so.

Status: Fixed » Closed (fixed)

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