Since version 7.12.5 an email import is no longer possible #4881

Open
opened 2026-02-20 16:25:36 -05:00 by deekerman · 2 comments
Owner

Originally created by @C42AT on GitHub (Oct 28, 2022).

Issue

Since version 7.12.4 an email import is no longer possible

Expected Behavior

Since version 7.12.4 an email import is no longer possible -> Modal "An error has occurred"

-> http://xxxxxxx/index.php?module=Emails&action=ImportView&_=1666952964408 -> HTTP 500 Response

Actual Behavior

PHP Error-LOG:

Fatal error: Uncaught TypeError: Unsupported operand types: string % int in /bitnami/suitecrm/cache/smarty/templates_c/%%1A^1AB^1AB6DD00%%tab_panel_content.tpl.php:194 Stack trace: #0 /bitnami/suitecrm/vendor/smarty/smarty/libs/Smarty.class.php(1875): include() #1 /bitnami/suitecrm/include/Sugar_Smarty.php(168): Smarty->_smarty_include() #2 /bitnami/suitecrm/cache/smarty/templates_c/%%A2^A25^A25BDAE8%%ImportView.tpl.php(156): Sugar_Smarty->_smarty_include() #3 /bitnami/suitecrm/vendor/smarty/smarty/libs/Smarty.class.php(1269): include('...') #4 /bitnami/suitecrm/include/Sugar_Smarty.php(151): Smarty->fetch() #5 /bitnami/suitecrm/include/TemplateHandler/TemplateHandler.php(172): Sugar_Smarty->fetch() #6 /bitnami/suitecrm/include/TemplateHandler/TemplateHandler.php(361): TemplateHandler->buildTemplate() #7 /bitnami/suitecrm/include/EditView/EditView2.php(934): TemplateHandler->displayTemplate() #8 /bitnami/suitecrm/include/MVC/View/views/view.edit.php(104): EditView->display() #9 /bitnami/suitecrm/include/MVC/View/SugarView.php(210): ViewEdit->display() #10 /bitnami/suitecrm/include/MVC/Controller/SugarController.php(432): SugarView->process() #11 /bitnami/suitecrm/include/MVC/Controller/SugarController.php(363): SugarController->processView() #12 /bitnami/suitecrm/include/MVC/SugarApplication.php(101): SugarController->execute() #13 /bitnami/suitecrm/index.php(55): SugarApplication->execute() #14 {main} thrown in /bitnami/suitecrm/cache/smarty/templates_c/%%1A^1AB^1AB6DD00%%tab_panel_content.tpl.php on line 194

Steps to Reproduce

  1. Menu -> Email (IMAP)
  2. Mark or Open Email
  3. Bulk Action or Single Action: IMPORT

-> Broswer Console: sugar_grp1_jquery.js?v=cKF5_SXiQ85BhW-fTYRB9A:2 GET http://xxxxx/index.php?module=Emails&action=ImportView&_=1666952964408 500 (Internal Server Error)

Context

High priority: A corresponding allocation of the emails in SuiteCRM is therefore not possible, so that consistent documentation can no longer be guaranteed - the CRM system becomes unusable.

Your Environment

  • SuiteCRM Version used: 7.12.4/5/6/7
  • Browser Googel Chrome: Version 106.0.5249.119, Firefox 106.0.2
  • "smarty/smarty": "^2.6",
  • PHP Version 8.0.20, Apache,
  • MariaDB 10.5
