XF2 [8WR] Discord Integration

XF2 [8WR] Discord Integration [Paid] 2.1.1.9

No permission to buy ($30.00)
Hello all!

Discord all set up and integrated, though it likes to permanently say I have 17 members on discord.

Is there some caching going on or have I messed up somewhere?

Cheers
 
I'm getting these errors:

Code:
ErrorException: Template error: Function create_function() is deprecated src/addons/EWR/Discord/Option/Channels.php:17
Generated by: RobinHood Mar 5, 2018 at 10:42 AM
Stack trace
#0 src/addons/EWR/Discord/Option/Channels.php(17): XF\Template\Templater->handleTemplateError(8192, 'Function create...', '/home//...', 17, Array)
#1 [internal function]: EWR\Discord\Option\Channels::renderOption(Object(SV\ContentRatings\XF\Entity\Option), Array)
#2 src/XF/Entity/Option.php(75): call_user_func(Array, Object(SV\ContentRatings\XF\Entity\Option), Array)
#3 [internal function]: XF\Entity\Option->renderDisplayCallback(Array)
#4 src/XF/Template/Templater.php(936): call_user_func_array(Array, Array)
#5 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(194): XF\Template\Templater->method(Object(SV\ContentRatings\XF\Entity\Option), 'renderDisplayCa...', Array)
#6 src/XF/Template/Templater.php(659): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array, Array)
#7 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(478): XF\Template\Templater->callMacro('option_macros', 'option_row', Array, Array)
#8 src/XF/Template/Templater.php(659): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array, Array)
#9 internal_data/code_cache/templates/l1/s0/admin/option_list.php(64): XF\Template\Templater->callMacro('option_macros', 'option_form_blo...', Array, Array)
#10 src/XF/Template/Templater.php(1246): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array)
#11 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('option_list', Array)
#12 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#13 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('XF:Option\\Listi...', 'admin:option_li...', Array)
#14 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#16 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#17 src/XF.php(328): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}
Request state
array(4) {
  ["url"] => string(37) "/admin.php?options/groups/EWRdiscord/"
  ["referrer"] => string(43) "https://www..com/admin.php?options/"
  ["_GET"] => array(1) {
    ["options/groups/EWRdiscord/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

Code:
ErrorException: Template error: Function create_function() is deprecated src/addons/EWR/Discord/Option/Roles.php:31
Generated by: RobinHood Mar 4, 2018 at 9:23 PM
Stack trace
#0 src/addons/EWR/Discord/Option/Roles.php(31): XF\Template\Templater->handleTemplateError(8192, 'Function create...', '/home/squad/...', 31, Array)
#1 [internal function]: EWR\Discord\Option\Roles::renderOption(Object(SV\ContentRatings\XF\Entity\Option), Array)
#2 src/XF/Entity/Option.php(75): call_user_func(Array, Object(SV\ContentRatings\XF\Entity\Option), Array)
#3 [internal function]: XF\Entity\Option->renderDisplayCallback(Array)
#4 src/XF/Template/Templater.php(936): call_user_func_array(Array, Array)
#5 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(194): XF\Template\Templater->method(Object(SV\ContentRatings\XF\Entity\Option), 'renderDisplayCa...', Array)
#6 src/XF/Template/Templater.php(659): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array, Array)
#7 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(478): XF\Template\Templater->callMacro('option_macros', 'option_row', Array, Array)
#8 src/XF/Template/Templater.php(659): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array, Array)
#9 internal_data/code_cache/templates/l1/s0/admin/option_list.php(64): XF\Template\Templater->callMacro('option_macros', 'option_form_blo...', Array, Array)
#10 src/XF/Template/Templater.php(1246): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array)
#11 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('option_list', Array)
#12 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#13 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('XF:Option\\Listi...', 'admin:option_li...', Array)
#14 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#16 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#17 src/XF.php(328): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}
Request state
array(4) {
  ["url"] => string(37) "/admin.php?options/groups/EWRdiscord/"
  ["referrer"] => string(43) "https://www..com/admin.php?options/"
  ["_GET"] => array(1) {
    ["options/groups/EWRdiscord/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
 
I saw this error in the ACP immediately after installing the new update. Looks like it might be party related to @Xon's content ratings?

Code:
Exception: Could not find class EWR\Discord\Entity\Post when attempting to extend XF\Entity\Post src/XF/Extension.php:174
Generated by: Unknown account Mar 6, 2018 at 8:10 PM
Stack trace
#0 src/XF/Mvc/Entity/Manager.php(53): XF\Extension->extendClass('XF\\Entity\\Post')
#1 src/XF/Mvc/Entity/Manager.php(123): XF\Mvc\Entity\Manager->getEntityClassName('XF:Post')
#2 src/XF/App.php(2249): XF\Mvc\Entity\Manager->find('XF:Post', 14848, Array)
#3 src/XF/Like/AbstractHandler.php(219): XF\App->findByContentType('post', 14848, Array)
#4 src/addons/SV/ContentRatings/Pub/Controller/Ratings.php(232): XF\Like\AbstractHandler->getContent(14848)
#5 src/addons/SV/UserActivity/SV/ContentRatings/Pub/Controller/Ratings.php(26): SV\ContentRatings\Pub\Controller\Ratings->assertViewableContent(Object(SV\ContentRatings\XF\Like\Post), 'post', 14848)
#6 src/addons/SV/ContentRatings/Pub/Controller/Ratings.php(91): SV\UserActivity\SV\ContentRatings\Pub\Controller\Ratings->assertViewableContent(Object(SV\ContentRatings\XF\Like\Post), 'post', 14848)
#7 src/XF/Mvc/Dispatcher.php(249): SV\ContentRatings\Pub\Controller\Ratings->actionList(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('SV\\ContentRatin...', 'List', 'html', Object(XF\Mvc\ParameterBag), '', Object(SV\UserActivity\SV\ContentRatings\Pub\Controller\Ratings), NULL)
#9 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#11 src/XF.php(328): XF\App->run()
#12 index.php(13): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(47) "/rating/list?content_type=post&content_id=14848"
  ["referrer"] => bool(false)
  ["_GET"] => array(2) {
    ["content_type"] => string(4) "post"
    ["content_id"] => string(5) "14848"
  }
  ["_POST"] => array(0) {
  }
}
 
I saw this error in the ACP immediately after installing the new update. Looks like it might be party related to @Xon's content ratings?

Code:
Exception: Could not find class EWR\Discord\Entity\Post when attempting to extend XF\Entity\Post src/XF/Extension.php:174
Generated by: Unknown account Mar 6, 2018 at 8:10 PM
Stack trace
#0 src/XF/Mvc/Entity/Manager.php(53): XF\Extension->extendClass('XF\\Entity\\Post')
#1 src/XF/Mvc/Entity/Manager.php(123): XF\Mvc\Entity\Manager->getEntityClassName('XF:Post')
#2 src/XF/App.php(2249): XF\Mvc\Entity\Manager->find('XF:Post', 14848, Array)
#3 src/XF/Like/AbstractHandler.php(219): XF\App->findByContentType('post', 14848, Array)
#4 src/addons/SV/ContentRatings/Pub/Controller/Ratings.php(232): XF\Like\AbstractHandler->getContent(14848)
#5 src/addons/SV/UserActivity/SV/ContentRatings/Pub/Controller/Ratings.php(26): SV\ContentRatings\Pub\Controller\Ratings->assertViewableContent(Object(SV\ContentRatings\XF\Like\Post), 'post', 14848)
#6 src/addons/SV/ContentRatings/Pub/Controller/Ratings.php(91): SV\UserActivity\SV\ContentRatings\Pub\Controller\Ratings->assertViewableContent(Object(SV\ContentRatings\XF\Like\Post), 'post', 14848)
#7 src/XF/Mvc/Dispatcher.php(249): SV\ContentRatings\Pub\Controller\Ratings->actionList(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('SV\\ContentRatin...', 'List', 'html', Object(XF\Mvc\ParameterBag), '', Object(SV\UserActivity\SV\ContentRatings\Pub\Controller\Ratings), NULL)
#9 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#11 src/XF.php(328): XF\App->run()
#12 index.php(13): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(47) "/rating/list?content_type=post&content_id=14848"
  ["referrer"] => bool(false)
  ["_GET"] => array(2) {
    ["content_type"] => string(4) "post"
    ["content_id"] => string(5) "14848"
  }
  ["_POST"] => array(0) {
  }
}
Content Ratings is just providing a custom public route, and then a public controller. My guess is @Jaxel is doing php classloader tricks and doesn't have his files arranged as XenForo2 expects when using the class extension system.
 
It sounds like there was an error in your upload. Reupload the file.

I'm not doing any php classloader tricks. I'm using XF2's built-in class extension system.
 
I did double check that, and all the files were marked as successfully uploaded in the FTP client.

I've uploaded them again for good measure, I can't run the upgrade again though. I'll just leave it be I guess and let you know if it pops up again.

Thanks for the fix 👍

EDIT: I tried a rebuild, and that seemed to run fine with no errors. So I guess we're good.
 
I received another error just now when adding an RSS feed in the ACP. Any thoughts?

Code:
Error: Call to a member function getAvatarUrl() on null src/addons/EWR/Discord/Entity/Post.php:82
Generated by: Unknown account Mar 7, 2018 at 7:51 PM
Stack trace
#0 src/addons/EWR/Discord/Entity/Post.php(13): EWR\Discord\Entity\Post->postThreadToDiscord(Object(SV\ContentRatings\XF\Entity\Thread), Object(XFMG\XF\Entity\Post))
#1 src/XF/Mvc/Entity/Entity.php(1145): EWR\Discord\Entity\Post->_postSave()
#2 src/XF/Mvc/Entity/Entity.php(1139): XF\Mvc\Entity\Entity->save(true, false)
#3 src/XF/Service/Thread/Creator.php(285): XF\Mvc\Entity\Entity->save(true, false)
#4 src/XF/Service/ValidateAndSavableTrait.php(40): XF\Service\Thread\Creator->_save()
#5 src/XF/Service/Feed/Feeder.php(134): XF\Service\Thread\Creator->save()
#6 src/XF.php(392): XF\Service\Feed\Feeder->XF\Service\Feed\{closure}()
#7 src/XF/Service/Feed/Feeder.php(142): XF::asVisitor(Object(Siropu\Chat\XF\Entity\User), Object(Closure))
#8 src/XF/Service/Feed/Feeder.php(112): XF\Service\Feed\Feeder->importEntry(Array)
#9 src/XF/Admin/Controller/Feed.php(221): XF\Service\Feed\Feeder->importEntries()
#10 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\Feed->actionImport(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Feed', 'Import', 'html', Object(XF\Mvc\ParameterBag), 'rssFeedImporter', Object(XF\Admin\Controller\Feed), NULL)
#12 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#14 src/XF.php(328): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}
Request state
array(4) {
  ["url"] => string(41) "/admin.php?feeds/you-tube-channel.1/import"
  ["referrer"] => string(41) "https://www..com/admin.php?feeds/"
  ["_GET"] => array(1) {
    ["feeds/you-tube-channel_1/import"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

The feed had this user setting

1520452781975.webp
 
This STILL randomly happens to my users when they try to link. Some are fine, others are not. Still no word from the author from where I reported it before.

desktop10.webp
 
Did you look at the screen shot? That is not a 404.

The screen shot is TRYING to have them download an attachment. They just have a block in place to prevent it.
 
Top Bottom