ElkArte Community

Project Support => Support => Topic started by: Jorin on December 12, 2016, 01:04:29 am

Title: undefined index: href
Post by: Jorin on December 12, 2016, 01:04:29 am
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 (http://addons.elkarte.net/enhancement/Descriptive-Links.html)? But I have all the language code of this addon in my german addons language file?!?

Any hints?
Title: Re: undefined index: href
Post by: Spuds on December 12, 2016, 08:59:09 am
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.
Title: Re: undefined index: href
Post by: Jorin on December 13, 2016, 01:24:59 am
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?

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
Title: Re: undefined index: href
Post by: radu81 on December 13, 2016, 02:34:00 am
I also use the Google Map addon and I just checked my logs, I don't have errors related to this addon
Title: Re: undefined index: href
Post by: emanuele on December 13, 2016, 03:57:20 am
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.
Title: Re: undefined index: href
Post by: Jorin on December 13, 2016, 04:45:45 am
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,
),
),
),
);
Title: Re: undefined index: href
Post by: emanuele on December 13, 2016, 07:40:38 am
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(
Title: Re: undefined index: href
Post by: Jorin on December 14, 2016, 02:35:11 am
Thank you. I fixed that and cleared the error log. Let's see what errors will accour from now on.
Title: Re: undefined index: href
Post by: Jorin on December 14, 2016, 06:34:26 am
Here's the log again. The user in the errorlog-general screenshot seems to be a spambot. I banned him now.
Title: Re: undefined index: href
Post by: emanuele on December 14, 2016, 10:17:10 am
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 
Title: Re: undefined index: href
Post by: Jorin on December 20, 2016, 03:52:01 am
Second one is not part of my file.
Title: Re: undefined index: href
Post by: emanuele on December 20, 2016, 05:48:11 am
ehm... in the error log there Mgal.controller.php, not the mysql class. ;)
Title: Re: undefined index: href
Post by: Jorin on December 20, 2016, 06:18:00 am
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.
Title: Re: undefined index: href
Post by: Jorin on January 02, 2017, 06:33:05 am
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
Title: Re: undefined index: href
Post by: emanuele on January 02, 2017, 07:54:47 am
IIRC that was some problem with an addon?
Title: Re: undefined index: href
Post by: Jorin on January 02, 2017, 08:13:40 am
I don't know of any addon that edits my Members.subs.php.  :o

AEVA BBCode replacement 0.0.1
AmazonAffiliate4ElkArte 1.0
Descriptive Links 1.0
ElkArte 1.0.3 patch 1.0
ElkArte 1.0.4 patch 1.0.1
ElkArte 1.0.5 patch 1.0.1
ElkArte 1.0.6 patch 1.0.0
ElkArte 1.0.7 patch 1.0.0
ElkArte 1.0.8 patch 1.0.0
ElkArte 1.0.9 patch 1.0.0
Google Member Map 1.0
Inline Attachments 1.0
Message to New Members 0.0.2
Recent Topics 0.0.3
Topic Author 1.0
Title: Re: undefined index: href
Post by: emanuele on January 02, 2017, 09:07:13 am
http://www.elkarte.net/community/index.php?topic=3132.30 (That still has no solution because I still have no idea where the issue is.)
Title: Re: undefined index: href
Post by: Jorin on January 02, 2017, 09:09:17 am
lol