magento2-menu icon indicating copy to clipboard operation
magento2-menu copied to clipboard

Add Resource Connection to __construct so that the connection table name comes through with any prefixes

Open antbates91 opened this issue 4 months ago • 1 comments

Resolves: https://github.com/SnowdogApps/magento2-menu/issues/346

Add Resource Connection to __construct so that the connection table name comes through with any prefixes

Currently, when installed on an instance with a database prefix, the node saving fails with table 'databasename.snowmenu_customer' not found.

This is because $this->getConnection(); uses a resource that has been instantiated without the concept of Magento database prefixes.

Replication Steps

  1. Install Magento with database prefix.
  2. Create Menu in admin panel.
  3. Add Node type of custom url and fill out information
  4. Hit Save.
  5. Error table 'databasename.snowmenu_customer' not found. is show.

antbates91 avatar Oct 07 '24 09:10 antbates91