Known Issues

This section describes the most common problems that customers report and how they can be resolved:

Can not submit ticket. Error with Pelago\Emogrifier->addStyleElementToDocument

If you see an error message like "Fatal error: Uncaught Error: Call on a member function appendChild() on null in ../emogrifier/src/Emogrifier.php:1419", please run the following command composer require pelago/emogrifier:2.0.0.

Help Desk has suddenly stopped fetching emails

There are several possible reasons why the fetch stopped:

  • IMAP fetch capacity limit

    IMAP Protocol has a limited time window in fetching an email collection. When your mailbox contains over 2048 emails, the fetching collection becomes too long, and IMAP returns an empty collection. Our extension, therefore, thinks that there are no new emails and exits.

    • How to confirm this reason: Go to Customers -> Help Desk MX -> Gateways, select a proper Gateway, and press the Debug button at its edit page. It will display the current number of emails. If it is above 2048, the reason will be confirmed.
    • How to resolve:
      • Remove all unnecessary emails. This way, the fetched collection size will be reduced, and the fetch will work properly.
      • Create a Folder or Label in a mailbox, and force a fetch from there. Please enter the name of the created Folder or Label in the Folder field of Gateway, and this will force our extension to fetch emails only from there. It will also reduce the size of the fetched collection.

     

  • Incorrect Email Format

    Some emails can come in a special format, such as a non-standard encoding (Chinese Unicode, for example) or non-standard origin (Telnet, for example). Not all of them can be parsed since they are not standard. But they can block subsequent emails' fetch since a parse error stops the fetching cron task.

    • How to confirm this reason: Go to Customers -> Help Desk MX -> Gateways, select the proper Gateway, and press the Debug button in the edit page. It will display the current number of emails. If it's below 2048 and one of the last emails is unread, the reason will automatically be confirmed.
    • How to resolve: Log in to your mailbox separately, and force that message read. Our extension will skip it and then proceed with others. Note: There can be other incorrect emails, so you might need to read several such emails forcefully.

     

  • Third-Party Tool or Extension Conflict

    Our extension requires a monopoly in the mailbox, which is registered as Gateway. It fetches unread emails and marks them as read - so they will not be fetched next time. If you use a third-party tool which also uses the same mailbox, it can also mark emails as read, and our extension will skip them.

    • How to confirm this reason: Go to Customers -> Help Desk MX -> Gateways, select the proper Gateway and press the Debug button edit page. It will display the current number of emails. If it is below 2048, the last emails will be marked as read, but if they are not converted to tickets or messages, the reason will be confirmed.
    • How to resolve: Prevent your third-party extension from marking emails as read, or stop using it entirely.

    Note

    There is a rare case when two different stores on different servers (both with Help Desk installed) use the same database. In this case, emails will be fetched only by one store, and the Help Desk, on the other hand, will skip all emails.

    To resolve this case, you need to create two different Gateways for each store.

When I save a gateway, I see the error message 'Authentication failed for user..'

This error indicates that the extension could not connect to the mailbox. Possible causes are:

  1. You use two-factor authentication in your mailbox

    In this case, you need to create a separate password for the helpdesk and use it when you configure the gateway.

  2. IMAP is disabled for your mailbox

    Please, contact your mailbox provider and ask them to email IMAP.

IMAP has limited support or is completely disabled at the shell level

This issue is reported by our Email Fetching module and can be seen at Customers > Help Desk MX > Gateways, where the error "Can't fetch" appears. You can also run the following test: Open your shell console and run the following command: php -m | grep imap. If you see an empty result, then IMAP is not enabled, and you need to enable it.

The cause of this issue is that PHP has two configurations. One for Apache (or other servers), the other for shell where the php-imap extension should work. Our extension fetches emails at shell level (via cron tasks) to use only php shell.

Solution:

Contact your hosting provider and ask to enable php-imap for PHP at the shell level.

Quick Responses contain weird javascript code

Example:

