Skip to content

Fix overwrite default value image/file with NULL #5085

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

Closed
wants to merge 1 commit into from
Closed

Fix overwrite default value image/file with NULL #5085

wants to merge 1 commit into from

Conversation

joost-florijn-kega
Copy link
Contributor

@joost-florijn-kega joost-florijn-kega commented Jun 17, 2016

Steps to reproduce

  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.

Expected result

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

Actual result

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

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.

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.
@vkublytskyi vkublytskyi added the PS label Jun 17, 2016
@joost-florijn-kega
Copy link
Contributor Author

I want to agree to the CLA licence but i can't. I have the same issue as described in this issue: #5070

@vrann
Copy link
Contributor

vrann commented Mar 20, 2017

@joost-florijn-kega The branch for this PR is deleted. Please re-create PR from the new branch

@vrann vrann closed this Mar 20, 2017
AntonEvers pushed a commit to AntonEvers/magento2 that referenced this pull request 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.

This is a replication of what used to be in of magento#5085
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.

4 participants