Closed (fixed)
Project:
Basic
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
7 Dec 2010 at 02:59 UTC
Updated:
2 Mar 2011 at 17:41 UTC
Jump to comment: Most recent file
Somehow this theme is leaving some erroneous text in the content-header. This is a fresh install, no new modules. Drupal 7 rc1
See source snip. Pasted exactly as is with all the whitepace then "Array"
<div id="content-header">
<h1 class="title">Welcome to Test Site</h1>
Array
</div> <!-- /#content-header -->
Have had a dg through and can't for the life of me figure it out. Does the same using the dev version. Erroneous text disappears if change to another theme.
Cheers,
Sam
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | basic-7.x-2.x-dev-basic_menu_local_tasks.patch | 1.5 KB | balazs.hegedus |
Comments
Comment #1
Argus commentedyup confirming this
Comment #2
balazs.hegedus commentedHi,
here's a patch to fix this issue for the dev version. Marking as needs review as I'm not entirely familiar with the theming layer in D7 and what are the implications of the changes I've made.
Also changing the issue title to reflect what the problem is.
This patch changes basic_menu_local_tasks() in template.php. According to the original source the function supposed to be a duplicate of theme_menu_local_tasks(), yet it returned an array instead of a string. The function is now a duplicate of theme_menu_local_tasks(), producing the intended output.
Comment #3
psicomante commentedIt works perfectly. Remember
render($tabs)inpage.tpl.php(i changed it to $tabs, but it prints Array - don't know why)Comment #4
fietserwin#2 works here as well. Ignored #3: $tabs is still an array that needs to be rendered (by basic_menu_local_tasks()).
Comment #5
fietserwinThat said, the current and patched version of basic_menu_local_tasks() as an override of theme_menu_local_tasks() introduce an error against accessibility guidelines, see a.o. http://drupal.org/update/theme/6/7#theme-links-param and #364219: Navigation menus should be preceded by headings of the appropriate level (usually <h2>)..
Better to patch that as well, or in other words, copy the theme_menu_local_tasks() function again and add the classes (with-secondary and clearfix) as needed.
Comment #6
Sinan Erdem commentedsubscribe
Comment #7
gapa commentedFor #3 I made a patch in http://drupal.org/node/1029730. Is it ok?
Comment #8
SteveK commentedI've committed a fix to the dev release. thanks!