I'm having a lot of errors in my log, all the same but different links. In the folowing is more than 15 in one day was 77000.
8: Undefined index: active_button
Ficheiro: /home/xxxxx/public_html/forum/Themes/default/Display.template.php (body_above sub template - eval?)
Linha: 583
8: Undefined index: active_button
Ficheiro: /home/xxxxxx/public_html/forum/Themes/default/Login.template.php (body_above sub template - eval?)
Linha: 583
8: Undefined index: active_button
Ficheiro: /home/xxxxx/public_html/forum/Themes/default/index.template.php (body_above sub template - eval?)
Linha: 583
I think I found the problem, I put a custom button, and now I took after I took the errors stopped. Here's the code:
'categoria' => array(
'title' => 'Categorias',
'href' => $scripturl . '',
'show' => true,
'sub_buttons' => array(
'ajuda-tecnica' => array(
'title' => 'Reparação Geral',
'href' => $scripturl . '?board=21.0',
'show' => true,
'sub_buttons' => array(
'Nova-Mensagem' => array(
'title' => 'Escrever nova mensagem',
'href' => $scripturl . '?action=form;id=1',
'show' => true,
),
),
),
'lcd-plasma-ledtv' => array(
'title' => 'LCD, Plasma e LEDTV',
'href' => $scripturl . '?board=47.0',
'show' => true,
'sub_buttons' => array(
'Nova-Mensagem' => array(
'title' => 'Escrever nova mensagem',
'href' => $scripturl . '?action=form;id=5',
'show' => true,
),
),
),
'off-topico' => array(
'title' => 'Encontro da Galera',
'href' => $scripturl . '?board=11.0',
'show' => true,
'sub_buttons' => array(
'Nova-Mensagem' => array(
'title' => 'Escrever nova mensagem',
'href' => $scripturl . '?action=post;board=11.0',
'show' => true,
),
),
),
'resolvidos' => array(
'title' => 'Defeitos Resolvidos',
'href' => $scripturl . '?board=2.0',
'show' => true,
'sub_buttons' => array(
'Nova-Mensagem' => array(
'title' => 'Colocar Resolvido',
'href' => $scripturl . '?action=post;board=2.0',
'show' => true,
),
),
),
'esquemas' => array(
'title' => 'Pedidos de Esquemas',
'href' => $scripturl . '?board=12.0',
'show' => true,
'sub_buttons' => array(
'Nova-Mensagem' => array(
'title' => 'Disco Tectonny',
'href' => $scripturl . '?action=page;sa=esquema',
'show' => true,
),
),
),
'suporte' => array(
'title' => 'Suporte do Fórum',
'href' => $scripturl . '?board=7.0',
'show' => true,
'sub_buttons' => array(
'Nova-Mensagem' => array(
'title' => 'Solicitar suporte',
'href' => $scripturl . '?action=post;board=7.0',
'show' => true,
),
),
),
'informatica' => array(
'title' => 'Informática',
'href' => $scripturl . '?board=17.0',
'show' => true,
'sub_buttons' => array(
'Nova-Mensagem' => array(
'title' => 'Escrever nova mensagem',
'href' => $scripturl . '?action=post;board=17.0',
'show' => true,
),
),
),
'video-game' => array(
'title' => 'Videos Games',
'href' => $scripturl . '?board=3.0',
'show' => true,
'sub_buttons' => array(
'Nova-Mensagem' => array(
'title' => 'Escrever nova mensagem',
'href' => $scripturl . '?action=post;board=3.0',
'show' => true,
),
),
),
'Moderadores' => array(
'title' => 'Moderadores',
'href' => $scripturl . '?board=26.0',
'show' => true,
'sub_buttons' => array(
'Nova-Mensagem' => array(
'title' => 'Escrever nova mensagem',
'href' => $scripturl . '?action=post;board=26.0',
'show' => true,
),
),
),
'senha' => array(
'title' => 'Recuperar Senha',
'href' => $scripturl . '?action=reminder',
'show' => true,
'sub_buttons' => array(
'Nova-Mensagem' => array(
'title' => 'Registre-se',
'href' => $scripturl . '?action=register',
'show' => true,
),
),
),
'grupo' => array(
'title' => 'Escolher Grupo',
'href' => $scripturl . '?action=profile;area=groupmembership;u=',
'show' => true,
'sub_buttons' => array(
'Nova-Mensagem' => array(
'title' => 'EstatÃsticas Gerais',
'href' => $scripturl . '?action=stats',
'show' => true,
),
),
),
),
),
http://tectonny.com/forum
Please do not bump your topic less than 24 hrs old, instead edit.
If you have phpmyadmin:
Run This query In phpMyAdmin (What is phpMyAdmin? (http://www.simplemachines.org/community/index.php?topic=21919.0))
REPLACE INTO smf_settings VALUES ('disableTemplateEval', 1);
Then tell us what errors you are getting. Eval is hiding the file where it is coming from.
Ok excuse the repetition.
The error, ran the command in mysql and errors remain the same. See ai
http://www.tectonny.com/forum/index.php?pretty;board=sony;topic=medir-a-bobina-do-slim-por-cima!.0
8: Undefined index: active_button
Ficheiro: /home/xxxxxx/public_html/forum/Themes/default/index.template.php
Linha: 583
This ai is one of the many that appears when you put the code on my buttons Subs.php
And if you can tell the command to enable new in mysql
Is that everything in your error log now? There were other errors leading to the Display.template and login.template.php. What mods do you have installed?
1. SMF Archive 2.0 [ Desinstalar ]
2. Online Only Groups in the Group Key 1.0 [ Desinstalar ]
3. Aeva Media 1.1a [ Desinstalar ]
4. Team Page 3.5.4 [ Desinstalar ]
5. BoardHover Mod 1.6.0 [ Desinstalar ]
6. Display Name On Registration 2.0 [ Desinstalar ]
7. OS & Browser Detection 1.4 [ Desinstalar ]
8. Custom Form Mod 1.6 [ Desinstalar ]
9. Advanced Contact Form 1.1 [ Desinstalar ]
10. eNinja - Custom Pages 1.0.12 [ Desinstalar ]
11. Topic Solved 1.1 [ Desinstalar ]
12. Highslide Image Viewer 1.6 [ Desinstalar ]
13. PM to New Members 1.2 [ Desinstalar ]
14. Look But No Read 1.3 [ Desinstalar ]
15. EmailValidator 1.0 [ Desinstalar ]
16. Member Color Link 3.0.8 [ Desinstalar ]
17. Users Online Today 1.5.6 [ Desinstalar ]
18. Pretty URLs 1.0 [ Desinstalar ]
19. Global Headers Footers 2.0 [ Desinstalar ]
20. Ad Managment 2.3.6.1 [ Desinstalar ]
Recalling that the errors only happen when I put my buttons in Subs.php
Are you sure you were putting in the buttons correctly?
Take a look here as it might help:
http://www.simplemachines.org/community/index.php?topic=360100.0
My buttons are right on Subs.php do not know if the correct, but I did to work.
What version of SMF are you using? And what theme are you using? If you don't mind, can you please attach your Subs.php to.
Thanks
Hello, the version is RC3 and the theme is the Curve. Follows Subs.php
Your Subs look fine, so back to the file that is giving you the error, can you please attach now your index.template.php.
Ok...
Try this one.
This might be a problem with the PrettyURLs mod to. If this index.template.php doesn't work, I would probably suggest downloading the latest version of that mod, uninstalling and deleting the old one and uploading the newest. If that doesn't work, contact the mod author.
But I already use the latest version.
Same thing, what is strange is if I take my buttons Subs.php files, the errors stop, Is that why my buttons have sub-button?
Uh, I'm looking at your Subs.php some more and its a little off as far as the coding aspect of your buttons.
For example in your Category menu, it should have a similar look to this:
'menu1' => array(
'title' => 'Menu 1',
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
'sub_menu1' => array(
'title' => 'Sub Menu 1',
'href' => $scripturl,
'show' => true,
),
'sub_menu2' => array(
'title' => 'Sub Menu 2',
'href' => $scripturl,
'show' => true,
),
'sub_menu3' => array(
'title' => 'Sub Menu 3',
'href' => $scripturl,
'show' => true,
),
),
),
Give me a little bit so I can make some changes to it for you.
edit, added file
Ok so I'm waiting
Check my edit :p
Error
Parse error: syntax error, unexpected ';', expecting ')' in /home/xxxxxxx/public_html/forum/Sources/Subs.php on line 4383
Re-upload your old Subs.php to the server for now. :(
Sorry
Ok
Hello, do not even have to solve? I have to remove the buttons?
lol, haven't been on here for a while but I was looking for a answer to your exact same problem. The code in the subs can be perfect as can be but SMF set a bad example on the template for the default theme and I am sure every other them is almost based off from it.
Here is your problem.
When you have a menu active_button is used, ok when you have a child of that menu active_button is not used, but for some strange reason when you have a grandchild at the very end of the menu active_button is used.
Easy fix I did.
This code in your index.template.php
foreach ($childbutton['sub_buttons'] as $grandchildbutton)
echo '
<li>
<a', $grandchildbutton['active_button'] ? ' class="active"' : '', ' href="', $grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '>
<span', isset($grandchildbutton['is_last']) ? ' class="last"' : '', '>', $grandchildbutton['title'], '</span>
</a>
</li>';
Change it to
foreach ($childbutton['sub_buttons'] as $grandchildbutton)
echo '
<li>
<a href="', $grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '>
<span', isset($grandchildbutton['is_last']) ? ' class="last"' : '', '>', $grandchildbutton['title'], '</span>
</a>
</li>';
Go figure it isn't like anyone is going to notice a active grandchild menu button right off the back. It is a minor SMF theme bug I think. ;)
nend, I was searching for a solution to this error message, as well. Your solution fixed my problem; my error log is once again clean. Thanks! ;D
Glad I could help. :D
I have also reported this as a bug in the bugs section of the forum. Still waiting on a response though on that thread. Apparently it looks like a bug, unless someone can prove me otherwise. I severely doubt they wanted a active grandchild button, but think this is the result of the copy and paste method of coding. Nothing wrong with that, I do it from time to time myself.
But as more people expand their menu systems from the child level to the grandchild level the more support request that are going to flood into here. This bug however is at the theme level and not in the sources and have no effect on forum performance besides a annoying error in the error logs.
Comes to another point though, allot of themes are based on the SMF default theme, so allot of theme developers will have to change their themes also. Just a small code patch, no big deal. ;D
All in all this problem is very minor. Annoyance though, but minor.