Instead of using an absolute path to /ignore_user/list, I believe the correct approach is to use base_path().'ignore_user/list'. On my site (currently in a "/drupal" subdirectory off the domain), I was getting a 404 error trying to view the ignore list from some links (as "/ignore_user/list" should be "/drupal/ignore_user/list").

If I am correct, the following changes should be put in place:

Line 236 should read:

 $output = t('<div class="ignore-user-container">!username is on your <a href="!ignore_list">ignore list</a>. Clic\
k <a href="!node" class="ignore-user-content-link">here</a> to view this post.', array('!username' => theme('username', $\
authors[$node->uid]), '!ignore_list' => base_path().'ignore_user/list', '!node' => base_path().'node/'. $node->nid)); 

Line 281 should read:

 $output = t('<div class="ignore-user-container">!username is on your <a href="!ignore_list">ignore list</a>. Clic\
k <a href="!comment" class="ignore-user-content-link">here</a> to view this post.', array('!username' => theme('username'\
, $authors[$comment->uid]), '!ignore_list' => base_path().'ignore_user/list', '!comment' => base_path().'node/'. $comment\
->nid .'#comment-'. $comment->cid)); 

I'm not 100% sure the node path changes are necessary, as my site seemed to ignore those paths anyway, but the path was wrong with the old code.

Comments

korvus’s picture

It's also possible that the l() function should be used instead, such as the ignore list link here:

Line 236:

$output = t('<div class="ignore-user-container">!username is on your !ignore_list_link. Clic\
k <a href="!node" class="ignore-user-content-link">here</a> to view this post.', array('!username' => theme('username', $
authors[$node->uid]), '!ignore_list_link' => l('ignore list','ignore_user/list'), '!node' => base_path().'node/'. $node->nid));
jaydub’s picture

Ok I see where this could be a problem. Adding links in t() calls is tricky and the Drupal docs for module developers don't really mention this strongly enough. I'll commit to CVS now. Please try the next dev snapshot and if it's working for you I'll roll a release.

korvus’s picture

The dev version appears to work just fine for me. Thanks!

jaydub’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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