Editor & BB Code Manager

Editor & BB Code Manager 2.0.1 Patch Level 1

No permission to download
@Lukas W. it looks like your add-on is causing sporadic issues in actionAddReply;

This code;
PHP:
foreach ($posts as $post) {
    $message = \XF::app()->bbCode()->render($post->message, 'html', 'post', $post);
    $renderedPosts[$post->post_id] = $message;;
}

Is triggering this exception;
Code:
[LIST]
[*]ErrorException: Template error: Cannot call method isIgnoring on a non-object (NULL)
[*]src/XF/Template/Templater.php:927
[/LIST]
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Cannot call met...', '/var/www/html/u...', 927, Array)
#1 src/XF/Template/Templater.php(927): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l1/s0/public/bb_code_tag_quote.php(9): XF\Template\Templater->method(NULL, 'isIgnoring', Array)
#3 src/XF/Template/Templater.php(1250): XF\Template\Templater->{closure}(Object(SV\WatchThreadsFilter\XF\Template\Templater), Array)
#4 src/XF/BbCode/Renderer/Html.php(785): XF\Template\Templater->renderTemplate('bb_code_tag_quo...', Array)
#5 src/XF/BbCode/Renderer/Html.php(776): XF\BbCode\Renderer\Html->getRenderedQuote('...', 'FantasticMrSnak...', Array, Array)
#6 [internal function]: XF\BbCode\Renderer\Html->renderTagQuote(Array, '...', Array, Array, Object(KL\EditorManager\XF\BbCode\Renderer\Html))
#7 src/XF/BbCode/Renderer/Html.php(246): call_user_func(Array, Array, '...', Array, Array, Object(KL\EditorManager\XF\BbCode\Renderer\Html))
#8 src/addons/KL/EditorManager/XF/BbCode/Renderer/Html.php(302): XF\BbCode\Renderer\Html->renderTag(Array, Array)
#9 src/XF/BbCode/Traverser.php(54): KL\EditorManager\XF\BbCode\Renderer\Html->renderTag(Array, Array)
#10 src/XF/BbCode/Traverser.php(30): XF\BbCode\Traverser->renderSubTree(Array, Array)
#11 src/XF/BbCode/Traverser.php(18): XF\BbCode\Traverser->renderAst(Array, Object(SV\SignupAbuseBlocking\XF\BbCode\RuleSet), Array)
#12 src/XF/SubContainer/BbCode.php(216): XF\BbCode\Traverser->render('[QUOTE="...', Object(XF\BbCode\Parser), Object(SV\SignupAbuseBlocking\XF\BbCode\RuleSet), Array)
#13 src/addons/KL/EditorManager/XF/Pub/Controller/Thread.php(36): XF\SubContainer\BbCode->render('[QUOTE="Fantast...', 'html', 'post', Object(SV\ModeratorEssentials\XF\Entity\Post))
#14 src/XF/Mvc/Dispatcher.php(249): KL\EditorManager\XF\Pub\Controller\Thread->actionAddReply(Object(XF\Mvc\ParameterBag))
#15 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'AddReply', 'json', Object(XF\Mvc\ParameterBag), 'forums', Object(SV\ModeratorEssentials\XF\Pub\Controller\Thread), NULL)
#16 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#18 src/XF.php(329): XF\App->run()
#19 index.php(13): XF::runApp('XF\\Pub\\App')
#20 {main}

Template fragment erroring;
Code:
$attributes.member && $xf.visitor.isIgnoring($attributes.member))

This is because $xf is only populated in \XF\App::preRender, which occurs after the controller action. This results in any templates being rendered via \XF::app()->bbCode()->render() to not have the expected default values.

Calling \XF::app()->preRender($return, $return->getResponseType()); before the render loop should fix this.

Alternatively, moving the post rendering code into the View class is likely a better solution.
 
Apologies if this has already been reported, @Lukas W. , but I think there may be a typo in Editor & BB Code Manager 1.1.0 in these files:

KL/EditorManager/XF/BbCode/Renderer/EditorHtml.php
KL/EditorManager/XF/BbCode/Renderer/Html.php

PHP:
$config['enabled_bbocdes'] = array_merge(...

appears it should be:

PHP:
$config['enabled_bbcodes'] = array_merge(...

Regards, Groatz
 
Is this add-on compatible with Xenforo 2.1? There are several similar options that are implemented in 2.1 so that's why I'm asking.
 
It is not. But it will be with the next update. I currently don't have any ETA for the update though. I'll start to look into it, once 2.1.0 Stable releases.
 
hello,
i noticed a bug with "editor templates" (on xen2.0)

i saw it working properly.....then i went to configure some custom bbcode buttons(with FA5) and now it cant load the editor anymore...

i tested by turning off all other addons, but even with only this one turned on it happened....i also tried to reverse the steps i made but its stuck on broken somehow...

any ideas?
193984
 
i also saw another just now....404 incorrect file path....

it does not include the root dir which it seems it should for people who install in subdirectories

194000
 
Hmm. Could there be a "importer" for 2.1? For example it would be very useful if the bbcodes in this addon and official 2.1 (that overlap) worked in the same way, hence tons of posts not ending up with broken bbcode if this addon isn't updated/is removed.
 
The add-on will be updated. I don't have the time or the resources to be ready on day one with a free add-on that is not financially supported whatsoever, so please give me a few weeks.

Don' think anyone assumed it would be out on day 1....
 
when we click on the smilies button, nothing happens. Could it be related to this addon? The js console shows this:

Code:
editor-compiled.js?_v=612c49fb:155 Uncaught TypeError: Cannot read property 'showMenu' of undefined
    at s.callback (editor-compiled.js?_v=612c49fb:155)
    at Object.t [as exec] (editor-compiled.js?_v=612c49fb:7)
    at r (editor-compiled.js?_v=612c49fb:7)
    at t (editor-compiled.js?_v=612c49fb:7)
    at s.i (editor-compiled.js?_v=612c49fb:7)
    at editor-compiled.js?_v=612c49fb:7
    at HTMLButtonElement.<anonymous> (editor-compiled.js?_v=612c49fb:7)
    at HTMLDivElement.dispatch (jquery-3.3.1.min.js:2)
    at HTMLDivElement.y.handle (jquery-3.3.1.min.js:2)
 
Don' think anyone assumed it would be out on day 1....
Not you specifically, and I apologize if you felt targeted by this. But plenty of people did (here too) and do across the site on various add-ons, so I wanted to state it in general.

when we click on the smilies button, nothing happens. Could it be related to this addon? The js console shows this:

Code:
editor-compiled.js?_v=612c49fb:155 Uncaught TypeError: Cannot read property 'showMenu' of undefined
    at s.callback (editor-compiled.js?_v=612c49fb:155)
    at Object.t [as exec] (editor-compiled.js?_v=612c49fb:7)
    at r (editor-compiled.js?_v=612c49fb:7)
    at t (editor-compiled.js?_v=612c49fb:7)
    at s.i (editor-compiled.js?_v=612c49fb:7)
    at editor-compiled.js?_v=612c49fb:7
    at HTMLButtonElement.<anonymous> (editor-compiled.js?_v=612c49fb:7)
    at HTMLDivElement.dispatch (jquery-3.3.1.min.js:2)
    at HTMLDivElement.y.handle (jquery-3.3.1.min.js:2)
The error doesn't give any specific hint, so maybe or maybe not. Any other plugins that touch smilies or the editor? Does disabling the editor manager solve it?
 
Top Bottom