Jump to content

Main menu automatically disables


Recommended Posts

Hi there!

I have a small problem with my PrestaShop main menu. A long time ago I decided that I didn't needed the plugin so I disabled it. But now I want to enable it and it keeps enabled for a couple of hours after it disables again automatically. Can somebody help me with this problem?

Thanks in advance!

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 3 months later...
  • 2 months later...
  • 4 weeks later...

Hi Guys,

I've had this issue for quite some time and I've found out whats causing it! GRRRRRR

I stumbled across the cause by going to Design -> positions -> Main Menu -> Edit

I noticed that a warning appeared saying Top Horizontal Menu cannot be used with Main Menu - voila! Its a module that's installed but not showing - I deleted the folder under the Modules section but I suppose a safer option would be to install it from Module Manager and Uninstall it again - I suspect at some point its been installed and during the uninstall i've told it to leave the folder there.

Just a quick note I forgot to add....

I viewed the source of the module and it has a section which automatically disables the ps_main_menu module.

 

Edited by Jamie Dean
Missing info (see edit history)
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, Jamie Dean said:

Hi Guys,

I've had this issue for quite some time and I've found out whats causing it! GRRRRRR

I stumbled across the cause by going to Design -> positions -> Main Menu -> Edit

I noticed that a warning appeared saying Top Horizontal Menu cannot be used with Main Menu - voila! Its a module that's installed but not showing - I deleted the folder under the Modules section but I suppose a safer option would be to install it from Module Manager and Uninstall it again - I suspect at some point its been installed and during the uninstall i've told it to leave the folder there.

Just a quick note I forgot to add....

I viewed the source of the module and it has a section which automatically disables the ps_main_menu module.

 

You, sir, deserve a dozen Temakis by on me.

Works like a charm! Seems like the uninstall function of the Top Horizontal Menu, by MyPresta, doesn't work properly. Removing the directory made the job.

Thanks!

Link to comment
Share on other sites

  • 1 month later...

Can't believe it was this thing all along, had this issue for months and it just happened again when I installed a completely separate mod and searched for the issue, found this and VOILA ! Thanks for the tip :)

Link to comment
Share on other sites

  • 2 weeks later...

Oh yea, this one was tricky! 😂

As far as I observe it really fixes weird problem with blocktopdropdownmenu from mypresta.eu by @vekia

I'm not sure the module was even enabled in the shop, because we used the generic ps_mainmenu. Accidently, once in a while it triggered 

if (Module::isEnabled('blocktopdropdownmenu'))

from \blocktopdropdownmenu.php:70

    public function __construct()
    {
        $this->name = 'blocktopdropdownmenu';
        $this->tab = 'front_office_features';
        $this->version = '1.0.3';
        $this->author = 'MyPresta.eu + PrestaShop';
        $this->mypresta_link = 'https://mypresta.eu/modules/front-office-features/top-horizontal-menu-with-dropdowns.html';

        $this->bootstrap = true;
        parent::__construct();

        $this->displayName = $this->l('Top horizontal menu');
        $this->description = $this->l('Adds a new horizontal menu to the top of your e-commerce website. It is an modification of default module that creates dropdown menu');
        $this->ps_versions_compliancy = array('min' => '1.7', 'max' => '1.7.99.99');
        $this->checkforupdates(0,0);

        if (Module::isEnabled('ps_mainmenu')){
            $this->context->controller->warnings[] = $this->l('Top horizontal menu with dropdowns does not work with default "Main menu" module.').' '.$this->l('To use this module you need to disable the official "Main menu" first');
            if (Module::disableByName('ps_mainmenu')){
                if (Module::isEnabled('blocktopdropdownmenu'))
                {
                    $this->context->controller->success[] = $this->l('We disabled this module automatically');
                }
            }
        }
    }

So!

Deleting the module from FTP fixed the problem.
Actually renaming directory is fine too (__blocktopdropdownmenu)

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 5 months later...
  • 6 months later...
On 5/16/2020 at 9:00 AM, Sellmark said:

Oh yea, this one was tricky! 😂

As far as I observe it really fixes weird problem with blocktopdropdownmenu from mypresta.eu by @vekia

I'm not sure the module was even enabled in the shop, because we used the generic ps_mainmenu. Accidently, once in a while it triggered 


if (Module::isEnabled('blocktopdropdownmenu'))

from \blocktopdropdownmenu.php:70


    public function __construct()
    {
        $this->name = 'blocktopdropdownmenu';
        $this->tab = 'front_office_features';
        $this->version = '1.0.3';
        $this->author = 'MyPresta.eu + PrestaShop';
        $this->mypresta_link = 'https://mypresta.eu/modules/front-office-features/top-horizontal-menu-with-dropdowns.html';

        $this->bootstrap = true;
        parent::__construct();

        $this->displayName = $this->l('Top horizontal menu');
        $this->description = $this->l('Adds a new horizontal menu to the top of your e-commerce website. It is an modification of default module that creates dropdown menu');
        $this->ps_versions_compliancy = array('min' => '1.7', 'max' => '1.7.99.99');
        $this->checkforupdates(0,0);

        if (Module::isEnabled('ps_mainmenu')){
            $this->context->controller->warnings[] = $this->l('Top horizontal menu with dropdowns does not work with default "Main menu" module.').' '.$this->l('To use this module you need to disable the official "Main menu" first');
            if (Module::disableByName('ps_mainmenu')){
                if (Module::isEnabled('blocktopdropdownmenu'))
                {
                    $this->context->controller->success[] = $this->l('We disabled this module automatically');
                }
            }
        }
    }

So!

Deleting the module from FTP fixed the problem.
Actually renaming directory is fine too (__blocktopdropdownmenu)

I found the module, and you're right. Thanks.
A fun fact: They first disable the "ps_mainmenu" module, and then check is the "blocktopdropdownmenu" module enabled.
Just why? :D

if (Module::disableByName('ps_mainmenu')){
    if (Module::isEnabled('blocktopdropdownmenu'))
        {
            $this->context->controller->success[] = $this->l('We disabled this module automatically');
        }
    }

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...