Maybe I'm doing something wrong, but.....

I created a block for one of my groups - works great. However, if you click the "more..." link it takes you to the page example.com/weblinks/5. Great...If you then click on the title link it trys to take you to example.com/weblinks/node/xxxx and then gives error "Invalid group requested (node)."

Same thing happens if you go to example.com/weblinks/
If you go to example.com/weblinks everything works properly.

it seems to me that $node_url isn't setting properly if there is a "/" after weblinks??

I'm using a modified Zen theme - but that shouldn't really matter....

My node-weblinks.tpl.php looks like this:

<h2 class="title">
<a href="<?php print $node_url; ?>" title="<?php print $title ?>"><?php print $title; ?></a>
</h2>

If you need any more info, just ask....otherwise, hoping you can help.

Comments

scsmith’s picture

Since I got no reply, I decided to investigate this more on my own.

I was able to determine that the title link causing the problem was the theme link, not the weblinks title. I had turned off "Show the node title" because I was getting duplicate titles. When I set it back to "yes", I noticed that one title worked perfectly, the other was broken. Then I removed the title from the "node-weblinks.tpl.php" I was working with and this problem was resolved.

I still believe there is something "Wrong" with the $node_url used by "node-weblinks.tpl.php", but there is a workaround.

While investigating this I did uncover another (semi-related) issue. After turning on the title I realized I now had to modify "weblinks-link.tpl.php" in order to get the results I desired, but I noticed that this file doesn't contain a list of variables like "node-weblinks" does. Is that list available somewhere?

izmeez’s picture

I described the same problem in http://drupal.org/node/615992 with some details about the more link in weblinks block causing the displayed weblinks page links to individual link titles failing.

I also think this is a bug and am wondering if there is a fix other than making many changes to the tpl.php files.

I think this bug is actually critical to the use of weblinks blocks but did not change the status. I would appreciate any other thoughts on how to fix this. Thanks,

Izzy

summit’s picture

Subscribing, greetings, Martijn

dgarlock’s picture

subscribing -
this seems to be the same issue as http://drupal.org/node/590554

webservant316’s picture

subscribe.

yes when the weblink title points to the node and is clicked from the weblink 'group' page there is an error. the logic which calculates the path to the weblink node doesn't remove the group name from the url.

jonathan1055’s picture

This has now been fixed, commit on 16 April 2014, will appear in the 6.x-2.6 release coming soon.
Same fault as #590554: Term pages have links that give 404 errors but fixed in #2237875: Group page has badly formed urls to weblink nodes

Status: Fixed » Closed (fixed)

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