Hi,

Just thought I'd mention that I am using nodesinblock module (latest stable) on drupal 7.8. When I set a title link for a block created by this module the link never renders, the title is rendered as before.

Just to be sure I tried the following:

  • using a link path + title value known to work on another block - no link
  • applied path + title value for nodesinblocks block to other block known to render a blockTitleLink - link
  • manually applied + left empty (default) a title value to the block

Comments

ngmaloney’s picture

Assigned: Unassigned » ngmaloney

This might be an issue with how nodesinblock renders blocks. Will look into this.

ZuluWarrior’s picture

Thanks for having a look ngmaloney,

If its a nodesinblock issue, feel free to move the post to their issue queue! I was not sure who would be the one to 'call the ball'

adammalone’s picture

Assigned: ngmaloney » Unassigned

I've had a quick look and looks like this is the culprit:

function _block_titlelink_save_data($block, $data) {
  if (empty($block->module) || empty($block->delta)) {
    return FALSE;
  }

Nodesinblock appears to assign the number 0 as the delta for the first block it provides with subsequent blocks added with an incrementing block delta. The second block created by nodesinblock (delta 1) appears to work with block title link.

empty(0) evaluates to true and the block title link data does not get saved in the case of delta == 0 (as is the case with the first nodesinblock block).

I'm not sure if this is an issue with nodesinblock or block_titlelink but would be interested in discussion of the issue.

adammalone’s picture

I've altered the code to read

if (!isset($block->module) || !isset($block->delta)) {

as this will return the expected value. There are blocks in core with a delta of 0 so I think this module needs to change to accommodate that.

adammalone’s picture

Status: Active » Fixed

This has actually been committed to 7.x-1.x HEAD so closing

Status: Fixed » Closed (fixed)

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