Skip to content

Fix overwrite default value image/file with NULL #10253

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
Jul 18, 2017

Conversation

AntonEvers
Copy link
Contributor

@AntonEvers AntonEvers commented Jul 16, 2017

If you set a default value for a config field type image/file and you save it. It won't set the default value in the database. Instead it will save NULL and so overwrite the default config.

With this change the default value will be set as value.

Description

This is a replication of #5085

Fixed Issues (if relevant)

  1. Default values for system config of type image/file is not working #10252: Default values for system config of type image/file is not working

Manual testing scenarios

  1. Install Magento from develop branch.
  2. Add config field with type image.
  3. Add default config value for that field.
  4. Save the config field without uploading a new file.

Before the fix:

  • New record created in the database table core_config_data with value NULL.

After the fix:

  • New record created in the database table core_config_data with default value.

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)

If you set a default value for a config field type image/file and you save it. It won't set the default value in the database. Instead it will save NULL and so overwrite the default config.

With this change the default value will be set as value.

This is a replication of what used to be in of magento#5085
@miguelbalparda miguelbalparda self-assigned this Jul 17, 2017
@miguelbalparda miguelbalparda added this to the July 2017 milestone Jul 17, 2017
@miguelbalparda
Copy link
Contributor

Hi @ajpevers I'll be reviewing this PR. Thanks for your contribution!

@magento-team magento-team merged commit 21f4e66 into magento:develop Jul 18, 2017
magento-team pushed a commit that referenced this pull request Jul 18, 2017
[EngCom] Public Pull Requests

 - MAGETWO-70817: remove redundant else and use strict check #10271
 - MAGETWO-70787: update phpserver to support versioned static urls #10250
 - MAGETWO-70764: Fix overwrite default value image/file with NULL #10253
 - MAGETWO-70761: Show values that are duplicate in attribute error msg #10213
 - MAGETWO-70758: Fix for #4530 $product->getRatingSummary() always returns null […] #10248
 - MAGETWO-70706: simplify product lists #2 #9019
 - MAGETWO-70669: Fix fatal errors with deleteOptionsAndSelections #7711
 - MAGETWO-70464: Fix shipping address can use for billing #10130
 - MAGETWO-69913: magento/magento2 #9196 - Products ordered report doesn't show simple (child) products of configurable products #9908
@miguelbalparda
Copy link
Contributor

Thanks for your contribution @ajpevers!

magento-team pushed a commit that referenced this pull request Oct 10, 2017
magento-team pushed a commit that referenced this pull request Oct 10, 2017
magento-team pushed a commit that referenced this pull request Oct 10, 2017
magento-team pushed a commit that referenced this pull request Oct 10, 2017
Fixed issues:
- MAGETWO-71552: Attribute values on store view level not searchable - for 2.2
- MAGETWO-72866: Redundant indexers invalidation - RIATCS-340
- MAGETWO-75458: [Backport] - Fix overwrite default value image/file with NULL #10253 - for 2.2
- MAGETWO-75460: [Backport] - LowestPriceOptionsProvider returns products without attributes which are used for price calculation (e.g. tax adjustment)
- MAGETWO-80193: [2.2.x] - Add cast to string for CUST_GROUP_ALL #10475
- MAGETWO-80204: [2.2.x] - Grammar fix for #9533 #10627
- MAGETWO-71549: Impossible to export Advanced Prices on a medium profile
- MAGETWO-80198: [2.2.x] - Fix issue #10565 #10575
- MAGETWO-80197: [2.2.x] - Fix JS translation search #10445
- MAGETWO-80195: [2.2.x] - Send different base currency in Google analytics #10508
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