Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes saving existing newsletter templates by ensuring template_type is handled as an integer (matching validation expectations), and adds UI/test coverage for a successful save in the admin newsletter template editor.
Changes:
- Add explicit
getTemplateType()/setTemplateType()implementations inMage_Newsletter_Model_Templateto coercetemplate_typetoint. - Add an admin session success message after saving a newsletter template.
- Update Cypress e2e to cover saving an existing newsletter template and assert the success message.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
cypress/e2e/openmage/backend/newsletter/template.cy.js |
Updates edit-route test to save an existing template and check for a success message. |
app/locale/en_US/Mage_Newsletter.csv |
Adds a new translation string for the save success message. |
app/code/core/Mage/Newsletter/Model/Template.php |
Introduces typed getter/setter for template_type to satisfy int validation. |
app/code/core/Mage/Core/Model/Email/Template/Abstract.php |
Docblock updates for template text/type method annotations. |
app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php |
Adds a save success message and returns immediately after redirect. |
app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php
Outdated
Show resolved
Hide resolved
Removed unnecessary iframe existence check and wait.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description (*)
Cant save existing newsletter template b/c "template_type" has to be an integer value, string given.
Related Pull Requests
Zend_Validatewithsymfony/validator#4612Manual testing scenarios (*)