Info
- 3 posts
- 1 voice
- Started 5 years ago by Null
- Latest reply from Null
- This topic is not a support question
HELP, my new plugin makes the adminpages disappear :(
-
- Posted 5 years ago #
Hi,
I have mad a new plugin: bbMenu and it adds a menu to you bbPress. I've made a nice admin page where you can drag & drop the menu items/links as you please and update it.
It all works BUT..... it completely removes/stops loading all the other admin pages except the bbMenu one. All other adminpages simply stay blank.
Can someone look at this and help me fix it?
You can get the beta here: http://www.sourceskins.com/bbMenu-BETA.zipIt contains the admin page area only (so no template stuff). To get to the menu admin you will have to type in your adress bar: bb-admin/admin-base.php?plugin=menu_admin_page
Just follow the instructions in de install.txt file
Remember: DONT USE THIS IN A LIFE ENVIROMENT
Thx for the help
-
- Posted 5 years ago #
Found the bug.
When loading the admin it also includes the new file: menuhead.php. In that file there is a line:
<?php ajax_show_javascript(); ?>and that gives this error: <b>Fatal error</b>: Call to undefined function ajax_show_javascript() in <b>bb-admin/menuhead.php</b> on line <b>6</b>Why is that? Well the new admin page DOES use this ajax_show_javascript but all others don't. That also explains that only the menu admin page is working and all others aint.
But how the hell can I fix this? Will an if work? If page = admin-base.php?plugin=menu_admin_page include menuhead.php or something? Any other suggestions?
At the moment, menuhead.php is called using a include or is this fixed if I use the new admin_head hook in 0.8?
-
- Posted 5 years ago #
Ah fixed it. A same function was declared twice and php doesn't like that!
Greetz
-
You must log in to post.