/* <![CDATA[ */!function(){try{var t="currentScript"in document?document.currentScript:function(){for(var t=document.getElementsByTagName("script"),e=t.length;e--;)if(t[e].getAttribute("cf-hash"))return t[e]}();if(t&&t.previousSibling){var e,r,n,i,c=t.previousSibling,a=c.getAttribute("data-cfemail");if(a){for(e="",r=parseInt(a.substr(0,2),16),n=2;a.length-n;n+=2)i=parseInt(a.substr(n,2),16)^r,e+=String.fromCharCode(i);e=document.createTextNode(e),c.parentNode.replaceChild(e,c)}}}catch(u){}}();/* ]]> */, OKD-384-58649, AntioxiBoost, AntioxiBoost, Administrator, howie@antioxiboost.com
/* <![CDATA[ */!function(){try{var t="currentScript"in document?document.currentScript:function(){for(var t=document.getElementsByTagName("script"),e=t.length;e--;)if(t[e].getAttribute("cf-hash"))return t[e]}();if(t&&t.previousSibling){var e,r,n,i,c=t.previousSibling,a=c.getAttribute("data-cfemail");if(a){for(e="",r=parseInt(a.substr(0,2),16),n=2;a.length-n;n+=2)i=parseInt(a.substr(n,2),16)^r,e+=String.fromCharCode(i);e=document.createTextNode(e),c.parentNode.replaceChild(e,c)}}}catch(u){}}();/* ]]> */

This script is used by the CloudFlare Email Protection cloud service, which masks 'on-the-fly' email addresses by placing a special script after them.

Solution:

  • Turn off the CloudFlare Email Protection service, or
  • Go to Customers > Help Desk MX > Quick Responses and adjust the Quick Response content so that it does not contain free email addresses or variables translated to them.

Email replies do not bind to their tickets and are fetched as new tickets.

Possible causes:

  1. Variable {{var ticket.getHiddenCodeHtml()}} is missing on the email template

    This issue can appear when a special variable {{var ticket.getHiddenCodeHtml()}} is missing in the email template. Also, it can be caused by some filter or spam protection means of your email provider.

    Solution 1

    • Go to Store > Configuration > Help Desk MX -> Email Notification Settings and check the name of the particular template
    • If a custom template is selected, go to System -> Transaction Emails and edit that template. Put the variable {{var ticket.getHiddenCodeHtml()}} in the appropriate place and save.
    • If the standard template is selected, check templates at the app/locale/[YOUR_LOCALE]/template/email/mst_helpdesk/ directory. Put it back {{var ticket.getHiddenCodeHtml()}} to the appropriate template and save it.
    • Purge ALL your cache.

    Solution 2

    • Go to Store > Configuration > Help Desk MX -> Email Notification Settings and set the Show Ticket ID in the email title option to Yes
  2. Email service removes hidden ticket code

    This issue can appear when the email service (Office360, for example), which cleans all additional email attributes, is used as either a sender or a gateway. This means that the ticket code is stripped from the email, and the customer's answer cannot be bound to the proper ticket.

    Solution:

    • Go to Store > Configuration > Help Desk MX -> Email Notification Settings and set the option Show Ticket ID in the email title to "Yes".

Our staff replies, sent via email, do not appear in tickets.

Please, check your sender emails: if they are also registered as Gateways, these replies are skipped because our extension treats them as auto-notifications.

Moreover, all emails that originate from Gateway mailboxes will be skipped to avoid an infinite cycle due to "conversations" between Gateways.

Solution:

Remove all mailboxes that are used as sender emails from Gateways or provide your staff with separate mailboxes.

I have upgraded my extension and have received a Fatal Error in one of the Mirasvit_Ddeboer_Imap classes

Please, check the full error message. It should look like one of these examples (or similar):

    PHP Fatal error: Call to undefined method Mirasvit_Ddeboer_Imap_Message::getErrors() in /.../app/code/local/Mirasvit/Helpdesk/Helper/Fetch.php on line 299
    Fatal error: Uncaught Error: Class 'Mirasvit_Ddeboer_Imap_Server' not found in /.../app/code/Mirasvit/Helpdesk/Helper/Fetch.php:83

Causes: during upgrade or installation, not all of the required files of our extension were copied.

Solutions:

  • If you're using M2.1 and have installed our extension manually, make sure that the folder lib/Mirasvit from the installation package was correctly installed to lib/internal subdirectory into your Magento store root.
  • If you're using M2.2, then perform the update via composer - it should restore all dependencies.