News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Missing categories in admin area

Started by Jade Elizabeth, February 16, 2014, 03:16:52 AM

Previous topic - Next topic

Jade Elizabeth

So for some reason some of my mods aren't showing in the menus to the left of the page, or when I switch it to drop downs.

Where are these made? I want to see if maybe there's some sort of mucked up code from a mod that might have broken it.

There are no errors in the log.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

kat

Which mods, Lizzy? Worth reading their support topics, or posting, there?

Jade Elizabeth

Not worth it because none of them are showing. I need to work out where the code is and check it out.

I noticed it well after it happened...so yeah. I have no way of knowing when it happened or if a mod even did it. Do you know where the code is that makes up the menu items?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

kat

"Home, "Help" and all that ******? Subs.php.

Look for the section labelled "// All the buttons we can possible want and then some".

Jade Elizabeth

No, where the admin menu is made. The menu with these options:

Configuration
Core Features
Features and Options
Security and Moderation
Languages
Server Settings
Related Topics
Tags Configuration
Post Scheduler
Current Theme
Themes and Layout
Pretty URLs
Modification Settings
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Illori

admin.php

but a lot of mods use hooks to add their menu options so you most likely will not find them in that location and your best bet to get them back if they are hooks is to uninstall/reinstall the mods.

Jade Elizabeth

Hmm. Okay one mod is the Links Directory mod. It says this in the code:

'settings' => array(
'label' => $txt['links_admin_settings'],
'file' => 'Links.php',
'function' => 'links_main',
                                        'custom_url' => $scripturl . '?action=admin;area=settings;sa=settings',


When I go to there though it doesn't exist.

There's a couple of other mods but I can't recall their names. This sucks :(.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

kat

Could your host have the dreaded "mod_security" enabled?

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

kat

I wouldn't imagine that he'd have that enabled. But, stranger things have happened...

Chalky

Same thing happened to me when Liroy updated to PHP 5.4 with my mods whose code is not PHP 5.4 compliant.  Have a look at the Subs files for those mods in your Sources folder and look for something like this example taken from Subs-ThankYou.php belonging to the Thank-o-matic mod:

function ThanYou_add_admin_areas($adminAreas)

where the variable is called but there is no declaration to modify it (or something like that - I'm paraphrasing the explanation I was given because I'm not a coder  :P)

Try sticking an ampersand & in it like this:

function ThanYou_add_admin_areas(&$adminAreas)

It worked for all mine  :)

kat

There speaks the voice of experience. :)

Ta, your royal Chalkiness! :)

Chalky

I can't take any credit. Arantor showed me how to fix it, I just recognise the symptoms  ;)

kat

It's the remembering that matters, though, innit? :)

Jade Elizabeth

Well now I have to go through every freaking mod to find it? :(

Why is it happening? Is it Liroys fault and I should beat him up, or the mod authors faults and I should beat them up? lol


(Thanks heaps for the fix though I will try it out tonight :D :D :D)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

kat

You can beat Liroy up, anyway, if you like. I'm sure he'd enjoy it...

Jade Elizabeth

Wow I can't believe this was still marked as unsolved...aren't you support guys supposed to do that/follow up? :/

Anyway I just ran a search for any mention of the following, for my entire forum, and it has zero results for each:

$adminAreas
add_admin_areas

So I'm a bit lost and I really need these menus now lol.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

Closest to finding any info is this:

$context[$context['admin_menu_name']]['tab_data']['title'] = $txt['links_admin_settings'];
$context[$context['admin_menu_name']]['tab_data']['description'] = $txt['links_admin_settings_description'];


// We need this
require_once($sourcedir.'/ManageServer.php');

$config_vars = array(             
    array('check', 'links_maintenance', 'subtext' => $txt['links_maintenance2']),
        array('text', 'links_maintenance_reason', 'size' => 30),
array('check', 'mylinks_index'),
array('check', 'links_random_index'),
        array('check', 'links_recent_index'),
array('check', 'links_stats_index'),
array('check', 'links_no_index', 'subtext' => $txt['links_no_index2']), 
);


if (isset($_GET['save']))
{
saveDBSettings($config_vars);
redirectexit('action=admin;area=settings;sa=settings');
}
$context['post_url'] = $scripturl .'?action=admin;area=settings;sa=settings;save';
prepareDBSettingContext($config_vars);
}


