Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

antbates91
Copy link
Contributor

@antbates91 antbates91 commented Oct 7, 2024

Resolves: #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.

Add Resource Model to __construct so that the connection table name comes through with any prefixes
@andrzejborkowski
Copy link

@antbates91 thanks for your contribution, I created an internal ticket SMM-25, once our dev team will review the code we can add it to the next release.

@adamwaclawczyk adamwaclawczyk merged commit 8b25092 into SnowdogApps:develop Nov 8, 2024
4 checks passed
@adamwaclawczyk
Copy link
Member

Merged and released in 2.27.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snowdog\Menu\Model\ResourceModel\Menu\Node afterSave method throws Exception when used with Database Prefix
3 participants