Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: ~DS~ on July 26, 2010, 05:43:18 PM

Title: RE: Errors: Undefined index: title | Undefined index: href
Post by: ~DS~ on July 26, 2010, 05:43:18 PM
I am having the same issue with this:
http://www.simplemachines.org/community/index.php?topic=386868.0

I don't think it was from the tutorial that the OP provided because I tested it in my other site which is fine.

This errors only happen if I input in the search.
8: Undefined index: title
File: /Themes/default/index.template.php

Line: 583 and Line: 584

SMF 2.0 RC3
Any help appreciated. :)
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: kat on July 26, 2010, 05:53:56 PM
What mods do you have?

My index.template's a LOT smaller than yours!

Is it from the default theme, or a custom one?
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: ~DS~ on July 27, 2010, 02:51:50 AM
Quote from: K@ on July 26, 2010, 05:53:56 PM
What mods do you have?

My index.template's a LOT smaller than yours!

Is it from the default theme, or a custom one?
Yes it's a default theme.
1. is_active menu fix 1.0 50 minutes ago. [ Uninstall ]
2. Drafts 1.0 3 hours ago. [ Uninstall ]
3. Error Log Counter 1.0 Thursday, July 15, 2010, 10:45:11 AM. [ Uninstall ]
4. SA Affiliates 3.3.5.1 16 hours ago. [ Uninstall ]
5. SA FBConnect 1.0 Beta5 18 hours ago. [ Uninstall ]
6. Started By Column 1.0 Saturday, July 24, 2010, 08:56:49 PM. [ Uninstall ]
7. Aeva Media 1.3a Saturday, July 24, 2010, 04:51:48 PM. [ Uninstall ]
8. Team Page 3.5.6 Friday, July 23, 2010, 09:29:12 PM. [ Uninstall ]
9. SMF Advanced Topic Prefix Mod 2.1.2 Thursday, July 22, 2010, 11:22:45 PM. [ Uninstall ]
10. FF Colection Avatars 1.0 Wednesday, July 21, 2010, 12:24:52 AM. [ Uninstall ]
11. Topic Note 0.7 Sunday, July 18, 2010, 05:10:24 AM. [ Uninstall ]
12. Order Custom Profile Fields 1.1 Saturday, July 17, 2010, 03:25:26 PM. [ Uninstall ]
13. Tapatalk SMF 2.0 RC3 Plugin 1.0.1 Saturday, July 17, 2010, 12:25:43 AM. [ Uninstall ]
14. SimpleDesk - Integrated Helpdesk for Simple Machines Forum Friday, July 16, 2010, 09:18:21 AM. [ Uninstall ]
15. Spoiler Tag 0.7.2 Friday, July 16, 2010, 08:57:04 AM. [ Uninstall ]
16. Sortable Packages (and Installed Time)
17. PM Attachments 1.5 Thursday, July 15, 2010, 01:06:39 PM. [ Uninstall ]
18. Hide Membergroup Titles 1.0 Thursday, July 15, 2010, 12:56:28 PM. [ Uninstall ]
19. SMF4iPhone-Mod 1.0 Thursday, July 15, 2010, 12:54:54 PM. [ Uninstall ]
20. SMF Social Network PRO 1.1.4 Thursday, July 15, 2010, 12:27:16 PM. [ Uninstall ]
21. Foxy! for Aeva Media 1.27 Thursday, July 15, 2010, 11:49:05 AM. [ Uninstall ]
22. SimplePortal 2.3.2 Thursday, July 15, 2010, 11:17:20 AM. [ Uninstall ]
23. Google Analytics Code 1.1 Thursday, July 15, 2010, 11:12:22 AM. [ Uninstall ]
24. Contact Page 2.0.1 Thursday, July 15, 2010, 11:12:03 AM. [ Uninstall ]
25. RSS Feed Icon 1.1 Thursday, July 15, 2010, 11:11:07 AM. [ Uninstall ]
26. Redirection Topics 1.0 Thursday, July 15, 2010, 11:09:29 AM. [ Uninstall ]
27. Online Only Groups in the Group Key 1.0 Thursday, July 15, 2010, 11:08:57 AM. [ Uninstall ]
28. Users Online Today 1.5.6 Thursday, July 15, 2010, 11:08:15 AM. [ Uninstall ]
29. Printbutton 1.0 Thursday, July 15, 2010, 11:07:59 AM. [ Uninstall ]
30. Treasury 2.06 Thursday, July 15, 2010, 11:06:44 AM. [ Uninstall ]
31. Anti-Spam Links 1.0.1 Thursday, July 15, 2010, 11:04:29 AM. [ Uninstall ]
32. Dynamic_Memberlist 2.0.4 Thursday, July 15, 2010, 11:04:00 AM. [ Uninstall ]
33. Topic Solved Mod 1.0 Thursday, July 15, 2010, 11:03:42 AM. [ Uninstall ]
34. Sitemap 2.1.2 Thursday, July 15, 2010, 11:03:01 AM. [ Uninstall ]
35. More Spiders 1.2 Thursday, July 15, 2010, 11:01:55 AM. [ Uninstall ]
36. Ban Filter 1.0 Thursday, July 15, 2010, 11:01:26 AM. [ Uninstall ]
37. Log Package Installs 1.0 Thursday, July 15, 2010, 11:01:16 AM. [ Uninstall ]
38. Relative Dates 1.1 Thursday, July 15, 2010, 11:00:25 AM. [ Uninstall ]
39. Add to Existing Ban Group 1.0.2 Thursday, July 15, 2010, 10:59:52 AM. [ Uninstall ]
40. New CAPTCHA 1.0 Thursday, July 15, 2010, 10:59:05 AM. [ Uninstall ]
41. Join date and Location in Posts 1.0 Thursday, July 15, 2010, 10:58:29 AM. [ Uninstall ]
42. Show Local Url Titles 1.1 Thursday, July 15, 2010, 10:57:53 AM. [ Uninstall ]
43. Hide ip stuff for users 1.0 Thursday, July 15, 2010, 10:54:26 AM. [ Uninstall ]


Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: kat on July 27, 2010, 09:11:21 AM
Hmmm...

