forum-topic-navigation error
| Project: | Deco |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
I have just created a Drupal 6 site with the Deco template and I get the following error when reading a forum messages. It does not happen on nay other pages. Any ideas?
warning: include_once(themes/deco/forum-topic-navigation) [function.include-once]: failed to open stream: No such file or directory in U:\xampp\htdocs\includes\theme.inc on line 587.
warning: include_once() [function.include]: Failed opening 'themes/deco/forum-topic-navigation' for inclusion (include_path='.;\xampp\php\pear\') in U:\xampp\htdocs\includes\theme.inc on line 587.
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'deco_forum_topic_navigation' was given in U:\xampp\htdocs\includes\theme.inc on line 591.

#1
The same thing for me. The problem would be solved with the dev version but this seems not be the case.
#2
please if anyone who solved this issue, post here the bug fix.
many thanks.
it is critical.
greetings
#3
all problems solved. open the deco/template.php and edit the lines in this way:
/*** Implementation of hook_theme()
*/
function deco_theme() {
return array(
'deco_forum_topic_navigation' => array(
'file' => 'forum-topic-navigation.tpl.php',
'arguments' => array('node' => NULL),
)
);
}
then save, replace, disable theme and then re-enable theme to fix all.
edit: this way gives me problem because the urls are changed in "node?destination=" that is a common issue in forum... i wait for a next fix :-(
#4
thanks. that seems to have solved the error message. but did it solve the problem? what is the problem?
#5
eh wouldn't it be more like this:
<?php/**
* Implementation of hook_theme()
*/
function deco_theme() {
return array(
'forum_topic_navigation' => array(
'file' => 'forum-topic-navigation.tpl.php',
'arguments' => array('node' => NULL),
)
);
}
?>
That fixes it for me.
#6
If you look at the documentation for hook_theme(), you'll find that the "file" key is supposed to define "The file the implementation resides in. This file will be included prior to the theme being rendered, to make sure that the function or preprocess function (as needed) is actually loaded; this makes it possible to split theme functions out into separate files quite easily."
So the "file" part is supposed to specify a file containing PHP functions. The forum-topic-navigation.tpl.php file does NOT contain PHP theme functions; it contains templating data. I'm not sure what effect you'll get from trying to treat a template file as a theme functions file, but I guarantee it's not going to yield the designer's intended code.
The correct fix is to change the key from "file" to "template", thus:
<?phpfunction deco_theme() {
return array(
'forum_topic_navigation' => array(
'template' => 'forum-topic-navigation',
'arguments' => array('node' => NULL),
)
);
}
?>
Note that when specifying a template file's name, you don't add the .tpl.php extension; that's supplied automatically.
#7
Hi,
I am still getting this error when I go to the themes page. (administer->themes).
# warning: include_once(sites/all/themes/deco/forum-topic-navigation) [function.include-once]: failed to open stream: No such file or directory in /home/blackbox/public_html/drupal/includes/theme.inc on line 283.
# warning: include_once() [function.include]: Failed opening 'sites/all/themes/deco/forum-topic-navigation' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/blackbox/public_html/drupal/includes/theme.inc on line 283.
#8
You probably need to flush the cache. Disable the theme (switch to some other theme, and uncheck "enabled") then re-enable it. You can also flush the cache manually at /admin/settings/performance
#9
wdmartin's patch works for me. Any objections to "reviewed and tested" status?
#10
Worked, thank.
#11
delete
never mind, it was something else that was causing blank page, all is fine :)
#12
Here is an actual patch.
#13
Oh, heh, OK. So this whole function isn't needed at all. That tpl is a core template file and is already registered. This was fixed in HEAD but not the D6 branch. I've now synced 6 and HEAD so this is fixed in dev. A new release will be forthcoming soon.
#14
Automatically closed -- issue fixed for two weeks with no activity.