Special Avatar for Banned Members

Special Avatar for Banned Members 1.0.1

No permission to download

DL6

Well-known member
This add-on contain a bug. Please fix it. When the argument $canonical=true you should return the full URI rather than relative URI.
 
  • Like
Reactions: DL6
Hello
There is a problem...
ErrorException
Message: [E_NOTICE] Undefined variable: link
File: src/addons/DL6/bannedavatar/XF/Entity/User.php:48
User generated: djivan
Log date: Sat, 02 Nov 2019 09:07:35 +0000​
 
Hello
There is a problem...
ErrorException
Message: [E_NOTICE] Undefined variable: link
File: src/addons/DL6/bannedavatar/XF/Entity/User.php:48
User generated: djivan
Log date: Sat, 02 Nov 2019 09:07:35 +0000​
Can you provide the full error with the stack trace and request state?
 
On XF 2.2 with PHP8.0

Code:
Server-Fehlerprotokoll
    
        
            
[LIST]
[*]                
[*]ErrorException: Template error: [E_WARNING] Undefined variable $link
[*]               
[*]src/addons/DL6/bannedavatar/XF/Entity/User.php:48
[*]            
[/LIST]
           
[LIST]
[*]                
[*]Generiert von: Unbekanntes Konto
[*]               
[*]5 Januar 2021 um 09:49
[*]            
[/LIST]
        
       
[HEADING=2]Stack-Trace[/HEADING]
       
#0 src/addons/DL6/bannedavatar/XF/Entity/User.php(48): XF\Template\Templater->handleTemplateError(2, '[E_WARNING] Und...', '/var/www/vhosts...', 48)
#1 src/XF/ThreadType/AbstractHandler.php(354): DL6\bannedavatar\XF\Entity\User->getAvatarUrl('h', false, true)
#2 src/XF/ThreadType/AbstractHandler.php(284): XF\ThreadType\AbstractHandler->getLdImage(Object(SV\TitleEditHistory\XF\Entity\Thread), Object(TickTackk\ChangeContentOwner\XF\Entity\Post), Array)
#3 src/XF/Entity/Thread.php(894): XF\ThreadType\AbstractHandler->getLdStructuredData(Object(SV\TitleEditHistory\XF\Entity\Thread), Object(TickTackk\ChangeContentOwner\XF\Entity\Post), 1, Array)
#4 [internal function]: XF\Entity\Thread->getLdStructuredData(Object(TickTackk\ChangeContentOwner\XF\Entity\Post), 1, Array)
#5 src/XF/Template/Templater.php(1166): call_user_func_array(Array, Array)
#6 internal_data/code_cache/templates/l2/s1/public/amp_thread_view.php(13): XF\Template\Templater->method(Object(SV\TitleEditHistory\XF\Entity\Thread), 'getLdStructured...', Array)
#7 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('structured_data', Array, Array, Object(XF\Template\ExtensionSet))
#9 internal_data/code_cache/templates/l2/s1/public/amp_thread_view.php(388): XF\Template\Templater->renderExtension('structured_data', Array, Object(XF\Template\ExtensionSet))
#10 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#11 src/addons/MaZ/AMP/XF/Template/Templater.php(74): XF\Template\Templater->renderTemplate('amp_thread_view', Array, true, NULL)
#12 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\Templater->renderTemplate('public:amp_thre...', Array)
#13 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#14 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#15 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#18 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#19 src/XF.php(488): XF\App->run()
#20 index.php(20): XF::runApp('XF\\Pub\\App')
#21 {main}
       
       
[HEADING=2]Status der Anfrage[/HEADING]
       
           array(4) {
["url"] => string(211) "/threads/die-rentenkasse-suchen-sozialversicherungsfachangestellte-sozifa-fuer-die-grundrente-in-berlin-es-sollen-650-stellen-unbefristet-besetzt-werden-sie-suchen-ausdruecklich-auch-quereinsteiger.216848/?amp=1"
["referrer"] => bool(false)
["_GET"] => array(1) {
["amp"] => string(1) "1"
}
["_POST"] => array(0) {
}
}
 
XF 2.2.4 PHP 8.03

@DL6 is this tool dead?

Code:
ErrorException: Template error: [E_WARNING] Undefined variable $link src/addons/DL6/bannedavatar/XF/Entity/User.php:48

    Generiert von: Unbekanntes Konto 13 März 2021 um 13:30

Stack-Trace

#0 src/addons/DL6/bannedavatar/XF/Entity/User.php(48): XF\Template\Templater->handleTemplateError(2, '[E_WARNING] Und...', '/var/www/vhosts...', 48)
#1 src/XF/ThreadType/AbstractHandler.php(354): DL6\bannedavatar\XF\Entity\User->getAvatarUrl('h', false, true)
#2 src/XF/ThreadType/Question.php(198): XF\ThreadType\AbstractHandler->getLdImage(Object(SV\TitleEditHistory\XF\Entity\Thread), Object(TickTackk\ChangeContentOwner\XF\Entity\Post), Array)
#3 src/XF/Entity/Thread.php(899): XF\ThreadType\Question->getLdStructuredData(Object(SV\TitleEditHistory\XF\Entity\Thread), Object(TickTackk\ChangeContentOwner\XF\Entity\Post), 1, Array)
#4 [internal function]: XF\Entity\Thread->getLdStructuredData(Object(TickTackk\ChangeContentOwner\XF\Entity\Post), 1, Array)
#5 src/XF/Template/Templater.php(1166): call_user_func_array(Array, Array)
#6 internal_data/code_cache/templates/l2/s1/public/thread_view.php(13): XF\Template\Templater->method(Object(SV\TitleEditHistory\XF\Entity\Thread), 'getLdStructured...', Array)
#7 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('structured_data', Array, Array, Object(XF\Template\ExtensionSet))
#9 internal_data/code_cache/templates/l2/s1/public/thread_view.php(795): XF\Template\Templater->renderExtension('structured_data', Array, Object(XF\Template\ExtensionSet))
#10 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#11 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('thread_view', Array, true, Object(XF\Template\ExtensionSet))
#12 src/XF/Template/Templater.php(1617): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('public:thread_v...', Array, true, Object(XF\Template\ExtensionSet))
#13 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('thread_view_typ...', Array, true, NULL)
#14 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('public:thread_v...', Array)
#15 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#16 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\ViewT...', 'public:thread_v...', Array)
#17 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#18 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#19 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#20 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#21 src/XF.php(488): XF\App->run()
#22 index.php(20): XF::runApp('XF\\Pub\\App')
#23 {main}

Status der Anfrage

array(4) {
  ["url"] => string(85) "/threads/pflegegeld-unbefristet-wann-ist-eine-erneute-begutachtung-vorgesehen.205797/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Ok, @DL6 seems to be busy.
Since this is not a real problem here, this is the fix for everyone who uses PHP 8.0.

In src/addons/DL6/bannedavatar/XF/Entity/User.php find: (Line:19)
PHP:
   if($this->is_banned)
        {
            $app = $this->app();
            $router = $app->router('public');

replace with:
PHP:
  if($this->is_banned)
        {
            $link = "";
            $app = $this->app();
            $router = $app->router('public');
save...

Hth :D
 
Last edited:
Back
Top Bottom