I can't guarantee that this is accurate but it seems as though subscriptions may be causing a problem with flexinode (see node 57765.

The error shown, when viewing flexinode nodes - and sometimes even index or Views pages containing flexinode nodes is:

warning: Illegal offset type in /home/www/home/modules/flexinode/flexinode.module on line 452.

Line numbers vary depending on which patched version of flexinode you are using - and what other patches you've added to it, but the general consensus is that the offending line is:

return $types[$type]['name'];

When subscriptions is disabled, the error message doesn't appear.

Any help would be gratefully received.

Comments

jmiccolis’s picture

I think I've tracked this bug down to a bad call of the node_name hook on line 462 of subscriptions.module. The subscriptions_link function tries to get the node name by passing the full node object where it should just pass the node type.

Changing line 462 from

$name = node_invoke($node, 'node_name');

to

$name = node_invoke($node->type, 'node_name');

Fixes the problem for me. Sorry for not providing a patch.

dziemecki’s picture

Assigned: Unassigned » dziemecki
Status: Active » Fixed

Hmmm. There must be two of these. I posted the fix for this on Saturday. Branches 4.6, 4.7, and cvs updated.

samc’s picture

Priority: Normal » Critical
Status: Fixed » Active

Hi,

Hook_node_name is no longer supported in 4.7 (see Converting 4.6 modules to 4.7) and flexinode's implementation of this will eventually be removed (see issue #31880).

The right way to get node names in 4.7 is using node_get_name(), so maybe the code in line 462 should become:

$name = node_get_name($node->type);

At least in the 4.7 and cvs branches.

dziemecki’s picture

Version: 6.x-1.x-dev » 4.7.x-1.x-dev

Good tip. I'll look into that tonight.

dziemecki’s picture

Status: Active » Fixed

Suggested fix committed for 4.7 and cvs.

dziemecki’s picture

Status: Fixed » Closed (fixed)

Fix in place 1 week, no complaints. Closing.