[Vtigercrm-developers] Send SMS Workflow adding 2 x <br>

Alan Lord alanslists at gmail.com
Wed Jan 27 11:17:52 GMT 2016


This is very recent new installation of vtiger 6.4.0.

Our customer has set up several workflows on Tickets which send an SMS 
message to the customer when certain events happen.

He has reported that, whilst testing, on his mobile when he receives the 
message it is displayed with 2 x "<br>" in the message.

I have looked at the com_vtiger_workflowtasks table and the <br>s are 
not in the text of the worklfow task.

I have grepped the SMSNotifier module directories for 'br' and found 
nothing of interest.

However, in the vtiger_smsnotifier table there are records like this:

> From ****/**** Helpdesk: Ticket ref: TT134917. Update: <br><br>comment added to sms ticket.  DO NOT reply to this message.  Call **** *** **** or email helpdesk@****.co.uk

The Workflow is using the placeholder "$lastComment".

I traced this to modules/com_vtiger_workflow/VTSimpleTemplate.inc in the 
function getComments().

It adds 2 x <br> to the message as in:

> 		for ($i=0; $i<$numOfRows; $i++) {
> 			$comment = $adb->query_result($result, $i, 'commentcontent');
> 			if ($comment != '') {
> 				$commentsList .= '<br><br>' . nl2br($comment);
> 			}
> 		}

This is OK for emails (I guess) but not for SMS...

I have reported this as a bug.

Thanks

Al



More information about the vtigercrm-developers mailing list