Closed (fixed)
Project:
Block Title Link [D7]
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Sep 2011 at 16:08 UTC
Updated:
7 May 2012 at 21:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
end user commentedHave the same issue and also using menu block although I haven't disabled menu block to test it out.
Comment #2
star-szrThere is a definite conflict with Menu Block, both modules use 'title_link' as a form element name. More information here in the Menu Block issue queue: http://drupal.org/node/1261952
If you're using $block->title_link in your block template this can cause serious problems, here is a workaround for the theme layer which removes $block->title_link for blocks generated by Menu Block.
As for the block edit form, install this mini module to remove the Block Title Link form from Menu Block blocks if you don't need Block Title Link functionality for your Menu Block blocks.
Both pieces of code have not been thoroughly tested, use at your own risk, etc. etc.
Comment #3
ngmaloney commented@Cottser thanks for the detailed info. I like your solution. Block Title Link's aren't typically needed on a menu_block block so I'll disable them. Should have something rolled into dev release soon.
Comment #4
finedesign commentedThanks for pointing this out. I very much need active links in a few menu blocks. As a non-developer, I'm trying to find a solution to this. It appears the first snippet disables the link. I hope I'm wrong. Can I just paste it into template.php file? I tried changing THEME to my theme name, but still no help.
Comment #5
star-szr@finedesign - the first snippet removes the "Block Title Link" link from menu block blocks.
Comment #6
tinokreutzer commentedWarming up this thread -
Where do I need to inject the two code snippets to apply the fix supplied by Cottser? I added them to template.php, to no avail - I assume that's not quite the right approach. Also tried the dev version without luck. URL being saved remains '1'.
Help is greatly appreciated!
Comment #7
star-szr@tinokreutzer - you can actually add both snippets to template.php, but replace THEME in the first function and MODULE in the second function with your theme_name.
Comment #8
tinokreutzer commentedThanks, but I had done that already. Emptied cache several times as well.
To be clear, could you confirm what each of the snippets are trying to achieve? I'm possibly confused as to its purpose...
I (like the OP, I think) want to use Menu Block together with Block Title Link and want to specify a path for the block title. Since both modules use 'title_link', there is a conflict. Because of this conflict, any path specified in Block Title Link will be saved and displayed as '1'.
The 'title' attribute is being saved properly, btw.
I'm not sure exactly what each of the above code snippets are supposed to remove. Thanks for clarifying.
Comment #9
star-szr@tinokreutzer - when both pieces of code are used, they basically disable the Block Title Link module for Menu Block blocks. Not what you are trying to achieve. You'll have to come up with your own solution or patch for Block Title Link, or wait until @ngmaloney fully resolves the conflict between the two modules.
Comment #10
klaasvw commentedThis patch makes the form array that block_titlelink adds to the block config form array a tree. That way it's namespaced and doesn't get in the way of any other possible form fields.
Comment #11
star-szrThe patch in #10 looks good, and in my testing fixes the reported conflict with menu block.
Comment #12
barwonhack commentedWIll this patch be applied to dev and a new release be issued soon?
Comment #13
codexmas commentedPatch in #10 works well for me too.
Comment #14
rainbreaw commentedPatch #10 works well for me, also. Thank you @klaasvw
Comment #15
star-szrMarking RTBC since we've had several confirmations that it works.
Comment #16
ngmaloney commentedPatch committed to release 7.x-1.3
Comment #17
star-szrThanks @ngmaloney!