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

Cannot save any modification for other selection than Default in Configuration Scope #1417

Closed
addison74 opened this issue Jan 22, 2021 · 3 comments · Fixed by #1418
Closed
Labels

Comments

@addison74
Copy link
Contributor

I just installed OpenMage v20.0.6 from scratch then I accessed the Backend. To reproduce this issue go to System -> Configuration.

From left side choose a "Configuration Scope" from the list then press [Save Config] button. Here are the results:

Default Configuration

screenshot1

Main Website

screenshot2

Default Store View

screenshot3

Now let's delete this folder /app/code/core/Mage and replace it with the one from OpenMage v20.0.5. Here is the result:

screenshot4

In conclusion "something" in bad happened from 20.0.5 to 20.0.6. There are not many files changed between versions and I don't have time to debug. I will evaluate which files could generate this issue and I hope to find them quick.

BTW reverting this folder to its previous version I was able to use again the Template Hints feature in Frontend.

@addison74 addison74 added the bug label Jan 22, 2021
@addison74
Copy link
Contributor Author

This is the file responsible for this issue:

https://github.com/OpenMage/magento-lts/blob/4e0dc62651e0c983044dde92f30fe81046550c31/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php

lines 628 - 635:

        switch ($this->getScope()) {
            case self::SCOPE_DEFAULT:
                return (bool)$field->show_in_default;
            case self::SCOPE_WEBSITES:
                return (bool)$field->show_in_website;
            case self::SCOPE_STORES:
                return (bool)$field->show_in_store;
        }

Replace bool with int.

@colinmollenhour
Copy link
Member

Thanks for the report and finding the location of the bug! This is a pretty serious bug so we should get this merged and released ASAP. Fix in #1418

@sreichel sreichel linked a pull request Jan 23, 2021 that will close this issue
@addison74
Copy link
Contributor Author

Solved based on the solution @colinmollenhour provided. I will close this issue.

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

Successfully merging a pull request may close this issue.

3 participants