function links_admin_submit($return_config = false)
{   
global $txt, $scripturl, $context, $sourcedir, $modSettings, $db_prefix;

$context[$context['admin_menu_name']]['tab_data']['title'] = $txt['links_admin_settings'];
$context[$context['admin_menu_name']]['tab_data']['description'] = $txt['links_admin_settings_description'];
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

kat

Quote from: Jade Elizabeth on June 20, 2014, 03:57:33 AM
Wow I can't believe this was still marked as unsolved...aren't you support guys supposed to do that/follow up? :/

We have an auto-updated list of unsolved topics, Jade. Oddly, this one isn't on that list and I have no idea why...

However, even if it had been there, I'd kinda assumed we were waiting on you coming back with a follow-up to...

Quote from: Jade Elizabeth on February 19, 2014, 08:03:18 PM
Well now I have to go through every freaking mod to find it?

and

Quote from: Jade Elizabeth on February 19, 2014, 08:03:18 PMI will try it out tonight.

So ;)

Illori

Quote from: K@ on June 20, 2014, 06:56:56 AM
Quote from: Jade Elizabeth on June 20, 2014, 03:57:33 AM
Wow I can't believe this was still marked as unsolved...aren't you support guys supposed to do that/follow up? :/

We have an auto-updated list of unsolved topics, Jade. Oddly, this one isn't on that list and I have no idea why...

if a topic was last replied to by a team member [which this one was] it does not show in the list.

kat


Jade Elizabeth

Quote from: Illori on June 20, 2014, 07:07:39 AM
Quote from: K@ on June 20, 2014, 06:56:56 AM
Quote from: Jade Elizabeth on June 20, 2014, 03:57:33 AM
Wow I can't believe this was still marked as unsolved...aren't you support guys supposed to do that/follow up? :/

We have an auto-updated list of unsolved topics, Jade. Oddly, this one isn't on that list and I have no idea why...

if a topic was last replied to by a team member [which this one was] it does not show in the list.

Well that is a smart idea!

But I am still screwed cause nothing is helping me get these menus back. I don't know how many mods have them. I have 200+ mods installed.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

kat

Did you go through the mods, just to see if the code actually exists?

If it doesn't, could the file be write-protected, preventing the mods from installing properly?

Jade Elizabeth

I went through everything, the closest I can find for the specific mod I want to edit is:

Quote from: Jade Elizabeth on June 20, 2014, 04:10:45 AM
Closest to finding any info is this:

$context[$context['admin_menu_name']]['tab_data']['title'] = $txt['links_admin_settings'];
$context[$context['admin_menu_name']]['tab_data']['description'] = $txt['links_admin_settings_description'];


// We need this
require_once($sourcedir.'/ManageServer.php');

$config_vars = array(             
    array('check', 'links_maintenance', 'subtext' => $txt['links_maintenance2']),
        array('text', 'links_maintenance_reason', 'size' => 30),
array('check', 'mylinks_index'),
array('check', 'links_random_index'),
        array('check', 'links_recent_index'),
array('check', 'links_stats_index'),
array('check', 'links_no_index', 'subtext' => $txt['links_no_index2']), 
);


if (isset($_GET['save']))
{
saveDBSettings($config_vars);
redirectexit('action=admin;area=settings;sa=settings');
}
$context['post_url'] = $scripturl .'?action=admin;area=settings;sa=settings;save';
prepareDBSettingContext($config_vars);
}


function links_admin_submit($return_config = false)
{   
global $txt, $scripturl, $context, $sourcedir, $modSettings, $db_prefix;

$context[$context['admin_menu_name']]['tab_data']['title'] = $txt['links_admin_settings'];
$context[$context['admin_menu_name']]['tab_data']['description'] = $txt['links_admin_settings_description'];


I did a search of my entire website for the source code:
$adminAreas
add_admin_areas

Zero results.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Deaks

jade dumb question but I read the whole topic cause it was you :P

But are the text strings in the language files?
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

kat


Jade Elizabeth

Quote from: Μπράιαν on June 23, 2014, 11:45:55 AM
jade dumb question but I read the whole topic cause it was you :P

But are the text strings in the language files?

I don't know, I'm a moron lol.

Quote from: K@ on June 23, 2014, 12:06:23 PM
What's mod's that?

SMFpacks Links Directory




So. I found the code, it was really easy to find to so it's so embarrassing to say I found it XD. It was $admin_areas or something LOL. Oops XD.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: