Skip to content

Fix adding values to system variable collection #13596

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

Merged
merged 1 commit into from
Feb 15, 2018

Conversation

mszydlo
Copy link
Contributor

@mszydlo mszydlo commented Feb 10, 2018

Changed select fields in joined variable value table in Magento\Variable\Model\ResourceModel\Variable\Collection#addValuesToResult() method to match DB schema

Description

Method mentioned above tried to select field value from joined variable_value table (which doesn't exist). I've replaced incorrect field with two proper ones: plain_value and html_value.

Fixed Issues

Calling Magento\Variable\Model\ResourceModel\Variable\Collection#addValuesToResult() method results with Zend_Db_Statement_Exception thrown. Exception message:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'value_table.value' in 'field list', query was: SELECT `main_table`.*, `value_table`.`value` FROM `variable` AS `main_table`  
   INNER JOIN `variable_value` AS `value_table` ON value_table.variable_id = main_table.variable_id WHERE (`value_table`.`store_id` = 0)

Manual testing scenarios

As the method is not used anywhere in the magento core there is no way to reproduce error with just clicking.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Changed select fields in joined variable value table in Magento\Variable\Model\ResourceModel\Variable\Collection#addValuesToResult() method to match DB schema
@dmanners
Copy link
Contributor

@mszydlo thank you for this PR. I will process this now and get back to you if I need anything else.

@magento-engcom-team
Copy link
Contributor

@mszydlo thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

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

Successfully merging this pull request may close these issues.

3 participants