XF 2.1 Foreach loop $connectedProviders - No access.

Skyrider

Active member
Not sure in which department I should be asking this, but a friend of mine is attempting to dump in the foreach loops, but he can't access the dump information.

His quote to me:
I don't really get it .. I did a dump in the foreach loops but I can't access the stuff of that dump.

<xf:foreach loop="$connectedProviders" value="$provider" if="{$provider.isAssociated($user)}">
<dl class="pairs pairs--columns pairs--fixedSmall">
<dt>{$provider.title}</dt>
<dd>{$provider.renderAssociated($user)|raw}</dd>
</dl>

{{ dump($provider) }}
<xf:else />


Effectively, I'm looking for the code that gets called via {$provider.renderAssociated($user)|raw}
Simple terms. He wants to grab the info in the connected profiles table to view the raw info. Any idea why he can't access the dump information?

Regards,
Skyrider
 
Last edited:

Skyrider

Active member
To be a bit more specific error wise:

InvalidArgumentException: Accessed unknown getter 'provider_key' on XF:ConnectedAccountProvider[steam] src/XF/Mvc/Entity/Entity.php:194

Stack trace
#0 src/XF/Mvc/Entity/Entity.php(106): XF\Mvc\Entity\Entity->get('provider_key')
#1 internal_data/code_cache/templates/l1/s0/admin/user_extra.php(104): XF\Mvc\Entity\Entity->offsetGet('provider_key')
#2 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(SV\UserActivity\XF\Template\Templater), Array)
#3 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('user_extra', Array)
#4 src/XF/Mvc/Renderer/Json.php(84): XF\Template\Template->render()
#5 src/XF/Mvc/Renderer/Json.php(68): XF\Mvc\Renderer\Json->renderHtmlFallback('XF:User\\Extra', 'admin:user_extr...', Array)
#6 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Json->renderView('XF:User\\Extra', 'admin:user_extr...', Array)
#7 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(Hampel\JobRunner\XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#8 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(Hampel\JobRunner\XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#10 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#11 src/XF.php(391): XF\App->run()
#12 admin.php(13): XF::runApp('XF\\Admin\\App')
#13 {main}

Request state
array(4) {
["url"] => string(184) "/admin.php?users/skyrider.3086/extra&_xfRequestUri=%2Fadmin.php%3Fusers%2Fskyrider.3086%2Fedit&_xfWithData=1&_xfToken=xxxx&_xfResponseType=json"
["referrer"] => string(27) "https://thesiteurl"
["_GET"] => array(5) {
["users/skyrider_3086/extra"] => string(0) ""
["_xfRequestUri"] => string(35) "/admin.php?users/skyrider.3086/edit"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(43) "xxxxx"
["_xfResponseType"] => string(4) "json"
}
["_POST"] => array(0) {
}
}
 
Top