Skip to main content
Topic: undefined index: href (Read 4109 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

undefined index: href

I get a lot of error messages like this:

Code: [Select]
8: Undefined index: href
?/topic,4586.msg100424/topicseen.html

Maybe it's the Descriptive Links addon? But I have all the language code of this addon in my german addons language file?!?

Any hints?

Re: undefined index: href

Reply #1

Is there any other information or is that the full error line?

Its probably not a missing language string, but an array index that is not being initialized, but where and why is the question.

Re: undefined index: href

Reply #2

Wow, I have 31.208 pages full of errors in the log - more then 400.000 errors!  :o

Maybe it's the Google Map Addon?

Code: [Select]
Art des Fehlers: Undefiniert
8: Undefined index: href

http://forum-alternative-antriebe.de/index.php?/topic,3974.msg100540/topicseen.html

Datei: /www/htdocs/xyz/hp_elkarte/themes/default/languages/german/GoogleMap.german.php (body_above sub template - eval?)
 Zeile: 526

Re: undefined index: href

Reply #3

I also use the Google Map addon and I just checked my logs, I don't have errors related to this addon
sorry for my bad english

Re: undefined index: href

Reply #4

First thing first, let's get rid of the template eval: admin > config > server > general
and enable "Disable evaluation of templates".
Then a new error will appear and that will be meaningful.
Bugs creator.
Features destroyer.
Template killer.

Re: undefined index: href

Reply #5

Code: [Select]
Undefiniert
8: Undefined index: href

http://forum-alternative-antriebe.de/index.php?action=unread

Datei: /www/htdocs/xyz/hp_elkarte/themes/default/index.template.php
 Zeile: 526

Line 526:

Code: [Select]
									<a class="linklevel2" href="', $childbutton['href'], '" ', isset($childbutton['target']) ? 'target="' . $childbutton['target'] . '"' : '', '>', $childbutton['title'], '</a>';

I modified Subs.php for my own menu, can this be a problem?

Code: [Select]
		// Start things up: this is what we know by default
require_once(SUBSDIR . '/Menu.subs.php');
$buttons = array(

'community' => array(
'title' => '<i class="fa fa-home"></i> Community',
'href' => 'http://forum-alternative-antriebe.de/',
'data-icon' => '',
'show' => true,
'sub_buttons' => array(

'impressum' => array(
'title' => 'Impressum',
'href' => 'http://forum-alternative-antriebe.de/index.php/topic,467.0.html',
'show' => true,
),
'seiten' => array(
'title' => 'Webseiten',
'show' => true,
'sub_buttons' => array(

'bszp' => array(
'title' => 'Die BRENNSTOFFZELLEN-Piloten',
'href' => 'http://brennstoffzellen-piloten.de/',
'show' => true,
),
'ep' => array(
'title' => 'Die ELEKTRO-Piloten',
'href' => 'http://elektro-piloten.de/',
'show' => true,
),
'hp' => array(
'title' => 'Die HYBRID-Piloten',
'href' => 'http://hybrid-piloten.de/',
'show' => true,
),
),
),
'galerie' => array(
'title' => 'Fotogalerie',
'href' => 'http://forum-alternative-antriebe.de/index.php',
'show' => $context['allow_pm'],
'sub_buttons' => array(

'Köln2010' => array(
'title' => 'Jahrestreffen Köln 2010',
'href' => 'https://goo.gl/photos/LrQtBgYSNCuXYTS5A',
'target' => '_blank',
'show' => $context['allow_pm'],
),
'Berlin2011' => array(
'title' => 'Jahrestreffen Berlin 2011',
'href' => 'https://goo.gl/photos/QNThqKEcsmKUDNqa8',
'target' => '_blank',
'show' => $context['allow_pm'],
),
'burgrheinfels2013' => array(
'title' => 'Burg Rheinfels 2013',
'href' => 'https://goo.gl/photos/dFY3X2ecNLvxDPPt9',
'target' => '_blank',
'show' => $context['allow_pm'],
),
'5th' => array(
'title' => '5. Geburtstag 2015',
'href' => 'https://goo.gl/photos/iuqtTVzBkWnUTmBo8',
'target' => '_blank',
'show' => $context['allow_pm'],
),
'IAA2015' => array(
'title' => 'IAA Frankfurt 2015',
'href' => 'https://flic.kr/s/aHsknLTAVs',
'target' => '_blank',
'show' => $context['allow_pm'],
),
'tcd2016' => array(
'title' => 'Toyota Community Day 2016',
'href' => 'https://goo.gl/photos/23cS2CX4YdHvn37a6',
'target' => '_blank',
'show' => $context['allow_pm'],
),
),
),
'stromtankstellen' => array(
'title' => 'Stromtankstellen',
'href' => 'http://elektro-piloten.de/map.html',
'show' => true,
),
),
),

'home' => array(
'title' => '<i class="fa fa-comment"></i> ' . $txt['community'],
'href' => $scripturl,
'data-icon' => '',
'show' => true,
'sub_buttons' => array(

'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
),
'calendar' => array(
'title' => $txt['calendar'],
'href' => $scripturl . '?action=calendar',
'show' => $context['allow_calendar'],
),
'memberlist' => array(
'title' => $txt['members_title'],
'href' => $scripturl . '?action=memberlist',
'show' => $context['allow_memberlist'],
),
'recent' => array(
'title' => $txt['recent_posts'],
'href' => $scripturl . '?action=recent',
'show' => true,
),
'help' => array(
'title' => 'Hilfe',
'href' => 'http://elkarte-erste-schritte.de/',
'target' => '_blank',
'show' => true,
),
),
),
);

Re: undefined index: href

Reply #6

Code: [Select]
				'seiten' => array(
'title' => 'Webseiten',
'show' => true,
'sub_buttons' => array(
This needs an href as well, at least:
Code: [Select]
				'seiten' => array(
'title' => 'Webseiten',
'href' => '#',
'show' => true,
'sub_buttons' => array(
Bugs creator.
Features destroyer.
Template killer.

Re: undefined index: href

Reply #7

Thank you. I fixed that and cleared the error log. Let's see what errors will accour from now on.

Re: undefined index: href

Reply #8

Here's the log again. The user in the errorlog-general screenshot seems to be a spambot. I banned him now.

Re: undefined index: href

Reply #9

The first one is due to how old the code is, in the file you should change:
Code: [Select]
if (!$context['browser']['is_gecko'])
to:
Code: [Select]
if (!isBrowser('gecko'))

The second one is due to a bug of mine, but let's just silence it:
Code: [Select]
list ($file) = glob($datadir 
to:
Code: [Select]
@list ($file) = glob($datadir 
Bugs creator.
Features destroyer.
Template killer.

Re: undefined index: href

Reply #10

Second one is not part of my file.

Re: undefined index: href

Reply #11

ehm... in the error log there Mgal.controller.php, not the mysql class. ;)
Bugs creator.
Features destroyer.
Template killer.

Re: undefined index: href

Reply #12

Ah, I thought because that was the file in the error log. Okay, found it now. Emptied the log, so we can see what's happening now.

Re: undefined index: href

Reply #13

165 errors in 14 days, 7 critical, but 146 from users (wrong refferings site, banned users, etc).

Here's a critical one:

QuoteWrong value type sent to the database. Array of integers expected. (member_ids)
Function: membersBy

http://forum-alternative-antriebe.de/index.php?action=activate;u=1382;code=xyz

Datei: /www/htdocs/xyz/hp_elkarte/sources/subs/Members.subs.php
 Zeile: 1522

Re: undefined index: href

Reply #14

IIRC that was some problem with an addon?
Bugs creator.
Features destroyer.
Template killer.