Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error message when selecting email templates to send emails
#1
Error message when selecting email templates to send emails from modules Leads, Contacts, Organizations
Please help me.


Attached Files Thumbnail(s)
   
Reply
#2
fixed https://github.com/tsolucio/corebos/comm...42b0525254

thanks for informing!!
Joe
TSolucio
Reply
#3
With the last update, the user does not have Admin permissions, receiving an error message:

Fatal error: Uncaught exception 'WebServiceException' with message 'Permission to perform the operation is denied' in C:\xampp\htdocs\include\Webservices\Retrieve.php:40 Stack trace: #0 C:\xampp\htdocs\modules\com_vtiger_workflow\VTEntityCache.inc(25): vtws_retrieve('46x8120', Object(Users)) #1 C:\xampp\htdocs\modules\com_vtiger_workflow\VTEntityCache.inc(116): VTWorkflowEntity->__construct(Object(Users), '46x8120', false) #2 C:\xampp\htdocs\modules\com_vtiger_workflow\VTSimpleTemplate.inc(23): VTEntityCache->forId('46x8120') #3 C:\xampp\htdocs\include\utils\CommonUtils.php(2404): VTSimpleTemplate->render(Object(VTEntityCache), '46x8120') #4 C:\xampp\htdocs\include\utils\CommonUtils.php(2326): getMergedDescription('<p><span style=...', '8811', 'Leads') #5 C:\xampp\htdocs\modules\MsgTemplate\TemplateMerge.php(28): getTemplateDetails('38474', '8811') #6 C:\xampp\htdocs\include\Ajax\CommonAjax.php(22): require_once('C:\\xampp\\htdocs...') #7 C:\xampp\htdocs\modules\MsgTemplate\MsgTemplateAjax.php(10): require_once('C:\\xampp in C:\xampp\htdocs\include\Webservices\Retrieve.php on line 40
Reply
#4
This should be fixed with this change:

https://github.com/tsolucio/corebos/comm...58f5fbbef1

The issue is that now we always merge the email template with the company details, so you can use the fields in the cbCompany module to define a footer in the email template. In your case, you have either deactivated the module or made it private so the user cannot access this information. The code I added checks if the user has permission and will not merge the company variables if he doesn't. I am explaining this because it may be a good idea to give read access to all users to the company module so the email templates variables get substituted, as it is now they will remain unmerged in your application.

Let me know how it goes
Joe
TSolucio
Reply
#5
Email template has been selected, but when click send email, will see this error message:

Fatal error: Uncaught exception 'WebServiceException' with message 'Permission to perform the operation is denied' in C:\xampp\htdocs\include\Webservices\Retrieve.php:40 Stack trace: #0 C:\xampp\htdocs\modules\com_vtiger_workflow\VTEntityCache.inc(25): vtws_retrieve('19x8', Object(Users)) #1 C:\xampp\htdocs\modules\com_vtiger_workflow\VTEntityCache.inc(116): VTWorkflowEntity->__construct(Object(Users), '19x8', false) #2 C:\xampp\htdocs\modules\com_vtiger_workflow\VTSimpleTemplate.inc(23): VTEntityCache->forId('19x8') #3 C:\xampp\htdocs\include\utils\CommonUtils.php(2393): VTSimpleTemplate->render(Object(VTEntityCache), '19x8') #4 C:\xampp\htdocs\modules\Emails\mailsend.php(117): getMergedDescription('DEMO COMPANY...', '8', 'Users') #5 C:\xampp\htdocs\modules\Emails\Save.php(185): include('C:\\xampp\\htdocs...') #6 C:\xampp\htdocs\index.php(485): include_once('C:\\xampp\\htdocs...') #7 {main} thrown in C:\xampp\htdocs\include\Webservices\Retrieve.php on line 40

PS: has enabled the cbCompany module with all permissions
Reply
#6
try with this change

https://github.com/tsolucio/corebos/comm...3b6704a7f3

sorry for the delay
Joe
TSolucio
Reply
#7
(05-29-2019, 10:56 AM)joebordes Wrote: try with this change

https://github.com/tsolucio/corebos/comm...3b6704a7f3

sorry for the delay

continue to receive error messages

Fatal error: Call to a member function forId() on null in C:\xampp\htdocs\modules\com_vtiger_workflow\VTSimpleTemplate.inc on line 23
Reply
#8
fixed: https://github.com/tsolucio/corebos/comm...7abd3b40ec

I sent an email as a normal user
Joe
TSolucio
Reply
#9
(05-29-2019, 03:36 PM)joebordes Wrote: fixed:  https://github.com/tsolucio/corebos/comm...7abd3b40ec

I sent an email as a normal user

Leads and Organization modules have already sent mail. Only the Contacts module has the following error message:


Fatal error: Uncaught exception 'WebServiceException' with message 'Permission to read given object is denied' in C:\xampp\htdocs\include\Webservices\Retrieve.php:51 Stack trace: #0 C:\xampp\htdocs\modules\com_vtiger_workflow\VTEntityCache.inc(25): vtws_retrieve('11x8462', Object(Users)) #1 C:\xampp\htdocs\modules\com_vtiger_workflow\VTEntityCache.inc(116): VTWorkflowEntity->__construct(Object(Users), '11x8462', false) #2 C:\xampp\htdocs\modules\com_vtiger_workflow\VTSimpleTemplate.inc(23): VTEntityCache->forId('11x8462') #3 C:\xampp\htdocs\include\utils\CommonUtils.php(2378): VTSimpleTemplate->render(Object(VTEntityCache), '11x8462') #4 C:\xampp\htdocs\modules\Emails\mailsend.php(122): getMergedDescription('TEST', '8462', 'Accounts') #5 C:\xampp\htdocs\modules\Emails\Save.php(185): include('C:\\xampp\\htdocs...') #6 C:\xampp\htdocs\index.php(485): include_once('C:\\xampp\\htdocs...') #7 {main} thrown in C:\xampp\htdocs\include\Webservices\Retrieve.php on line 51
Reply
#10
I can't reproduce it but from the error stack I understand that your user does not have access to the account related to the contact and that is where it fails, as the merge tries to always access the related account of the record being sent to.

I added a check similar to the one I added for cbCompany, update again and give it a try please
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)