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

Removed unused variable #1355

Merged
merged 1 commit into from
Jul 30, 2021
Merged

Removed unused variable #1355

merged 1 commit into from
Jul 30, 2021

Conversation

midlan
Copy link
Contributor

@midlan midlan commented Dec 14, 2020

Description (*)

Just removed unused variable.

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes OpenMage/magento-lts#<issue_number>

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)

@github-actions github-actions bot added the Component: Adminhtml Relates to Mage_Adminhtml label Dec 14, 2020
kiatng
kiatng previously approved these changes Dec 15, 2020
@Flyingmana
Copy link
Contributor

could have unintended side effects on internal initialization and also about when the event "adminhtml_init_system_config" is called

@midlan
Copy link
Contributor Author

midlan commented Dec 29, 2020

@Flyingmana you are right about the event adminhtml_init_system_config, we should check if there is observers for it

About the init, seems safe to me. It is simple lazy-loading pattern, I don't see how it may behave differently when lazy-loaded from different model.

luigifab
luigifab previously approved these changes May 16, 2021
Copy link
Contributor

@luigifab luigifab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PayPal use the adminhtml_init_system_config event with paypal/observer::loadCountryDependentSolutionsConfig.
But I didn't see any emails added with Mage_Paypal.

The only configuration about email that I found is: email_confirmation, used in API request.

@Flyingmana Flyingmana changed the base branch from 1.9.4.x to 20.0 July 30, 2021 22:07
@Flyingmana Flyingmana dismissed stale reviews from luigifab and kiatng July 30, 2021 22:07

The base branch was changed.

@Flyingmana Flyingmana merged commit 5cb3187 into OpenMage:20.0 Jul 30, 2021
@Flyingmana
Copy link
Contributor

I moved it to the 20.0 branch, because even if it looks ok, I want to not risk issues, and its not a bugfix, so not necessarily needed in the 1.9.4.x branch.

@github-actions
Copy link
Contributor

Unit Test Results

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
6 runs  ±0  6 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 5cb3187. ± Comparison against base commit 10da7af.

@empiricompany
Copy link
Contributor

removing this line i can't load email template from admin

PHP Fatal error:  Uncaught Error: Call to a member function xpath() on null in /htdocs/app/code/core/Mage/Adminhtml/Model/Config.php:208

Stack trace:
#0 /htdocs/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php(386): Mage_Adminhtml_Model_Config->getSystemConfigNodeLabel('sales_email')

#1 /htdocs/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php(317): Mage_Adminhtml_Block_System_Email_Template_Edit->_getSystemConfigPathsParts(Array)

#2 /htdocs/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php(227): Mage_Adminhtml_Block_System_Email_Template_Edit->getUsedDefaultForPaths(false)

#3 /htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(437): Mage_Adminhtml_System_Email_TemplateController->defaultTemplateAction()

#4 /htdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(262):  in /htdocs/app/code/core/Mage/Adminhtml/Model/Config.php on line 208

@kiatng
Copy link
Contributor

kiatng commented Oct 28, 2021

I can replicate the error reported by @empiricompany in backend > System > Transactional Emails > Add New Template > select any template in the Template dropdown and then click button Load Template. No template is loaded, PHP logs the error

PHP Fatal error: Uncaught Error: Call to a member function xpath() on null in /../app/code/core/Mage/Adminhtml/Model/Config.php:208

After restoring this line

Mage::getSingleton('adminhtml/config')->getSections();

The template loaded successfully. It looks like we need to revert this merge.

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

Successfully merging this pull request may close these issues.

5 participants