Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: skb on March 31, 2017, 02:47:06 AM

Title: Help with errors
Post by: skb on March 31, 2017, 02:47:06 AM
I used an old Mod (Fixed Menu on Top) developed by ahrasis. I've been getting a lot of errors generating out of this Mod. I posted in the Mod's thread for help, but ahrasis has not been around for quite some time. I would appreciate if someone else could take the time out to help with this;

http://www.simplemachines.org/community/index.php?topic=525950.msg3918857#msg3918857
Title: Re: Help with errors
Post by: Kindred on March 31, 2017, 06:57:03 AM
someone did post in the support thread in response...
Title: Re: Help with errors
Post by: skb on April 01, 2017, 12:35:14 AM
Yes, but not with a solution.
Title: Re: Help with errors
Post by: Sir Osis of Liver on April 01, 2017, 12:45:59 AM
Is there a font setting for that mod?
Title: Re: Help with errors
Post by: Kindred on April 01, 2017, 12:46:57 AM
1- that doesn't change the rules about posting mod support in the support thread...
2- Ahrasis was online earlier this month... its not like he has been gone for months or years
Title: Re: Help with errors
Post by: Sir Osis of Liver on April 01, 2017, 12:57:11 AM
If the mod is working, there's a fudge to fix that type of error, but don't remember offhand what it is.  Something to do with adding something like this before the line that causes the error -



     if (isset($modSettings['dmot_hover_font']))
         $modSettings['dmot_hover_font'] = $modSettings['dmot_hover_font'];



The code does nothing, but iirc, the isset defines the variable and eliminates the error.

Title: Re: Help with errors
Post by: skb on April 02, 2017, 12:38:37 AM
Thanks you Sir Osis. I tried inserting it but the errors continue.
Attaching the concerned file in the hope that this can be solved.
Title: Re: Help with errors
Post by: Shambles on April 02, 2017, 04:31:15 AM
Quote from: skb
Attaching the concerned file in the hope that this can be solved.

That file isn't part of the issued SMF. You should [re]post in the mod's support topic ;)
Title: Re: Help with errors
Post by: Sir Osis of Liver on April 02, 2017, 04:52:52 PM
Unable to replicate the problem on 2.0.13 test install.  Are you using the latest hook version 1.4.1?

Title: Re: Help with errors
Post by: skb on April 03, 2017, 02:09:10 AM
Quote from: Sir Osis of Liver on April 02, 2017, 04:52:52 PM
Unable to replicate the problem on 2.0.13 test install.  Are you using the latest hook version 1.4.1?

Yes. Could be a conflict with some other Mod ? Curve Centered Menu Perhaps ?
Title: Re: Help with errors
Post by: Sir Osis of Liver on April 03, 2017, 12:44:52 PM
Don't think so.  The $modSettings array is loaded in Load.php, and it apparently is not finding a dmot_hover_font setting.  Can you post a screen shot of your mod settings for DMOT?
Title: Re: Help with errors
Post by: skb on April 04, 2017, 03:42:19 AM
Sure
Title: Re: Help with errors
Post by: Arantor on April 04, 2017, 04:11:39 AM
Put something in the bottom box. That is what the mod is complaining about.
Title: Re: Help with errors
Post by: Sir Osis of Liver on April 04, 2017, 04:04:36 PM
I ran this mod with all color options blank, no errors. (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Fidk.gif&hash=9ac7acf13f4cfaa1b58390444a38dea11e5473d2)
Title: Re: Help with errors
Post by: Arantor on April 04, 2017, 04:22:04 PM
Yes but the OP isn't; he's running it with one option filled and an option that only shows up if *that* option is filled, and it doesn't account for one being present and the other not.
Title: Re: Help with errors
Post by: Sir Osis of Liver on April 04, 2017, 04:25:19 PM
Will reinstall the mod and try that soon as I have time.  Wouldn't $modSettings['dmot_hover_font'] be loaded with null value and defined?
Title: Re: Help with errors
Post by: Arantor on April 04, 2017, 04:30:10 PM
Why would it be? If a value is empty, it doesn't get saved into $modSettings normally, you have to go out of your way to put it there.
Title: Re: Help with errors
Post by: Sir Osis of Liver on April 04, 2017, 04:35:32 PM
Understood, thanks.
Title: Re: Help with errors
Post by: Sir Osis of Liver on April 04, 2017, 04:58:45 PM
Quote from: Arantor on April 04, 2017, 04:30:10 PM
If a value is empty, it doesn't get saved into $modSettings normally, you have to go out of your way to put it there.

So just as a matter of interest (or not), here's a fudge that werks gud -



// Add DMOT CSS

if (!isset($modSettings['dmot_hover_font']))
$modSettings['dmot_hover_font'] = null;

if (!empty($modSettings['dmot_enable']) && !empty($modSettings['altmenu_replace_with_icon'])) {



Not quite as I remember it, but it defines the variable and eliminates the errors.  Best way, of course, is just to add the required color option.

Title: Re: Help with errors
Post by: skb on April 05, 2017, 03:59:04 AM
Quote from: Arantor on April 04, 2017, 04:11:39 AM
Put something in the bottom box. That is what the mod is complaining about.

Thanks Arantor. That solved the problem.
Thanks Sir Osis, for your time and attention.

Greatly appreciated. Solved.