Discord Not a Bug I am getting errors!

Ades

Member
Hi,

I recently purchased your add-on, and when I enable it, I am getting the following error :

Code:
#0 src/addons/NF/Discord/Api.php(102): XF::handlePhpError(2, '[E_WARNING] Ill...', '/home2/testftp...', 102, Array)
#1 src/addons/NF/Discord/XF/Admin/Controller/Forum.php(21): NF\Discord\Api->getChannels(0)
#2 src/XF/Admin/Controller/AbstractNode.php(59): NF\Discord\XF\Admin\Controller\Forum->nodeAddEdit(Object(ThemeHouse\Nodes\XF\Entity\Node))
#3 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\AbstractNode->actionEdit(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Forum', 'Edit', 'html', Object(XF\Mvc\ParameterBag), 'nodes', Object(LiamW\ThreadSolutions\XF\Admin\Controller\Forum), NULL)
#5 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#7 src/XF.php(328): XF\App->run()
#8 admin.php(13): XF::runApp('XF\\Admin\\App')
#9 {main}

Code:
array(4) {
  ["url"] => string(48) "/admin.php?forums/news-informations.12/edit"
  ["referrer"] => string(45) "http://domain.name/admin.php?nodes/"
  ["_GET"] => array(1) {
   ["forums/news-informations_12/edit"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

I appear when I want to edit a node, thank you !
 

Ades

Member
What’s the actual error you’re getting?
When I am going to ACP -> Forums -> Nodes -> and I want to edit a forum, I got this :

Code:
ErrorException: [E_WARNING] Illegal string offset 'type' in src/addons/NF/Discord/Api.php at line 102
[LIST=1]
[*]XF::handlePhpError() in src/addons/NF/Discord/Api.php at line 102
[*]NF\Discord\Api->getChannels() in src/addons/NF/Discord/XF/Admin/Controller/Forum.php at line 21
[*]NF\Discord\XF\Admin\Controller\Forum->nodeAddEdit() in src/XF/Admin/Controller/AbstractNode.php at line 59
[*]XF\Admin\Controller\AbstractNode->actionEdit() in src/XF/Mvc/Dispatcher.php at line 249
[*]XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
[*]XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
[*]XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1931
[*]XF\App->run() in src/XF.php at line 328
[*]XF::runApp() in admin.php at line 13
[/LIST]

and when I going to ACP -> Discord -> Discord channels, I am getting this :

Code:
ErrorException: [E_WARNING] Illegal string offset 'type' in src/addons/NF/Discord/Api.php at line 102
[LIST=1]
[*]XF::handlePhpError() in src/addons/NF/Discord/Api.php at line 102
[*]NF\Discord\Api->getChannels() in src/addons/NF/Discord/Admin/Controller/Channel.php at line 17
[*]NF\Discord\Admin\Controller\Channel->actionIndex() in src/XF/Mvc/Dispatcher.php at line 249
[*]XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
[*]XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
[*]XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1931
[*]XF\App->run() in src/XF.php at line 328
[*]XF::runApp() in admin.php at line 13
[/LIST]
Same thing with Discord roles :

Code:
ErrorException: [E_WARNING] Cannot use a scalar value as an array in src/addons/NF/Discord/Api.php at line 254
[LIST=1]
[*]XF::handlePhpError() in src/addons/NF/Discord/Api.php at line 254
[*]NF\Discord\Api->getRoles() in src/addons/NF/Discord/Admin/Controller/Role.php at line 18
[*]NF\Discord\Admin\Controller\Role->actionIndex() in src/XF/Mvc/Dispatcher.php at line 249
[*]XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
[*]XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
[*]XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1931
[*]XF\App->run() in src/XF.php at line 328
[*]XF::runApp() in admin.php at line 13
[/LIST]
I can give you admins permissions if you want, thanks!
 
Last edited:

NixFifty

Administrator
Staff member
When I am going to ACP -> Forums -> Nodes -> and I want to edit a forum, I got this :

Code:
ErrorException: [E_WARNING] Illegal string offset 'type' in src/addons/NF/Discord/Api.php at line 102
[LIST=1]
[*]XF::handlePhpError() in src/addons/NF/Discord/Api.php at line 102
[*]NF\Discord\Api->getChannels() in src/addons/NF/Discord/XF/Admin/Controller/Forum.php at line 21
[*]NF\Discord\XF\Admin\Controller\Forum->nodeAddEdit() in src/XF/Admin/Controller/AbstractNode.php at line 59
[*]XF\Admin\Controller\AbstractNode->actionEdit() in src/XF/Mvc/Dispatcher.php at line 249
[*]XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
[*]XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
[*]XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1931
[*]XF\App->run() in src/XF.php at line 328
[*]XF::runApp() in admin.php at line 13
[/LIST]

and when I going to ACP -> Discord -> Discord channels, I am getting this :

Code:
ErrorException: [E_WARNING] Illegal string offset 'type' in src/addons/NF/Discord/Api.php at line 102
[LIST=1]
[*]XF::handlePhpError() in src/addons/NF/Discord/Api.php at line 102
[*]NF\Discord\Api->getChannels() in src/addons/NF/Discord/Admin/Controller/Channel.php at line 17
[*]NF\Discord\Admin\Controller\Channel->actionIndex() in src/XF/Mvc/Dispatcher.php at line 249
[*]XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
[*]XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
[*]XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1931
[*]XF\App->run() in src/XF.php at line 328
[*]XF::runApp() in admin.php at line 13
[/LIST]
Same thing with Discord roles :

Code:
ErrorException: [E_WARNING] Cannot use a scalar value as an array in src/addons/NF/Discord/Api.php at line 254
[LIST=1]
[*]XF::handlePhpError() in src/addons/NF/Discord/Api.php at line 254
[*]NF\Discord\Api->getRoles() in src/addons/NF/Discord/Admin/Controller/Role.php at line 18
[*]NF\Discord\Admin\Controller\Role->actionIndex() in src/XF/Mvc/Dispatcher.php at line 249
[*]XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
[*]XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
[*]XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1931
[*]XF\App->run() in src/XF.php at line 328
[*]XF::runApp() in admin.php at line 13
[/LIST]
I can give you admins permissions if you want, thanks!
From the sounds of it, you may not have followed the setup instructions so Discord is kicking back unexpectred responses. I'll release an update to better guard against this but you should definitely go over the instructions and make sure you've followed each step: Discord Integration
 

Ades

Member
Hi,

I followed every, and it worked, thank you. But, when I want to link my Discord account to my forum account, I got this response :

UNKNOWN_ERROR

It gives me error on ACP, did I make something wrong ? Also, when you disabled the add-on, you still have the options on connected accounts to manage Discord API.

Can I send you admin details to check that please ?

Thanks!
 

Ades

Member
When you set the permission Link Discord Account to no, when you go on connected accounts, you can still link your account to Discord.
 

NixFifty

Administrator
Staff member
Hi,

I followed every, and it worked, thank you. But, when I want to link my Discord account to my forum account, I got this response :

UNKNOWN_ERROR

It gives me error on ACP, did I make something wrong ? Also, when you disabled the add-on, you still have the options on connected accounts to manage Discord API.

Can I send you admin details to check that please ?

Thanks!
Sure, open up a ticket here: Choose Category | NixFifty Services

Please include an admin login and also a screenshot of your Discord app settings. Discord usually errors out with that if your Redirect URL isn't set correctly so we'll need to check that.
 
Top