Advertisement:

Author Topic: Search.template errors  (Read 3497 times)

Offline Trinny

  • Semi-Newbie
  • *
  • Posts: 69
  • Gender: Female
  • robbing people with a six gun
Search.template errors
« on: November 17, 2008, 05:29:14 AM »
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?

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,327
  • Master of BBC Abuse
Re: Search.template errors
« Reply #1 on: November 17, 2008, 05:30:49 AM »
Kid. He's useless. ;)

Offline Trinny

  • Semi-Newbie
  • *
  • Posts: 69
  • Gender: Female
  • robbing people with a six gun
Re: Search.template errors
« Reply #2 on: November 17, 2008, 05:32:22 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.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,327
  • Master of BBC Abuse
Re: Search.template errors
« Reply #3 on: November 17, 2008, 05:36:50 AM »
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:

Code: [Select]
// 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';
« Last Edit: November 17, 2008, 05:41:43 AM by antechinus »

Offline Trinny

  • Semi-Newbie
  • *
  • Posts: 69
  • Gender: Female
  • robbing people with a six gun
Re: Search.template errors
« Reply #4 on: November 17, 2008, 05:48:15 AM »
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

Code: [Select]
// 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.
« Last Edit: November 17, 2008, 05:55:45 AM by Trinny »

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,327
  • Master of BBC Abuse
Re: Search.template errors
« Reply #5 on: November 17, 2008, 05:57:27 AM »
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.
« Last Edit: November 17, 2008, 05:59:38 AM by antechinus »

Offline Trinny

  • Semi-Newbie
  • *
  • Posts: 69
  • Gender: Female
  • robbing people with a six gun
Re: Search.template errors
« Reply #6 on: November 17, 2008, 06:02:58 AM »
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:
Quote
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.
Makes sense. I'll have a look at it when I get in from work. Cheers ante.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,327
  • Master of BBC Abuse
Re: Search.template errors
« Reply #7 on: November 17, 2008, 06:13:42 AM »
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.

« Last Edit: November 17, 2008, 06:15:17 AM by antechinus »

Offline thekid65

  • Semi-Newbie
  • *
  • Posts: 44
Re: Search.template errors
« Reply #8 on: November 17, 2008, 04:05:15 PM »
Kid. He's useless. ;)

And you didnt think I'd see this?  :D Sigh, but you do have a point....
« Last Edit: November 17, 2008, 04:07:45 PM by thekid65 »

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,327
  • Master of BBC Abuse
Re: Search.template errors
« Reply #9 on: November 17, 2008, 04:17:17 PM »
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.

Offline Trinny

  • Semi-Newbie
  • *
  • Posts: 69
  • Gender: Female
  • robbing people with a six gun
Re: Search.template errors
« Reply #10 on: November 17, 2008, 05:38:27 PM »
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)

Offline thekid65

  • Semi-Newbie
  • *
  • Posts: 44
Re: Search.template errors
« Reply #11 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?  ;)

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,327
  • Master of BBC Abuse
Re: Search.template errors
« Reply #12 on: November 17, 2008, 05:51:41 PM »
Got it. Will have a look later. Dunno how much help I'll be though.

Offline Trinny

  • Semi-Newbie
  • *
  • Posts: 69
  • Gender: Female
  • robbing people with a six gun
Re: Search.template errors
« Reply #13 on: November 17, 2008, 06:11:21 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

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.

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,866
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Search.template errors
« Reply #14 on: December 14, 2008, 12:59:32 AM »
Do you still need help with this Trinny?
Michael Eshom
Cincy Space - now open!