[Vtigercrm-developers] Sending Workflow Emails vt7.0.1

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Vtigercrm-developers] Sending Workflow Emails vt7.0.1

Alan Lord (News)
In a new system our customer is reporting that Workflow generated emails
are not being sent.

We have a simple workflow to send an email when the Assigned to gets
changed on a Lead... When I trigger the workflow, the email gets put in
the com_vtiger_workflowtask_queue table, and when the scheduler runs,
the email is removed from the table.

In the vtiger log, I can see when the email content is written into the
entity table, and when it is added to ModTracker, but not where it
actually gets sent out.

And these workflow generated emails never arrive.

Sending emails from the internal mail composer is fine.

I am not sure if this is related or not but I am seeing this error crop
up in the log (this is the SendReminder task, not the Workflow task):

> Tue Aug  8 07:15:03 2017,279 [20638] DEBUG SendReminder - Prepared sql query parameters : [4004]
> Tue Aug  8 07:15:03 2017,279 [20638] INFO VT - PearDatabase ->ADODB error  Query Failed:SELECT vtiger_leaddetails.salutation AS vtiger_leaddetailssalutationtype,vtiger_leaddetails.firstname AS vtiger_leaddetailsfirstname,vtiger_leaddetails.lead_no AS vtiger_leaddetailslead_no,vtiger_leadaddress.phone AS vtiger_leadaddressphone,vtiger_leaddetails.lastname AS vtiger_leaddetailslastname,vtiger_leadaddress.mobile AS vtiger_leadaddressmobile,vtiger_leaddetails.company AS vtiger_leaddetailscompany,vtiger_leadaddress.fax AS vtiger_leadaddressfax,vtiger_leaddetails.designation AS vtiger_leaddetailsdesignation,vtiger_leaddetails.email AS vtiger_leaddetailsemail,vtiger_leaddetails.leadsource AS vtiger_leaddetailsleadsource,vtiger_leadsubdetails.website AS vtiger_leadsubdetailswebsite,vtiger_leaddetails.industry AS vtiger_leaddetailsindustry,vtiger_leaddetails.leadstatus AS vtiger_leaddetailsleadstatus,vtiger_leaddetails.annualrevenue AS vtiger_leaddetailsannualrevenue,vtiger_leaddet!
 ails.rating AS vtiger_leaddetailsrating,vtiger_leaddetails.noofemployees AS vtiger_leaddetailsnoofemployees,vtiger_crmentity.smownerid AS vtiger_crmentityassigned_user_id,vtiger_leaddetails.secondaryemail AS vtiger_leaddetailssecondaryemail,vtiger_crmentity.createdtime AS vtiger_crmentitycreatedtime,vtiger_crmentity.modifiedtime AS vtiger_crmentitymodifiedtime,vtiger_crmentity.modifiedby AS vtiger_crmentitymodifiedby,vtiger_leadaddress.lane AS vtiger_leadaddresslane,vtiger_leadaddress.code AS vtiger_leadaddresscode,vtiger_leadaddress.city AS vtiger_leadaddresscity,vtiger_leadaddress.country AS vtiger_leadaddresscountry,vtiger_leadaddress.state AS vtiger_leadaddressstate,vtiger_leadaddress.pobox AS vtiger_leadaddresspobox,vtiger_crmentity.description AS vtiger_crmentitydescription,vtiger_leaddetails.emailoptout AS vtiger_leaddetailsemailoptout,vtiger_crmentity.source AS vtiger_crmentitysource,vtiger_leads_user_field.starred AS vtiger_leads_user_fieldstarred,vtiger_leaddetail!
 s.tags AS vtiger_leaddetailstags,vtiger_leadscf.cf_1844 AS vtiger_leads
cfcf_1844,vtiger_crmentity.deleted, vtiger_crmentity.label FROM  vtiger_crmentity LEFT JOIN vtiger_leaddetails ON (vtiger_leaddetails.leadid = vtiger_crmentity.crmid  ) LEFT JOIN vtiger_leadsubdetails ON (vtiger_leadsubdetails.leadsubscriptionid = vtiger_crmentity.crmid  ) LEFT JOIN vtiger_leadaddress ON (vtiger_leadaddress.leadaddressid = vtiger_crmentity.crmid  ) LEFT JOIN vtiger_leadscf ON (vtiger_leadscf.leadid = vtiger_crmentity.crmid  ) WHERE  vtiger_crmentity.crmid=?  LIMIT 1::->[1054]Unknown column 'vtiger_leads_user_field.starred' in 'field list'


