Chat 2 by Siropu

Chat 2 by Siropu [Paid] 2.4.6

No permission to buy (€29.99)
Submit /nick your nickname as the chat message to set a nick name. Then you can start posting messages.
Btw, the demo is Chat 2 not this chat.
 
@Jumuro, the error is caused by a recent change I've made and forgot to update the code in some places. It is sorted for Beta 2 :)
@marquisite, can't reproduce bug 1 on both Chrome and Firefox. The other issues will be fixed in Beta 2.

Would you mind to provide a method to alter the data in each controller or shift the code from the data trait into something like a repository?
I've made some changes. :)
 
How do I use the custom position option? I would like to place the chatbox above the forum list, sidebar and the "New posts" and "New thread" buttons.
 
Seems the chat breaks user registration.

XF\Db\Exception: MySQL query error [1364]: Field 'siropu_chat_rooms' doesn't have a default value src/XF/Db/AbstractStatement.php:212
Generated by: Unknown account
Oct 24, 2017 at 2:36 AM
Stack trace
INSERT INTO xf_user (`visible`, `activity_visible`, `user_group_id`, `timezone`, `language_id`, `username`, `email`, `display_style_group_id`, `secondary_group_ids`, `secret_key`, `user_id`, `style_id`, `permission_combination_id`, `message_count`, `alerts_unread`, `conversations_unread`, `register_date`, `last_activity`, `trophy_points`, `avatar_date`, `avatar_width`, `avatar_height`, `avatar_highdpi`, `gravatar`, `user_state`, `is_moderator`, `is_admin`, `is_staff`, `is_banned`, `like_count`, `custom_title`, `warning_points`, `xfrm_resource_count`, `xfmg_album_count`, `xfmg_media_count`, `xfmg_media_quota`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ------------
#0 src/XF/Db/Mysqli/Statement.php(174): XF\Db\AbstractStatement->getException('MySQL query err...', 1364, 'HY000') #1 src/XF/Db/Mysqli/Statement.php(69): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1364, 'HY000') #2 src/XF/Db/AbstractAdapter.php(69): XF\Db\Mysqli\Statement->execute() #3 src/XF/Db/AbstractAdapter.php(145): XF\Db\AbstractAdapter->query('INSERT INTO xf...', Array) #4 src/XF/Mvc/Entity/Entity.php(1343): XF\Db\AbstractAdapter->insert('xf_user', Array) #5 src/XF/Mvc/Entity/Entity.php(1085): XF\Mvc\Entity\Entity->_saveToSource() #6 src/XF/Service/User/Registration.php(254): XF\Mvc\Entity\Entity->save() #7 src/XF/Service/ValidateAndSavableTrait.php(40): XF\Service\User\Registration->_save() #8 src/XF/Pub/Controller/Register.php(367): XF\Service\User\Registration->save() #9 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Register->actionRegister(Object(XF\Mvc\ParameterBag)) #10 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Register', 'Register', 'json', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\Register), NULL) #11 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch)) #12 src/XF/App.php(1844): XF\Mvc\Dispatcher->run() #13 src/XF.php(328): XF\App->run() #14 index.php(13): XF::runApp('XF\\Pub\\App') #15 {main}
Code:
Request state
array(4) {
  ["url"] => string(18) "/register/register"
  ["referrer"] => string(23) "https://*******.com/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(14) {
    ["username"] => string(0) ""
    ["4e798d01614e883653565e2453d795531f4c6926"] => string(4) "****"
    ["18c92b3a1c725ac461344698d01736800f9bde00"] => string(0) ""
    ["e8f715070bb25adb376efbbf38173ca219f523d5"] => string(22) "*********.com"
    ["email"] => string(0) ""
    ["password"] => string(8) "********"
    ["bd6671a56fc17cb239bd04f3b1b24d539b936da8"] => string(8) "********"
    ["g-recaptcha-response"] => string(441) "03AHhf_51sdDa-4l9tlLPguRMFwsU-_BCgjll-JJJmAtt2VRWBXHxt87NLETPGZGvLJMZ2bkPl6GyHydfMSPTzwBrh9srk3uHg6dgfZOhm3o6FLlndeJvcUSixZvJ6YorivFtZichuIM4V_LjDSHTnyMjBe16V0lQDm6k1dK11Fskfze1RvXg2_mS4Okg2hUXEzKSAGNvcTvGf9MrhyAz54qK20XLO8xLd9l6jjhvKvRcC1lVE_S5K9zX8m4ZYUFOH7KnXOwrDqbYgy9-ZoT79pLGR8KuIejS4kSE6lQyUytWnG-3iJLx8dvxbH4X-FsitMKsckeyEGxcO9QXP1PDFFhfWYQT2VkbpG2oO-Ulf1NWVK-1MhQHAswTP1S3TLKgOZRSXHytV0opaoGuuSCpwhkljTwUnrsLJR-eF0T8yAm8aFPc6l8dah1o"
    ["reg_key"] => string(16) "k1hggsmppydZyjXa"
    ["6aa91022ad27d992222db30db9a78a7be072068a"] => string(13) "Europe/London"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(1) "/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
How do I use the custom position option? I would like to place the chatbox above the forum list, sidebar and the "New posts" and "New thread" buttons.
You would have to create a new widget position and place it in PAGE_CONTAINER below this line:
Code:
<xf:ad position="container_breadcrumb_top_below" />
If you want the widget only on the forum list, you would have to add the widget position code between this code:
Code:
<xf:if is="$template == 'forum_list'">
    widget position code here
</xf:if>
Seems the chat breaks user registration.
This seem to happen only when chat is disabled. It is fixed in Beta 2 but it will require a re-install.
 
Hello @Siropu

Thanks for your huge effort and support on your add-on.

Following bug coming from Beta 1 version

Re-produce steps;
1- Start private conversation on chat
2- Note it's link as (chat/conversation/ID/view)
3- Leave from that chat
4- Try to visit noted link

If ID isn't used, you will see classical "The requested conversation could not be found." warning
But if ID is used you will see following errors

An exception occurred: [Error] Cannot use object of type XF\Mvc\Reply\Error as array in internal_data/code_cache/templates/l1/s63/public/siropu_chat_conversation_view.php on line 6

XF\Template\Templater->{closure}() in src/XF/Template/Templater.php at line 1167
XF\Template\Templater->renderTemplate() in src/XF/Template/Template.php at line 24
XF\Template\Template->render() in src/XF/Mvc/Renderer/Html.php at line 48
XF\Mvc\Renderer\Html->renderView() in src/XF/Mvc/Dispatcher.php at line 332
XF\Mvc\Dispatcher->renderView() in src/XF/Mvc/Dispatcher.php at line 303
XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 44
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1844
XF\App->run() in src/XF.php at line 328
XF::runApp() in index.php at line 13

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Template public...', '/home/xenforotr...', 527, Array)
#1 src/XF/Template/Templater.php(527): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(484): XF\Template\Templater->getTemplateData('public', 'alert_conversat...')
#3 src/XF/Template/Templater.php(1166): XF\Template\Templater->getTemplateCode('public', 'alert_conversat...')
#4 src/XF/Alert/AbstractHandler.php(67): XF\Template\Templater->renderTemplate('alert_conversat...', Array)
#5 src/XF/Entity/UserAlert.php(67): XF\Alert\AbstractHandler->render(Object(XF\Entity\UserAlert))
#6 [internal function]: XF\Entity\UserAlert->render()
#7 src/XF/Template/Templater.php(875): call_user_func_array(Array, Array)
#8 internal_data/code_cache/templates/l1/s63/public/alert_macros.php(18): XF\Template\Templater->method(Object(XF\Entity\UserAlert), 'render', Array)
#9 src/XF/Template/Templater.php(598): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Array)
#10 internal_data/code_cache/templates/l1/s63/public/account_alerts.php(28): XF\Template\Templater->callMacro('alert_macros', 'row', Array, Array)
#11 src/XF/Template/Templater.php(1167): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#12 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('account_alerts', Array)
#13 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#14 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('XF:Account\\Aler...', 'public:account_...', Array)
#15 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#17 src/XF/App.php(1844): XF\Mvc\Dispatcher->run()
#18 src/XF.php(328): XF\App->run()
#19 index.php(13): XF::runApp('XF\\Pub\\App')
#20 {main}

#0 src/XF/Template/Templater.php(1167): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#1 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('siropu_chat_con...', Array)
#2 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#3 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('Siropu\\Chat:Con...', 'public:siropu_c...', Array)
#4 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#5 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#6 src/XF/App.php(1844): XF\Mvc\Dispatcher->run()
#7 src/XF.php(328): XF\App->run()
#8 index.php(13): XF::runApp('XF\\Pub\\App')
#9 {main}
 
Back
Top Bottom