Jump to content


Internal Events

events internal

9 replies to this topic

#1 lawshosting

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts

Posted 11 February 2012 - 09:37 AM

v4.0.1.2

Probably no a bug, but.....

Ok, I added an event to display an internal message box or even play a wave sound, however, the triggers (10 seconds of a specific page, eg. order and invoice page) are not triggering any of these. Not sure how to debug this.

My visitor poll frequency is 15 seconds - doubt this has anything to do with anything as my chat invitation event works and some of that has 5 seconds for the triggers.

Any ideas?

#2 Patrick Keil

    Administrator

  • Administrators
  • 595 posts
  • LocationSingen, Germany

Posted 13 February 2012 - 08:06 AM

I've set up the same scenario in v4.0.1.2 and it works fine for me. The message box appears after ~20 seconds.

In most cases, one of these triggers is the problem:
1.) Visitor was not in chat before, Visitor has not declined / accepted an invitation.
2.) Wildcard in URL setup is missing or in wrong position

I would recommend to setup a fresh event and add the criterias one after the other. When you are testing, do forget to open a new browser instance once an event has been triggered.

Good luck.

#3 lawshosting

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts

Posted 13 February 2012 - 11:40 AM

I know the problem.. It works for plain urls, but if you add parameters (i.e order.php?step=2, index.php?billinvoice=*, etc), it fails to trigger it?

#4 lawshosting

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts

Posted 13 February 2012 - 11:40 AM

double post

Edited by lawshosting, 13 February 2012 - 11:42 AM.


#5 Patrick Keil

    Administrator

  • Administrators
  • 595 posts
  • LocationSingen, Germany

Posted 13 February 2012 - 01:17 PM

Quote

it fails to trigger it?
Yes, I can confirm a problem here.

I was testing with *?param1=value2* this morning which works fine.
However, *index?param1=value2* causes an error in the regular expression parser.

A quickfix is already available if you don't want to wait for the next update:

1.) Find file_lib/functions.global.inc.php on your webserver within the LiveZilla installations folder
2.) Create a backup of this file
3.) Open the file and search for:
function jokerCompare($_template,$_comparer)
{
if($_template=="*")
  return true;
$_template = strtolower($_template);
$_comparer = strtolower($_comparer);
$b0 = (stristr($_comparer, str_replace("*","",$_template)) !== false);
$_template = str_replace("*","(.*)",$_template);
$spacer = md5(rand());
$b1 = (@preg_match("(".$spacer.$_template.$spacer.")",$spacer.$_comparer.$spacer,$out)>0);
return $b1 && $b0;
}

4.) Replace with:
function jokerCompare($_template,$_comparer)
{
if($_template=="*")
  return true;
 
$spacer = md5(rand());
$_template = str_replace("?",$spacer,strtolower($_template));
$_comparer = str_replace("?",$spacer,strtolower($_comparer));
$b0 = (stristr($_comparer, str_replace("*","",$_template)) !== false);
$_template = str_replace("*","(.*)",$_template);
$b1 = (@preg_match("(".$spacer.$_template.$spacer.")",$spacer.$_comparer.$spacer,$out)>0);
return $b1 && $b0;
}


#6 lawshosting

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts

Posted 13 February 2012 - 03:03 PM

That worked, thanks. Will it recognise ampersands too? Or do we need to add extra code?

#7 lawshosting

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts

Posted 07 March 2012 - 12:10 AM

Found another one......

Quote

{url}index.php?fuse=clients&view=Invoice_View&billdetailid=426

If I want to monitor the above url with a sound with the following criteria, it doesn't trigger:

Quote

{url}/index.php?fuse=clients*billdetailid=*

but, if I use this, it will:

Quote

{url}/index.php?fuse=clients*


#8 Patrick Keil

    Administrator

  • Administrators
  • 595 posts
  • LocationSingen, Germany

Posted 07 March 2012 - 06:59 AM

Wildcards do currently only work on the in the beginning and at the end of an url.

However, this issue is already on our list.

#9 lawshosting

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts

Posted 07 March 2012 - 07:07 PM

Is there a quick fix for this (like the question mark parameters fix), if not, then I'll wait. Will it make 4.1?

#10 Derek Punzova

    Support Team Member

  • Moderators
  • 6057 posts

Posted 08 March 2012 - 07:15 AM

I've checked the function and it's just a minor change in the code:

1.) Find file_lib/functions.global.inc.php on your webserver within the LiveZilla installations folder
2.) Create a backup of this file
3.) Open the file and search for:
function jokerCompare($_template,$_comparer)
{
....
}

4.) Replace with:
function jokerCompare($_template,$_comparer)
{
if($_template=="*")
  return true;
 
$spacer = md5(rand());
$_template = str_replace("?",$spacer,strtolower($_template));
$_comparer = str_replace("?",$spacer,strtolower($_comparer));
$_template = str_replace("*","(.*)",$_template);
return (preg_match("(".$spacer.$_template.$spacer.")",$spacer.$_comparer.$spacer)>0);
}

- If you like to suggest a new feature, please click here.
Kind Regards,
Derek





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users