Any bright ideas?

Al

_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sending Workflow Emails vt7.0.1

Alan Lord (News)
On one of our dev servers I am trying to diagnose this issue.

Once the Outgoing server is configured I can send emails using the
internal mail composer, and I get the email message about having
successfully configured the outgoing server.

However, when I trigger the default workflow email for Contact
modification which send the Assigned user an email, the email is
generated and added to the queue table in the database.

When I run the workflow scheduler, the record is removed from the queue
and in the log file I can see new Email records being added and
ModTracker entries being written, but there is *nothing* about actually
sending the email... And, the email doesn't arrive (I am the assigned user).

Is anyone else seeing this problem?

I have error_reporting set to max (except for E_NOTICE) and the debug
log enabled but I am seeing nothing to help me track this down?

TIA

Al


On 08/08/17 08:38, Alan Lord wrote:

> In a new system our customer is reporting that Workflow generated emails
> are not being sent.
>
> We have a simple workflow to send an email when the Assigned to gets
> changed on a Lead... When I trigger the workflow, the email gets put in
> the com_vtiger_workflowtask_queue table, and when the scheduler runs,
> the email is removed from the table.
>
> In the vtiger log, I can see when the email content is written into the
> entity table, and when it is added to ModTracker, but not where it
> actually gets sent out.
>
> And these workflow generated emails never arrive.
>
> Sending emails from the internal mail composer is fine.



_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sending Workflow Emails vt7.0.1

Alan Lord (News)
I think I have tracked down a problem:
Here we retrieve the Send Email Task (6) from the database:

> Thu Aug 17 09:06:22 2017,653 [622] DEBUG VT - Prepared sql query being executed : select task from com_vtiger_workflowtasks where task_id=?
> Thu Aug 17 09:06:22 2017,653 [622] DEBUG VT - Prepared sql query parameters : [6]

I added some debug statement in com_vtiger_workflow.service

> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT - In com_vtiger_workflow.service. About to getCachedEntity 12x477
> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT - Returned Entity:
> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT -
> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT - Prepared sql query being executed : select * from vtiger_ws_entity where id=?
> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT - Prepared sql query parameters : [12x477]

See above - the query is "select * from vtiger_ws_entity where id =
'12x477';

This is in VtigerWebserviceObject.php the static function
fromId($adb,$entityId)

I don't think that is ever going to return a result. The wsentity string
"12x477" needs to have been separated before this point.

In the  com_vtiger_workflow.service I cannot see where this is supposed
to happen.

> function vtRunTaskJob($adb){
> $util = new VTWorkflowUtils();
> $adminUser = $util->adminUser();
> $tq = new VTTaskQueue($adb);
> $readyTasks = $tq->getReadyTasks();
> $tm = new VTTaskManager($adb);
> foreach($readyTasks as $taskDetails){
> list($taskId, $entityId, $taskContents, $relatedInfo) = $taskDetails;
> $task = $tm->retrieveTask($taskId);
> //If task is not there then continue
> if(empty($task)){
> continue;
> }
> $task->setContents($taskContents);
> $task->setRelatedInfo($relatedInfo);
> $entity = VTEntityCache::getCachedEntity($entityId);
> if(!$entity) {
> $entity = new VTWorkflowEntity($adminUser, $entityId);
> }
>
> $task->doTask($entity);
> }
> }

Am I missing something or is this never going to work?

Al


On 17/08/17 09:53, Alan Lord wrote:

> On one of our dev servers I am trying to diagnose this issue.
>
> Once the Outgoing server is configured I can send emails using the
> internal mail composer, and I get the email message about having
> successfully configured the outgoing server.
>
> However, when I trigger the default workflow email for Contact
> modification which send the Assigned user an email, the email is
> generated and added to the queue table in the database.
>
> When I run the workflow scheduler, the record is removed from the queue
> and in the log file I can see new Email records being added and
> ModTracker entries being written, but there is *nothing* about actually
> sending the email... And, the email doesn't arrive (I am the assigned
> user).
>
> Is anyone else seeing this problem?
>
> I have error_reporting set to max (except for E_NOTICE) and the debug
> log enabled but I am seeing nothing to help me track this down?



