In the image you can see the name of the region "Main Menu" is displayed above the menu which is a block provided by nice menus v 6.x-1.3. The block is being added through a site wide context. The code which is adding the region name is:

<a class='context-block-region' id='context-block-region-<?php print $region ?>'><?php print $region_description ?></a>

From line 2 of context-block-editable-region.tpl.php

The only place I found this theme function called was in function execute($region) of context_reaction_block.inc

Is this supposed to be used for inline context editing? I'm not finding this feature. For now I don't know how to get rid of the region name and I need to.

Thanks

Comments

nevets’s picture

If you are displaying the menu using it's block, it has a title by default. Configure the block and set the title to <none>

jethro’s picture

Status: Active » Fixed
StatusFileSize
new15.52 KB

Thanks for the response.

It is not the block title. It's the name of the region as stated above. In the attached image the region name shows up even if there are no blocks in it. It only appears for logged in users.

It is from the code above having to do with editable regions.

Normally this is hidden with css.
a.context-block-region {
display:none;
}

But my menu's css was overriding it. It took a little while to figure this out, and I thought something more complicated was happening.

Status: Fixed » Closed (fixed)

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

rjbrown99’s picture

Status: Closed (fixed) » Active

This is still an issue, happening with me as well. In my case, I have a global context displaying the secondary links block in the footer region. I see the word "footer", which looks like this:

<a id="context-block-region-footer" class="context-block-region">footer</a>

My secondary links block has for the title. It's not the title, it's the region that is showing up. Same as the original poster, only happens for authenticated users.

rjbrown99’s picture

Status: Active » Closed (fixed)

Doh, it is a CSS fix - I have an override. So if you see this, check CSS via firebug :)

jorditr’s picture

Same effect on one site I'm developing. Is this a feature? Marking an element with an "a" and doesn't link to anywhere?? And not hidding it? An easter egg? It took me a while to discover. It looks sad. Please I think we all should try to make html code that validates...

meramo’s picture

Subscribing. A very weird effect, in fact. Context 6.x-3.0

Anonymous’s picture

Status: Closed (fixed) » Active

what is the function of this link??
can we delete it?

TimG1’s picture

+1 to removing this or being able to turn it off. I'm not sure how to use it or what it's for.

In my case I'm using jquery cycle to cycle through a couple of blocks assigned to a region via context. Works great when not logged in. But once logged in, the extra A element throws the JS off. How do I remove this A tag? Is there a hook somewhere that I can use?

Thanks for reading,
-Tim

sperks’s picture

I am having the same issue as Tim. By looking at the css you can see that this is intended as a display for empty regions, but I can't for the life of me find where this might be useful in the current version of context. Perhaps it's left over from a previous version?

lobo235’s picture

I agree that just hiding this with CSS is not a decent solution. I think the ultimate solution to this problem should be that the link doesn't show up in the markup at all unless the user has a permission that allows them to create/edit contexts.

angelusnoctis’s picture

I get the same issue, I do really need a solution as my site is going to be used by many registered users.

The strange thing is that I only get the <a> tag in the header, but not in other regions. I'm placing my "Primary links" menu, inside the Garland Theme <div id="header-region">.

I discovered that if I remove the id="header-region" , the tag disappears, but I have no idea why, and where can I fix this to maintain the original code of the theme.

angelusnoctis’s picture

I get a little step fordward: look for this code in your css:

#header-region * {
   display: inline;
   line-height: 1.5em;
   margin-top: 0;
   margin-bottom: 0;
}

And replace with this:

#header-region * {
   /*display: inline;*/
   line-height: 1.5em;
   margin-top: 0;
   margin-bottom: 0;
}

I still have no idea why does this happens, but commenting that line makes it disappear.

Any cleverer ideas?

puff3pass2’s picture

I hate crappy Drupal modules but I dont mind helping you poor guys and gals. Try this>>

Edit this crappy module using this >>>>> vi modules/contrib/context/theme/context-block-editable-region.tpl.php

Remove this line from this crappy piece of code>>>>

class='context-block-region' id='context-block-region-< print $region >'>

(I removed the php tags and other tags so you can read. Just remove the whole line)

VIOLA!!!!! Problem fixed and this crappy module will pooo on you no more. Its unfathomable why that line was in there in the first place. Again, I hate stinky coders and module developers. Maybe one day they will fix their buggy code and make Drupal better. I call these types of fixes Stupid Drupal Tricks. Have fun! ;-)

nevets’s picture

Not the best approach to solving problems, better to work with the module developers for a proper fix.

flokosiol’s picture

Instead of hacking the code inside the module, copy the original .tpl-file from "sites/all/modules/context/theme/context-block-editable-region.tpl.php" into your theme folder, eg. to "sites/all/themes/your_theme/templates/context/context-block-editable-region.tpl.php".

Now remove the link in line 2:
<a class='context-block-region' id='context-block-region-<?php print $region ?>'><?php print $region_description ?></a>

Don't forget to clear the cache to see your template file in action.

ashooner’s picture

Hacking your template to correct a module bug isn't really ideal either. We just need to know from the devs why this code is being rendered, so we know how to submit a patch to correct it. I don't want to remove it if there is a reason (although it looks like its just markup pollution to me).

dminkovsky’s picture

I'd like to report that this exact problem is occurring here too, but with D 7.9 and Context-3.0-beta2. Should I copy this ticket?

dminkovsky’s picture

I've identified the issue for me, and it's not with the Context module. Indeed, my issue was identical to #2 (Posted by jethro on November 17, 2010 at 1:32pm). I had CSS overriding the module's CSS.

davidcalhoun’s picture

I'm still having issues with this. Was this ever looked at by the developer? Is there a way to remove this anchor tag without editing the module's core?

paulocs’s picture

Issue summary: View changes

I could not reproduce using the 7.x-3.x-dev version. If you still have this problem using the last dev version, please reopen the issue.
Probably the problem here is that the context CSS is override.

Closing this issue as context 6.x is no longer supported.

paulocs’s picture

Status: Active » Fixed
paulocs’s picture

Status: Fixed » Closed (fixed)