News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

huge number of database calls to duplicate entries in log_errors

Started by luiscamino, September 06, 2010, 05:03:25 PM

Previous topic - Next topic

luiscamino

i've pinpointed the source of the errors and indeed it's those "title" and "href" variables of the top menu:

echo '
<span id="button_', $act, '"', !empty($classes) ? ' class="' . $classes . '"' : '', '>
<a href="', $button['href'], '">
', $button['title'], '
</a>
</span>';
}


if i change them to any other word (say "test" and "test2") the error log shows "undefined index test" and "undefined index test2" and of course the top menu dissapears.

but nothing's wrong with that particlar code! the top menu works perfectly as it is. i have no idea why would it display an error for something that works and whose code looks ok. :/
luis gonzález-camino calleja
www.luiscamino.com
www.avantglance.com
www.clubsonyericsson.com

CapadY

"HRef" and "Title" are name of predifined record fields. If you change these names the record fields can't be found any longer because there are no record fields defined with the name you are using.
So, you'll get an "Undefined"-error.
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

luiscamino

exactly, but the weird thing is that i get the undefined error EVEN if i leave it as "href" and "title".
luis gonzález-camino calleja
www.luiscamino.com
www.avantglance.com
www.clubsonyericsson.com

CapadY

It have not to be the name of the field, the problem can also be with the content of te fields.

This noon I've copied your files in a test environment and I had the same error messages with those files so I am prety sure the problem is in one of them.

Disabling parts of the files didn't me help me till now to find why this happens.
Strange thing is, your first few menu options aren't shown in my testforum, this can be caused by the used theme. But, there is also a menu option without any text or any reasonable link. This menu option is located at the right of the logout option.

As soon as I have some time left I'll try to look furher for it.
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

Advertisement: