News:

Wondering if this will always be free?  See why free is better.

Main Menu

Search.template errors

Started by Trinny, November 17, 2008, 05:29:14 AM

Previous topic - Next topic

Trinny

Every time that someone uses the search feature, my error log fills up with this:


8: Undefined index: title

/home/cagedra/public_html/Themes/default/Search.template.php (body_above sub template - eval?)
Line: 302

And the same error on line 300 as well.


I have no mods installed which affect this template, and in fact have overwritten the entire template with a fresh version from the 2.0b4 install package.

I'm perplexed. Does anyone have any idea what's causing this?

Antechinus


Trinny

Quote from: antechinus on November 17, 2008, 05:30:49 AM
Kid. He's useless. ;)
bwahahaha sha. I tried blaming him, but it didn't help fix the errors.

Seriously, I've searched and haven't found anything pointing to this.

I'd really appreciate any help that anyone has to offer.

Antechinus

#3
Here's a thought: in your menu section in index.template would one of your mod edits have knocked out search from the array? You know, the long one that defines all the whatsits. I had a bloke with a similar issue the other day with Omega.

ETA: Meh, aint in index.template for 2b4. Well Subs.php then. Could just be missing search out of an array.

Like here or something:

// Figure out which action we are doing so we can set the active tab.
// Default to home.
$current_action = 'home';

if (isset($context['menu_buttons'][$context['current_action']]))
$current_action = $context['current_action'];
elseif ($context['current_action'] == 'search2')
$current_action = 'search';
elseif ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

Trinny

#4
Now that you've sent me searching (pardon the pun) Go to my site and use the drop menu to search for anything. As soon as the results are in, look at the nav bar, and note the "tab" that's highlighted. It's definitely related to the restructured drop menus, because it's highlighting a "phantom tab" that isn't on the nav bar at all.

Yay.

ETA: cos yeah

// Figure out which action we are doing so we can set the active tab.
    // Default to home.
    $current_action = 'home';

    if (isset($context['menu_buttons'][$context['current_action']]))
        $current_action = $context['current_action'];
    elseif ($context['current_action'] == 'search2')
        $current_action = 'search';
    elseif ($context['current_action'] == 'theme')
        $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';


it's there.

Antechinus

#5
Yep, phantom tab is http://caged-rage.com/index.php?action=search2

That's narrowing it down. What's in your Subs.php then?

ETA: Looks like it's trying to make a Search button but can't. Maybe the text string for search is the title it says is undefined.

Trinny

good question. And you've managed to throw some new errors on lines 354 and 356

Gets better and better dunnit?

Ok, I've got to go to work, but I'll attach the file so you can have a look.

ETA:
QuoteETA: Looks like it's trying to make a Search button but can't. Maybe the text string for search is the title it says is undefined.
Makes sense. I'll have a look at it when I get in from work. Cheers ante.

Antechinus

#7
Mate, you've still got the default tabs coded in Subs.php. It's the wrong file ya nutter. :P
That's a bog standard 2b4 file and you've chopped the hell out of the one at your site.


thekid65

#8
Quote from: antechinus on November 17, 2008, 05:30:49 AM
Kid. He's useless. ;)

And you didnt think I'd see this?  :D Sigh, but you do have a point....

Antechinus

I figured Trin would make sure you saw it just to wind you up.  ;)

Anyway she posted a standard file rather than the ones you guys are running.

Trinny

opps, sorry, I posted the wrong file. I was in a hurry this morning. I didn't even get a chance to make sure kid saw your post.

(Kid could have posted the correct file while I was at work, but you know he's useless)

thekid65

I didnt even look at the file she posted.. after all, she knows what shes doing, eh?  ;)

Antechinus

Got it. Will have a look later. Dunno how much help I'll be though.

Trinny

Quote from: thekid65 on November 17, 2008, 05:51:15 PM
I didnt even look at the file she posted.. after all, she knows what shes doing, eh?  ;)
Did you look at the post above the one that you made? You know, the one that says I posted the wrong file? :D

Quote from: antechinus on November 17, 2008, 05:51:41 PM
Got it. Will have a look later. Dunno how much help I'll be though.
Sweet, I appreciate it.

I'm off to stare at various templates until something clicks.

Oldiesmann

Do you still need help with this Trinny?
Michael Eshom
Christian Metal Fans

Advertisement: