krilor / wp-chatbot

Simple Wordpress Plugin to add any chatbot to your web page
GNU General Public License v3.0
20 stars 18 forks source link

Integration to Api.ai not working #50

Open agustina-biscayart-movile opened 7 years ago

agustina-biscayart-movile commented 7 years ago

Hi Krilor,

I have your plugin integrated directly with api.ai and I get this error when I send a message:

image

Any ideas?

Thanks!

agustina-biscayart-movile commented 7 years ago

Hi again,

This is the stack trace, in case you have time to take a look at this issue:

[28-Aug-2017 13:18:13 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function WP_Chatbot_JsonPath::evalx(), 2 passed in /opt/lampp/apps/ejercito/htdocs/wp-content/plugins/wp-chatbot/assets/jsonpath.php on line 85 and exactly 3 expected in /opt/lampp/apps/ejercito/htdocs/wp-content/plugins/wp-chatbot/assets/jsonpath.php:102
Stack trace:
#0 /opt/lampp/apps/ejercito/htdocs/wp-content/plugins/wp-chatbot/assets/jsonpath.php(85): WP_Chatbot_JsonPath->evalx('@["platform"] =...', Array)
#1 /opt/lampp/apps/ejercito/htdocs/wp-content/plugins/wp-chatbot/assets/jsonpath.php(89): WP_Chatbot_JsonPath->_callback_05(0, '?(@["platform"]...', '', Array, '$;result;fulfil...')
#2 /opt/lampp/apps/ejercito/htdocs/wp-content/plugins/wp-chatbot/assets/jsonpath.php(76): WP_Chatbot_JsonPath->walk('?(@["platform"]...', '', Array, '$;result;fulfil...', Array)
#3 /opt/lampp/apps/ejercito/htdocs/wp-content/plugins/wp-chatbot/assets/jsonpath.php(63): WP_Chatbot_JsonPath->trace('?(@["platform"]...', Array, '$;result;fulfil...')
#4 /opt/lampp/apps/ejercito/htd in /opt/lampp/apps/ejercito/htdocs/wp-content/plugins/wp-chatbot/assets/jsonpath.php on line 102

Thanks!