Originally created by @C42AT on GitHub (Oct 28, 2022). <!--- Provide a general summary of the issue in the **Title** above --> <!--- Before you open an issue, please check if a similar issue already exists or has been closed before. ---> <!--- If you have discovered a security risk please report it by emailing security@suitecrm.com. This will be delivered to the product team who handle security issues. Please don't disclose security bugs publicly until they have been handled by the security team. ---> <!--- Please be aware that as of the 31st January 2022 we no longer support 7.10.x. New issues referring to 7.10.x will only be valid if applicable to 7.12.x and above. If your issue is still applicable in 7.12.x, please create the issue following the template below --> #### Issue Since version 7.12.4 an email import is no longer possible #### Expected Behavior Since version 7.12.4 an email import is no longer possible -> Modal "An error has occurred" -> http://xxxxxxx/index.php?module=Emails&action=ImportView&_=1666952964408 -> HTTP 500 Response #### Actual Behavior PHP Error-LOG: `Fatal error: Uncaught TypeError: Unsupported operand types: string % int in /bitnami/suitecrm/cache/smarty/templates_c/%%1A^1AB^1AB6DD00%%tab_panel_content.tpl.php:194 Stack trace: #0 /bitnami/suitecrm/vendor/smarty/smarty/libs/Smarty.class.php(1875): include() #1 /bitnami/suitecrm/include/Sugar_Smarty.php(168): Smarty->_smarty_include() #2 /bitnami/suitecrm/cache/smarty/templates_c/%%A2^A25^A25BDAE8%%ImportView.tpl.php(156): Sugar_Smarty->_smarty_include() #3 /bitnami/suitecrm/vendor/smarty/smarty/libs/Smarty.class.php(1269): include('...') #4 /bitnami/suitecrm/include/Sugar_Smarty.php(151): Smarty->fetch() #5 /bitnami/suitecrm/include/TemplateHandler/TemplateHandler.php(172): Sugar_Smarty->fetch() #6 /bitnami/suitecrm/include/TemplateHandler/TemplateHandler.php(361): TemplateHandler->buildTemplate() #7 /bitnami/suitecrm/include/EditView/EditView2.php(934): TemplateHandler->displayTemplate() #8 /bitnami/suitecrm/include/MVC/View/views/view.edit.php(104): EditView->display() #9 /bitnami/suitecrm/include/MVC/View/SugarView.php(210): ViewEdit->display() #10 /bitnami/suitecrm/include/MVC/Controller/SugarController.php(432): SugarView->process() #11 /bitnami/suitecrm/include/MVC/Controller/SugarController.php(363): SugarController->processView() #12 /bitnami/suitecrm/include/MVC/SugarApplication.php(101): SugarController->execute() #13 /bitnami/suitecrm/index.php(55): SugarApplication->execute() #14 {main} thrown in /bitnami/suitecrm/cache/smarty/templates_c/%%1A^1AB^1AB6DD00%%tab_panel_content.tpl.php on line 194` #### Steps to Reproduce 1. Menu -> Email (IMAP) 2. Mark or Open Email 3. Bulk Action or Single Action: IMPORT -> Broswer Console: sugar_grp1_jquery.js?v=cKF5_SXiQ85BhW-fTYRB9A:2 GET http://xxxxx/index.php?module=Emails&action=ImportView&_=1666952964408 500 (Internal Server Error) #### Context High priority: A corresponding allocation of the emails in SuiteCRM is therefore not possible, so that consistent documentation can no longer be guaranteed - the CRM system becomes unusable. #### Your Environment * SuiteCRM Version used: 7.12.4/5/6/7 * Browser Googel Chrome: Version 106.0.5249.119, Firefox 106.0.2 - "smarty/smarty": "^2.6", - PHP Version 8.0.20, Apache, - MariaDB 10.5
Author
Owner

@C42AT commented on GitHub (Oct 29, 2022):

Now I was able to further isolate the problem:

modules/Emails/include/ImportView/ImportView.tpl Line: 120
{{include file='themes/SuiteP/include/EditView/tab_panel_content.tpl'}}

-> themes/SuiteP/include/EditView/tab_panel_content.tpl Line: 140

{{if $col%2==1}}
                <div class="clear"></div>
                {{/if}}

Error:
Fatal error: Uncaught TypeError: Unsupported operand types: string % int in

This could be the solution: convert $col to int from $col%2 to $col|intval%2

                {{if $col|intval%2==1}}
                <div class="clear"></div>
                {{/if}}
@C42AT commented on GitHub (Oct 29, 2022): Now I was able to further isolate the problem: modules/Emails/include/ImportView/ImportView.tpl Line: 120 `{{include file='themes/SuiteP/include/EditView/tab_panel_content.tpl'}}` -> themes/SuiteP/include/EditView/tab_panel_content.tpl Line: 140 ``` {{if $col%2==1}} <div class="clear"></div> {{/if}} ``` Error: Fatal error: Uncaught TypeError: Unsupported operand types: string % int in This could be the solution: convert $col to int from **$col%2** to **$col|intval%2** ``` {{if $col|intval%2==1}} <div class="clear"></div> {{/if}} ```
Author
Owner

@alvanson commented on GitHub (Feb 9, 2023):

Confirmed that @C42AT's proposed solution solved the issue for me - SuiteCRM 7.13.1, PHP 8.0.27.

@alvanson commented on GitHub (Feb 9, 2023): Confirmed that @C42AT's proposed solution solved the issue for me - SuiteCRM 7.13.1, PHP 8.0.27.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4881
No description provided.