Function weblinks_view was noticed to be generating an incorrect link to the target website in the node view.

This was found to be due to the omission of the line

    $urlnode = variable_get('weblinks_urlnode', 'url');

so that $urlnode was never assigned the value stored in system variable weblinks_urlnode, leaving it uninitialised in the call to weblinks_build_link and generating an incorrect href for the link.

So, from line 1040 or thereabouts in function weblinks_view, the code should read ...

  $status = theme('weblinks_status', $node);
  theme('weblinks_info', $node, user_load(array('uid' => $node->uid)));
  $urlnode = variable_get('weblinks_urlnode', 'url');
  $node->content['url'] = array(
//    '#value' => '<div class="weblinks-linkview">'. l(_weblinks_trim($url), $url, $options) .'</div>'. $status,
//    '#value' => '<div class="weblinks-linkview">'. weblinks_build_link($node, TRUE, 'goto', $options) .'</div>'. $status,
    '#value' => '<div class="weblinks-linkview">'. weblinks_build_link($node, TRUE, $urlnode, $options) .'</div>'. $status,
    '#weight' => variable_get('weblinks_view_position', -1),
  );
  return $node;

Given the commented out sections, it is obvious that this section of code is presently under active development so this glitch has probably already been picked up and committed to HEAD...

But on the off chance that it has somehow been missed, I hereby report it *grin*.

Comments

nancydru’s picture

Status: Active » Closed (duplicate)

Yes, it has been fixed. See #299823: Option to use node-title instead of URL-text to click on for a work-around, or use the -dev version.