When working with Nodesymlinks a cck block will not be displayed.

I changed line 78 to support them:

  $display_nodecontent = (!arg(2) || (arg(2) == 'revisions' && is_numeric(arg(3))) || (arg(2) == 'mid' && is_numeric(arg(3))) );

Comments

damien_vancouver’s picture

Hi Wolfgang,

thanks for this, I will add your fix into the 7.x-1.x branch and create a new point release.

Have you used nodesymlinks for Drupal 6? Do you know if the same technique should work? (If so we should probably apply this fix to both branches).

Wolfgang Reszel’s picture

Sorry, I haven't used it for D6, but they say:

The architecture doesnt change much, but as you can see from the Git statistics, the port caused changes in the 70% of the code:
Wolfgang Reszel’s picture

If I change line 78 to the following, the CCK Blocks will also support the draft view from Workbench Moderation. Maybe you should rethink the logic, so it works with every or most modules.

  $display_nodecontent = (!arg(2) || (arg(2) == 'revisions' && is_numeric(arg(3))) || (arg(2) == 'mid' && is_numeric(arg(3))) || (arg(2) == 'draft' && is_numeric(arg(1))) );
damien_vancouver’s picture

Title: Support for Nodesymlinks » Improve compatibility with other modules (Nodesymlinks and Workbench Moderation, and others)
Status: Active » Needs work

I will commit the version that works for draft as well!

As for changing the logic to work with most modules, It was like that when I started maintaining the 7.x branch, and has probably been like that since the birth of cck_blocks oh so long ago. So I'm keen on improving it to make it more compatible, but we must be certain it wont' break existing installs because I have very limited time for module support requests.

You're right that tons of other modules wont' work though, and it's worth trying to figure out a more general purpose solution.

Perhaps we can just copy what Display Suite is doing for its region as block functionality, to determine whether or not to show the block. ;)

I've retitled this issue "Improve compatibility with other modules (Nodesymlinks and Workbench Moderation, and others)" and set it to Needs work. I'll try and look into a more general solution insetad of per-contrib-module hacks. If I can't find one, we'll just live with these hacks and keep adding to the logic as people request more compatibility. I agree that approach is bound to end in tears though!

Wolfgang Reszel’s picture

Just an idea. Couldn't you just check for "node/[0-9]+"?