Title: Error caused by ChatBox on jQuery code
Last modified: August 22, 2016

---

# Error caused by ChatBox on jQuery code

 *  [joao.parana](https://wordpress.org/support/users/joaoparana/)
 * (@joaoparana)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-caused-by-chatbox-on-jquery-code/)
 * Plugin Version: 1.0.40
 * Hi Dallas,
 * see on [this link](https://docs.google.com/document/d/173ig1NSirEq64593yZF-y8UsC2zmckHpdYpEaT2iKUw/edit?usp=sharing)
   the screen shot showing the error caused by the ChatBox on jQuery code in my 
   site ([http://filrio.com.br](http://filrio.com.br)).
 * The problem is this data below passed by as parameter to parseJSON method:
 * “
    <b>Notice</b>: Undefined variable: agent_id in <b>filrio.com.br/wp-content/
   plugins/lively-chat-support/shared/includes/functions.php</b> on line <b>84</
   b> {“messages”:[],”agent_id”:null,”latest_id”:”0″}”
 * What is going on ?
 * [https://wordpress.org/plugins/lively-chat-support/](https://wordpress.org/plugins/lively-chat-support/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Anonymous User 9782929
 * (@anonymized-9782929)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-caused-by-chatbox-on-jquery-code/#post-5326348)
 * Do you have an agent checked off as active on the Aegents tab?
 *  Thread Starter [joao.parana](https://wordpress.org/support/users/joaoparana/)
 * (@joaoparana)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-caused-by-chatbox-on-jquery-code/#post-5326372)
 * Yes.
 *  Anonymous User 9782929
 * (@anonymized-9782929)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-caused-by-chatbox-on-jquery-code/#post-5326386)
 * Can you invite me (dallas@excitecreative.ca) to the WP Admin area through the
   Users tab?
 *  Anonymous User 9782929
 * (@anonymized-9782929)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-caused-by-chatbox-on-jquery-code/#post-5326423)
 * Maybe try adding an extra line at the beginning of the function (around line 
   65):
    `$agent_id = 0;`
 * Let me know if that fixes it!
 *  Thread Starter [joao.parana](https://wordpress.org/support/users/joaoparana/)
 * (@joaoparana)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/error-caused-by-chatbox-on-jquery-code/#post-5326532)
 * Which file ? admin/includes/functions.php or shared/includes/functions.php ?
 * See below the result from find linux command :
 *  find . -name “*.php” -print -exec grep “\$agent_id” {} \;
    ./admin/includes/
   functions.php $agent_id = get_current_user_id(); $convos = $wpdb->get_results(“
   SELECT DISTINCT $convos_table.* FROM $convos_table INNER JOIN $messages_table
   ON $convos_table.token = $messages_table.convo_token WHERE $convos_table.agent_id
   = ‘$agent_id’ AND $messages_table.created_at >= ‘$start’ AND $messages_table.
   created_at <= ‘$finish'”); ./shared/includes/functions.php $agent_id = 0; $agent_id
   = get_current_user_id(); $messages = $wpdb->get_results(“SELECT * FROM $messages_table
   INNER JOIN $convos_table ON $convos_table.token = $messages_table.convo_token
   WHERE $convos_table.agent_id = ‘$agent_id’ AND $messages_table.id > ‘$id'”); “
   agent_id” => $agent_id,
 *  Anonymous User 9782929
 * (@anonymized-9782929)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/error-caused-by-chatbox-on-jquery-code/#post-5326536)
 * Line 65 of lively-chat-support/shared/includes/functions.php.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Error caused by ChatBox on jQuery code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/lively-chat-support_928b67.svg)
 * [Lively Chat via SMS](https://wordpress.org/plugins/lively-chat-support/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lively-chat-support/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lively-chat-support/)
 * [Active Topics](https://wordpress.org/support/plugin/lively-chat-support/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lively-chat-support/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lively-chat-support/reviews/)

## Tags

 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * 6 replies
 * 2 participants
 * Last reply from: Anonymous User 9782929
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/error-caused-by-chatbox-on-jquery-code/#post-5326536)
 * Status: not resolved