Download & Extend

Link on title sends us back to weblinks page

Project:Web Links
Version:6.x-2.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:postponed

Issue Summary

If i set the linktitle not to go to the node but to the site - it sends me back to the page im already on. The achor goes to the pressent url - not to the linked site.

Comments

#1

Title:Link on title seds us back to weblinks page» Link on title sends us back to weblinks page

You'll have to give us more details about your settings and configuration (including the theme and whether or not it has any special templates) because this is not happening to me. I tried it with 4 different themes.

#2

Status:active» postponed (maintainer needs more info)

#3

Links page settings
Make groups collapsible: No
Link group title to group: No
Page Sort order: Normal
Maximum group depth (main links page): 3
Spamlink: No

Link settings
Show the node title: yes
Link the title to the node: Site
Link description display: Full
Enable click-tracking: No
Open links in a new window: No
Display a link to other users' links: No
Display URL/Visit on links page: yes
Link displays as: webbadress
Maximum link title length: 0
Strip protocol and "www": No

Do you need the Groups or Fields settings?

In fact - I tried changing evrything that seems relevant - it doesnt matter. If I set the Link the title to the node to Node - of cause the title links to the link-node, but I dont want people to reach the link-node, I whant them to follow the link to the site. But setting "Link the title" to site only brings us to "weblinks" (to be precise - I have a webadressalias for weblinks - so thats where the titlelink on all the links on the same page goes).

My theme is a zen subtheme, based on zen-starterkit.
Not realy any templates (exept some hacking of the standard templates for removing taxonomy links and such standard fixes).

It worked in 5.x - its since the upgrade to 6.14 it dosent work. I remade the theme by using the old css and the new zen starterkitt.

#4

Interesting. Before that update, using "Show the node title: yes" would produce duplicate titles in my theme, but it doesn't now... I didn't realize that problem might have been fixed.

I set my site up like yours and everything is working correctly. My next guess, at this point, is that this is the theme problem that took up a lot of bandwidth in another issue.

I downloaded Zen 6.x-1.x-dev and looked at the node.tpl.php. I see the relatively standard

  <?php if (!$page): ?>
    <h2 class="title">
      <a href="<?php print $node_url; ?>" title="<?php print $title ?>"><?php print $title; ?></a>
    </h2>
  <?php endif; ?>

This part of the template is just like my theme's template. Unless you've changed that code, it should be working correctly, as my does.

It worked in 5.x - its since the upgrade to 6.14 it dosent work. There is so much difference between the 5.x and 6.x-2.x branches that comparing the two is pretty much meaningless.

If you've made changes to node.tpl.php (or more importantly, node-weblinks.tpl.php), please post that code here. Please begin the code with <code> and end it with </code> when you paste it.

#5

I just enabled Zen and set my account to use it, and the links are correct for me.

#6

I think it´s the same:

  <?php if (!$page): ?>
    <h2 class="title">
      <a href="<?php print $node_url; ?>" title="<?php print $title ?>"><?php print $title; ?></a>
    </h2>
  <?php endif; ?>

But that´s not relevant, is it? Since, like it says in the comments: * - $node_url: Direct url of the current node.

I dont understand if the module in some way manipulates with the $node_url - but othervise it should not work using this template.

#7

Yes, this module sets the $node_url value for the theme.

#8

Allright - where in the code gets the $node_url the site url value?

Since I get the pressent page url on each linktitle the problem would be there.

#9

I'm not entirely sure I understand the OP problem, but if I'm getting this correctly, it sounds similar/identical to the problem I have.

On my installation, I had pathauto installed and clean URLs enabled.

I had weblinks installed.

I had my 'nodes' in groups under weblinks, like so:

pathauto and clean URL version: http://siteurl.com/weblinks/groupnamehere

But, when you clicked to actually visit a node under that group, it'd be linked to, "content/nodenamehere" and that would take me here:

http://siteurl.com/weblinks/groupnamehere/content/nodenamehere

Generating an error because the actual web alias needed to get to that node is http://siteurl.com/content/nodenamehere

I was able to 'repair' this bug partially by removing clean URL and disabling web aliases for the actual nodes and leaving it only for the content, but I really need to be able to use pathauto for the nodes as well, to have nice clean SEO optimization!

Something like this may temporarily repair the issue... at least for this page:

<?php if (!$page): ?>
    <h2 class="title">
      <a href="<?php print "http://siteURLhere.com/" . $node_url; ?>" title="<?php print $title ?>"><?php print $title; ?></a>
    </h2>
  <?php endif; ?>

Creating the code <a href="http://siteURLhere.com/content/nodenamehere"....>

But I haven't checked to see if that would break things elsewhere yet.

Hope this helps and maybe you can let me know any ideas on how to fix it temporarily. Thanks.

#10

Status:postponed (maintainer needs more info)» postponed

  <?php if (!$page): ?>
    <h2 class="title">
      <a href="<?php echo "http://" . $_SERVER['SERVER_NAME'] . "/" . $node_url; ?>" title="<?php print $title ?>"><?php print $title; ?></a>
    </h2>
  <?php endif; ?>  
   

Above is what I am currently using to repair this issue. So far, it is working perfectly.... *crosses fingers*

#11

Subscribing, having the same issue but only when inserting a new weblinks node. Than the weblinks overview page is shown instead of, like with other nodetypes the view node page.
Greetings, Martijn

#12

Right littlealy - tryed it.

But the problem seem to be that $node_url does not return a url. Thats probably because i cant switch of the pathalias - it would break my site.

Did a lott of testing - this error is not theme based. I think its a bug when you using path-alias.

I think that the bug is that the function that returns the $node_url gets the url by identifying the node by its path and not by its nid. I dont know where in the code that is so I cant fix it.

#13

Got a partial fix -
lines 363 ff in weblinks.module (6.x-2.3-dev)

    else {
      $variables['node_url'] = $variables['weblinks_title_link'];
    }

is changed to
    else {
      $variables['node_url'] = $variables['url'];
    }

This does not fix all the problems, but it workes on some sites.

#14

If I remove all the "fixes" I made ealier in the theme, it works.

#13 is the solution for this bug.

nobody click here