_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sending Workflow Emails vt7.0.1 [RESOLVED]

Alan Lord (News)
Please ignore me.

I was having a senior moment ;-)

Al

On 17/08/17 10:19, Alan Lord wrote:

> I think I have tracked down a problem:
> Here we retrieve the Send Email Task (6) from the database:
>
>> Thu Aug 17 09:06:22 2017,653 [622] DEBUG VT - Prepared sql query being
>> executed : select task from com_vtiger_workflowtasks where task_id=?
>> Thu Aug 17 09:06:22 2017,653 [622] DEBUG VT - Prepared sql query
>> parameters : [6]
>
> I added some debug statement in com_vtiger_workflow.service
>
>> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT - In
>> com_vtiger_workflow.service. About to getCachedEntity 12x477
>> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT - Returned Entity:
>> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT - Thu Aug 17 09:06:22
>> 2017,657 [622] DEBUG VT - Prepared sql query being executed : select *
>> from vtiger_ws_entity where id=?
>> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT - Prepared sql query
>> parameters : [12x477]
>
> See above - the query is "select * from vtiger_ws_entity where id =
> '12x477';
>
> This is in VtigerWebserviceObject.php the static function
> fromId($adb,$entityId)
>
> I don't think that is ever going to return a result. The wsentity string
> "12x477" needs to have been separated before this point.
>
> In the  com_vtiger_workflow.service I cannot see where this is supposed
> to happen.
>
>> function vtRunTaskJob($adb){
>>     $util = new VTWorkflowUtils();
>>     $adminUser = $util->adminUser();
>>     $tq = new VTTaskQueue($adb);
>>     $readyTasks = $tq->getReadyTasks();
>>     $tm = new VTTaskManager($adb);
>>     foreach($readyTasks as $taskDetails){
>>         list($taskId, $entityId, $taskContents, $relatedInfo) =
>> $taskDetails;
>>         $task = $tm->retrieveTask($taskId);
>>         //If task is not there then continue
>>         if(empty($task)){
>>             continue;
>>         }
>>         $task->setContents($taskContents);
>>         $task->setRelatedInfo($relatedInfo);
>>         $entity = VTEntityCache::getCachedEntity($entityId);
>>         if(!$entity) {
>>             $entity = new VTWorkflowEntity($adminUser, $entityId);
>>         }
>>
>>         $task->doTask($entity);
>>     }
>> }
>
> Am I missing something or is this never going to work?
>
> Al
>
>
> On 17/08/17 09:53, Alan Lord wrote:
>> On one of our dev servers I am trying to diagnose this issue.
>>
>> Once the Outgoing server is configured I can send emails using the
>> internal mail composer, and I get the email message about having
>> successfully configured the outgoing server.
>>
>> However, when I trigger the default workflow email for Contact
>> modification which send the Assigned user an email, the email is
>> generated and added to the queue table in the database.
>>
>> When I run the workflow scheduler, the record is removed from the
>> queue and in the log file I can see new Email records being added and
>> ModTracker entries being written, but there is *nothing* about
>> actually sending the email... And, the email doesn't arrive (I am the
>> assigned user).
>>
>> Is anyone else seeing this problem?
>>
>> I have error_reporting set to max (except for E_NOTICE) and the debug
>> log enabled but I am seeing nothing to help me track this down?
>
>
>
> _______________________________________________
> http://www.vtiger.com/
>


_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Vtigercrm-developers] Left nav menu on mobile devices

Chris Thompson

Can someone else please verify that vtiger 7.x left nave menus don't work
on a mobile device so we can get this looked at.

_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Left nav menu on mobile devices

lajeesh k-2
yes, there is issues


Regards,
Lajeesh

On Thu, Aug 17, 2017 at 10:50 PM, <[hidden email]> wrote:

Can someone else please verify that vtiger 7.x left nave menus don't work
on a mobile device so we can get this looked at.

_______________________________________________
http://www.vtiger.com/


_______________________________________________
http://www.vtiger.com/
Loading...