Magento 2 - Debugging Hints showing on emails sent programmaticallyMagento 2 debugging SystemM2 Debugging - Layout Container Hints?Magento 2 timing of transactional emails sentMagento 2 emails not being sent on VPSMagento 2.1.6 No confirmation emails sent from frontendMagento 2 - multiple emails sent only over 3 accountsTemplate Path Hints not showing on front-end in magento2All Transaction Emails Getting Sent Only from 'postmaster@example.com'Magento2.3 w/ php7.2 - Emails not being sentShipment emails not being sent even though other emails are working
What is the effect and/or good reasons of changing a paper bill to a coin?
How to avoid unconsciously copying the style of my favorite writer?
What's the difference between 2a and 10a charging options?
What do I do when a student working in my lab "ghosts" me?
Invert Some Switches on a Switchboard
How do I generate distribution of positive numbers only with min, max and mean?
3D Statue Park: U shapes
Is it normal practice to screen share with a client?
Examples of simultaneous independent breakthroughs
Expansion with *.txt in the shell doesn't work if no .txt file exists
What to do when you reach a conclusion and find out later on that someone else already did?
How can I create a pattern of parallel lines that are increasing in distance in Photoshop / Illustrator?
Convert a string like 4h53m12s to a total number of seconds in JavaScript
Why are so many countries still in the Commonwealth?
USA: Can a witness take the 5th to avoid perjury?
Commercial jet accompanied by small plane near Seattle
Why was Sauron preparing for war instead of trying to find the ring?
How do I run a game when my PCs have different approaches to combat?
How do professional electronic musicians/sound engineers combat listening fatigue?
Where to place an artificial gland in the human body?
This message is flooding my syslog, how to find where it comes from?
How do we explain the E major chord in this progression?
How can I stop myself from micromanaging other PCs' actions?
Replacing tongue and groove floorboards: but can't find a match
Magento 2 - Debugging Hints showing on emails sent programmatically
Magento 2 debugging SystemM2 Debugging - Layout Container Hints?Magento 2 timing of transactional emails sentMagento 2 emails not being sent on VPSMagento 2.1.6 No confirmation emails sent from frontendMagento 2 - multiple emails sent only over 3 accountsTemplate Path Hints not showing on front-end in magento2All Transaction Emails Getting Sent Only from 'postmaster@example.com'Magento2.3 w/ php7.2 - Emails not being sentShipment emails not being sent even though other emails are working
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a bootstrap script that is used to mark orders as shipped. After shipping the order it used ShipmentNotifier to send out the shipment email. Despite Debugging Hints being turned off everywhere, the email that it sends still includes the red path hints.
I have tried setting the script to run in the 'frontend' state instead of 'adminhtml', but it makes no difference, the red boxes remain.
If I send the email out manually using the Magento backend then it sends correctly (no debug hints). This leaves me to believe there is something I am missing in the bootstrap script.
Has anyone encountered this issue before? What did you do to resolve it?
// Register shipment
$shipment->register();
$shipment->getOrder()->setIsInProcess(true);
try
// Save created shipment and order
$shipment->save();
$shipment->getOrder()->save();
catch (Exception $e)
echo "<font color=red><b>EXCEPTION: </b></font>". $e->getMessage(); exit;
//send email
$shipmentNotifier = $objectManager->create('MagentoShippingModelShipmentNotifier');
$shipmentNotifier->notify($shipment);
magento2
add a comment |
I have a bootstrap script that is used to mark orders as shipped. After shipping the order it used ShipmentNotifier to send out the shipment email. Despite Debugging Hints being turned off everywhere, the email that it sends still includes the red path hints.
I have tried setting the script to run in the 'frontend' state instead of 'adminhtml', but it makes no difference, the red boxes remain.
If I send the email out manually using the Magento backend then it sends correctly (no debug hints). This leaves me to believe there is something I am missing in the bootstrap script.
Has anyone encountered this issue before? What did you do to resolve it?
// Register shipment
$shipment->register();
$shipment->getOrder()->setIsInProcess(true);
try
// Save created shipment and order
$shipment->save();
$shipment->getOrder()->save();
catch (Exception $e)
echo "<font color=red><b>EXCEPTION: </b></font>". $e->getMessage(); exit;
//send email
$shipmentNotifier = $objectManager->create('MagentoShippingModelShipmentNotifier');
$shipmentNotifier->notify($shipment);
magento2
add a comment |
I have a bootstrap script that is used to mark orders as shipped. After shipping the order it used ShipmentNotifier to send out the shipment email. Despite Debugging Hints being turned off everywhere, the email that it sends still includes the red path hints.
I have tried setting the script to run in the 'frontend' state instead of 'adminhtml', but it makes no difference, the red boxes remain.
If I send the email out manually using the Magento backend then it sends correctly (no debug hints). This leaves me to believe there is something I am missing in the bootstrap script.
Has anyone encountered this issue before? What did you do to resolve it?
// Register shipment
$shipment->register();
$shipment->getOrder()->setIsInProcess(true);
try
// Save created shipment and order
$shipment->save();
$shipment->getOrder()->save();
catch (Exception $e)
echo "<font color=red><b>EXCEPTION: </b></font>". $e->getMessage(); exit;
//send email
$shipmentNotifier = $objectManager->create('MagentoShippingModelShipmentNotifier');
$shipmentNotifier->notify($shipment);
magento2
I have a bootstrap script that is used to mark orders as shipped. After shipping the order it used ShipmentNotifier to send out the shipment email. Despite Debugging Hints being turned off everywhere, the email that it sends still includes the red path hints.
I have tried setting the script to run in the 'frontend' state instead of 'adminhtml', but it makes no difference, the red boxes remain.
If I send the email out manually using the Magento backend then it sends correctly (no debug hints). This leaves me to believe there is something I am missing in the bootstrap script.
Has anyone encountered this issue before? What did you do to resolve it?
// Register shipment
$shipment->register();
$shipment->getOrder()->setIsInProcess(true);
try
// Save created shipment and order
$shipment->save();
$shipment->getOrder()->save();
catch (Exception $e)
echo "<font color=red><b>EXCEPTION: </b></font>". $e->getMessage(); exit;
//send email
$shipmentNotifier = $objectManager->create('MagentoShippingModelShipmentNotifier');
$shipmentNotifier->notify($shipment);
magento2
magento2
asked Mar 9 at 4:40
LihytLihyt
212 bronze badges
212 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I could solve this the following way
public function __construct(MagentoStoreModelStoreManagerInterface $storeManager,
MagentoFrameworkObjectManagerInterface $objectManager,
MagentoFrameworkObjectManagerConfigLoaderInterface $configLoader,
MagentoFrameworkAppAreaList $areaList)
$this->storeManager = $storeManager;
$this->objectManager = $objectManager;
$this->configLoader = $configLoader;
$this->areaList = $areaList;
...
public function init()
...
$this->objectManager->configure($this->configLoader->load('frontend'));
$localeInterface = $this->objectManager->create('MagentoFrameworkTranslateInterface');
$localeInterface->setLocale('de_DE');
$localeInterface->loadData();
$areaObject = $this->areaList->getArea(MagentoFrameworkAppArea::AREA_ADMINHTML);
$areaObject->load(MagentoFrameworkAppArea::PART_TRANSLATE);
...
My problem was that i had the email debug path inside the mails. This is caused by magento itself, because magento won´t set any store view or load languages or translations in a cron / command. So you need to set it by yourself.
We have 1 location of sending an email - when creating a shipment - and here it works like a charm. The email looks - like it should - the same like if i would create a shipment in the backend manually.
It is a shame for magento that there is no "preloading" of translations, store views or helper functions for commands, like setting the language / store view.
You are not the only one with the problem, i have seen much more threads. And nobody could help, which is very unusual for Magento. I hope I could help you further :-)
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f265099%2fmagento-2-debugging-hints-showing-on-emails-sent-programmatically%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I could solve this the following way
public function __construct(MagentoStoreModelStoreManagerInterface $storeManager,
MagentoFrameworkObjectManagerInterface $objectManager,
MagentoFrameworkObjectManagerConfigLoaderInterface $configLoader,
MagentoFrameworkAppAreaList $areaList)
$this->storeManager = $storeManager;
$this->objectManager = $objectManager;
$this->configLoader = $configLoader;
$this->areaList = $areaList;
...
public function init()
...
$this->objectManager->configure($this->configLoader->load('frontend'));
$localeInterface = $this->objectManager->create('MagentoFrameworkTranslateInterface');
$localeInterface->setLocale('de_DE');
$localeInterface->loadData();
$areaObject = $this->areaList->getArea(MagentoFrameworkAppArea::AREA_ADMINHTML);
$areaObject->load(MagentoFrameworkAppArea::PART_TRANSLATE);
...
My problem was that i had the email debug path inside the mails. This is caused by magento itself, because magento won´t set any store view or load languages or translations in a cron / command. So you need to set it by yourself.
We have 1 location of sending an email - when creating a shipment - and here it works like a charm. The email looks - like it should - the same like if i would create a shipment in the backend manually.
It is a shame for magento that there is no "preloading" of translations, store views or helper functions for commands, like setting the language / store view.
You are not the only one with the problem, i have seen much more threads. And nobody could help, which is very unusual for Magento. I hope I could help you further :-)
add a comment |
I could solve this the following way
public function __construct(MagentoStoreModelStoreManagerInterface $storeManager,
MagentoFrameworkObjectManagerInterface $objectManager,
MagentoFrameworkObjectManagerConfigLoaderInterface $configLoader,
MagentoFrameworkAppAreaList $areaList)
$this->storeManager = $storeManager;
$this->objectManager = $objectManager;
$this->configLoader = $configLoader;
$this->areaList = $areaList;
...
public function init()
...
$this->objectManager->configure($this->configLoader->load('frontend'));
$localeInterface = $this->objectManager->create('MagentoFrameworkTranslateInterface');
$localeInterface->setLocale('de_DE');
$localeInterface->loadData();
$areaObject = $this->areaList->getArea(MagentoFrameworkAppArea::AREA_ADMINHTML);
$areaObject->load(MagentoFrameworkAppArea::PART_TRANSLATE);
...
My problem was that i had the email debug path inside the mails. This is caused by magento itself, because magento won´t set any store view or load languages or translations in a cron / command. So you need to set it by yourself.
We have 1 location of sending an email - when creating a shipment - and here it works like a charm. The email looks - like it should - the same like if i would create a shipment in the backend manually.
It is a shame for magento that there is no "preloading" of translations, store views or helper functions for commands, like setting the language / store view.
You are not the only one with the problem, i have seen much more threads. And nobody could help, which is very unusual for Magento. I hope I could help you further :-)
add a comment |
I could solve this the following way
public function __construct(MagentoStoreModelStoreManagerInterface $storeManager,
MagentoFrameworkObjectManagerInterface $objectManager,
MagentoFrameworkObjectManagerConfigLoaderInterface $configLoader,
MagentoFrameworkAppAreaList $areaList)
$this->storeManager = $storeManager;
$this->objectManager = $objectManager;
$this->configLoader = $configLoader;
$this->areaList = $areaList;
...
public function init()
...
$this->objectManager->configure($this->configLoader->load('frontend'));
$localeInterface = $this->objectManager->create('MagentoFrameworkTranslateInterface');
$localeInterface->setLocale('de_DE');
$localeInterface->loadData();
$areaObject = $this->areaList->getArea(MagentoFrameworkAppArea::AREA_ADMINHTML);
$areaObject->load(MagentoFrameworkAppArea::PART_TRANSLATE);
...
My problem was that i had the email debug path inside the mails. This is caused by magento itself, because magento won´t set any store view or load languages or translations in a cron / command. So you need to set it by yourself.
We have 1 location of sending an email - when creating a shipment - and here it works like a charm. The email looks - like it should - the same like if i would create a shipment in the backend manually.
It is a shame for magento that there is no "preloading" of translations, store views or helper functions for commands, like setting the language / store view.
You are not the only one with the problem, i have seen much more threads. And nobody could help, which is very unusual for Magento. I hope I could help you further :-)
I could solve this the following way
public function __construct(MagentoStoreModelStoreManagerInterface $storeManager,
MagentoFrameworkObjectManagerInterface $objectManager,
MagentoFrameworkObjectManagerConfigLoaderInterface $configLoader,
MagentoFrameworkAppAreaList $areaList)
$this->storeManager = $storeManager;
$this->objectManager = $objectManager;
$this->configLoader = $configLoader;
$this->areaList = $areaList;
...
public function init()
...
$this->objectManager->configure($this->configLoader->load('frontend'));
$localeInterface = $this->objectManager->create('MagentoFrameworkTranslateInterface');
$localeInterface->setLocale('de_DE');
$localeInterface->loadData();
$areaObject = $this->areaList->getArea(MagentoFrameworkAppArea::AREA_ADMINHTML);
$areaObject->load(MagentoFrameworkAppArea::PART_TRANSLATE);
...
My problem was that i had the email debug path inside the mails. This is caused by magento itself, because magento won´t set any store view or load languages or translations in a cron / command. So you need to set it by yourself.
We have 1 location of sending an email - when creating a shipment - and here it works like a charm. The email looks - like it should - the same like if i would create a shipment in the backend manually.
It is a shame for magento that there is no "preloading" of translations, store views or helper functions for commands, like setting the language / store view.
You are not the only one with the problem, i have seen much more threads. And nobody could help, which is very unusual for Magento. I hope I could help you further :-)
answered Jul 17 at 12:37
Chris SchrutChris Schrut
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f265099%2fmagento-2-debugging-hints-showing-on-emails-sent-programmatically%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown