Using Taxonomy List, a Block is created with a Delta value of zero. In block_titlelink.module, in routine block_titlelink_validate you have a line:

if ($module && $delta) {

that fails if $delta has the value of zero. I changed this line to:

if ($module && (strlen($delta) > 0)) {

and then it worked. Sorry I don't know anything about creating patches or anything, but I hope this is helpful for fixing the problem in your next version.

Comments

ngmaloney’s picture

Excellent. Thanks for the fix. I'll roll out an update.

ngmaloney’s picture

Assigned: Unassigned » ngmaloney
Status: Active » Fixed

Rolling out patch now.

ngmaloney’s picture

Status: Fixed » Closed (fixed)

Rolled out version 6.x-1.4

TPerkins’s picture

Version: 6.x-1.3 » 6.x-1.4
Status: Closed (fixed) » Active

A delta of 0 was still failing for me in version 6.x-1.4.

This always failed:
if ($module && ($delta || $delta === 0)) {

This worked:
if ($module && ($delta || $delta == 0)) {

ngmaloney’s picture

I'll test again. The problem I was having was by using the "==" operator if the $delta was FALSE, or NULL it would still return 0, where as using "===" is the literal comparison operator and would ONLY evaluate if the $delta was equal to the int 0.

neclimdul’s picture

Status: Active » Needs review

It will however fail if it is the string 0. a lovely php gotcha and a reason numeric delta's on blocks suck.

if ($module && (isset($delta) || $delta !== FALSE)) {

Should fix it.

sammo’s picture

Version: 6.x-1.4 » 6.x-1.6

I can confirm this is still an issue in 1.6. The comment in #6 resolves the problem.

ngmaloney’s picture

Status: Needs review » Fixed

Added patch specified in #6. New release 6.x..1.7 is now available.

Status: Fixed » Closed (fixed)

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