All mods installed on the same day... No backups, then, I assume?

Looks like one of those mods added this line to the file:

// Show the menu up top. The header navigation

You don't know which one, by any chance?
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: ~DS~ on July 27, 2010, 01:17:17 PM
That's the one from the tutorial:
http://www.simplemachines.org/community/index.php?topic=360100.0
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: kat on July 27, 2010, 01:23:20 PM
Have you been through the edits, to make sure you've done them correctly?
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: cicka on July 27, 2010, 01:41:02 PM
Can you change this code

<a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>


to this

<a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', isset($button['href']), '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', isset($button['title']), '</span>
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: ~DS~ on July 27, 2010, 01:58:05 PM
Doing that messes the menu to 1,1,1,1,1,1,1,1,1,1 but I can still see the button at the end like it show in the image in my frist post.
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: xenovanis on July 27, 2010, 03:00:05 PM
Did you remove the searchbutton from the main menu? I have these same errormessages appearing on the action search2 and I think it's related to removing that button.
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: ~DS~ on July 27, 2010, 03:09:38 PM
Quote from: xenovanis on July 27, 2010, 03:00:05 PM
Did you remove the searchbutton from the main menu? I have these same errormessages appearing on the action search2 and I think it's related to removing that button.
Well yes I did, by changing true to false in the Subs.php and I don't think it could cause this error, could it?
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: xenovanis on July 27, 2010, 03:15:22 PM
I think so, because when I re-add the button to the menu the errormessages stop. It has something to do with the action search2, but I haven't really looked into it yet.
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: ~DS~ on July 27, 2010, 03:22:18 PM
Yep, I change false to default (none) the error stops. So putting false there brings an error which it shouldn't. I guess I will leave there for now. Any other way to hide the search button?
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: xenovanis on July 27, 2010, 03:34:28 PM
I have no doubt there is a way, but I haven't found it yet. I intent to dig in to this a little deeper somewhere over the next week. If I have found a fix, I'll post back here  ;)
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: xenovanis on July 29, 2010, 02:37:29 PM
I got rid of the errormessage by commenting out this part in Subs.php:

elseif ($context['current_action'] == 'search2')
$current_action = 'search';


However I'm not sure what consequences this might have. Everything seems to work fine though.
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: ~DS~ on July 30, 2010, 04:11:06 PM
Like this?

/*elseif ($context['current_action'] == 'search2')
$current_action = 'search';*/

Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: xenovanis on July 30, 2010, 04:23:43 PM
Yes, correct. Still working fine on my site  :)
Title: Re: RE: Errors: Undefined index: title | Undefined index: href
Post by: ~DS~ on July 30, 2010, 04:59:24 PM
That worked thanks. :)