@Ehren has kindly looked into this for me and was able to replicate it with the default style.It seems the addon CSS styles have some confilcts with your forum style...
It's being caused by a hard-coded max-height: 0px; tag, which is not part of my code.
<div class="bbCodeBlock-content" dir="ltr" style="max-height: 12px; height: 14px; min-height: 14px;">
<pre class=" line-numbers bbCodeCode language-code" dir="ltr" data-xf-init="code-block" data-lang="code"><code class=" language-code">Test
Test
Test<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
</div>
editor-compiled.js?_v=a37783e5:125 Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
Code 2.1.0 was rewritten from scratch. It is not compatible with previous addon version and XF below 2.1 but it can handle code block titles from previous addon versions! There is no way to upgrade existing addon!
Remove installed Math addon from you forum. After this install this version as a new addon!
New features
- New way of setting parameters for
code
BB code:[code...
ErrorException: Template error: strtolower() expects parameter 1 to be string, array given src/XF/BbCode/Renderer/Html.php:523
Generated by: Vincent_Wang 3/4/19 at 12:20 PM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(2, 'strtolower() ex...', '/home/nginx/dom...', 523, Array)
#1 src/XF/BbCode/Renderer/Html.php(523): strtolower(Array)
#2 [internal function]: XF\BbCode\Renderer\Html->renderTagCode(Array, Array, Array, Array, Object(XF\BbCode\Renderer\EmailHtml))
#3 src/XF/BbCode/Renderer/Html.php(294): call_user_func(Array, Array, Array, Array, Array, Object(XF\BbCode\Renderer\EmailHtml))
#4 src/XF/BbCode/Traverser.php(61): XF\BbCode\Renderer\Html->renderTag(Array, Array)
#5 src/XF/BbCode/Traverser.php(37): XF\BbCode\Traverser->renderSubTree(Array, Array)
#6 src/XF/BbCode/Traverser.php(20): XF\BbCode\Traverser->renderAst(Array, Object(CMTV\Code\XF\BbCode\RuleSet), Array)
#7 src/XF/SubContainer/BbCode.php(219): XF\BbCode\Traverser->render('Hi,
The proble...', Object(XF\BbCode\Parser), Object(CMTV\Code\XF\BbCode\RuleSet), Array)
#8 src/XF/Template/Templater.php(2014): XF\SubContainer\BbCode->render('Hi,
The proble...', 'emailHtml', 'post', Object(XFMG\XF\Entity\Post), Array)
#9 src/XF/Template/Templater.php(2019): XF\Template\Templater->fnBbCode(Object(XF\Mail\Templater), false, 'Hi,
The proble...', 'post', Object(XFMG\XF\Entity\Post), Array, 'emailHtml')
#10 [internal function]: XF\Template\Templater->fnBbCodeType(Object(XF\Mail\Templater), false, 'emailHtml', 'Hi,
The proble...', 'post', Object(XFMG\XF\Entity\Post))
#11 src/XF/Template/Templater.php(915): call_user_func_array(Array, Array)
#12 internal_data/code_cache/templates/l1/s24/email/watched_forum_thread.php(17): XF\Template\Templater->fn('bb_code_type', Array, false)
#13 src/XF/Template/Templater.php(1294): XF\Template\Templater->{closure}(Object(XF\Mail\Templater), Array)
#14 src/XF/Mail/Mailer.php(155): XF\Template\Templater->renderTemplate('watched_forum_t...', Array)
#15 src/XF/Mail/Mail.php(319): XF\Mail\Mailer->renderMailTemplate('watched_forum_t...', Array, Object(XF\Language), Object(QuantNet\Quiz\XF\Entity\User))
#16 src/XF/Mail/Mail.php(375): XF\Mail\Mail->renderTemplate()
#17 src/XF/Mail/Mail.php(406): XF\Mail\Mail->getSendableMessage()
#18 src/XF/Notifier/Post/AbstractWatch.php(128): XF\Mail\Mail->queue()
#19 src/XF/Service/AbstractNotifier.php(92): XF\Notifier\Post\AbstractWatch->sendEmail(Object(QuantNet\Quiz\XF\Entity\User))
#20 src/XF/Service/AbstractNotifier.php(44): XF\Service\AbstractNotifier->notifyType(Object(XF\Notifier\Post\ForumWatch), Array, G)
#21 src/XF/Service/AbstractNotifier.php(56): XF\Service\AbstractNotifier->notify(3)
#22 src/XF/Service/Thread/Creator.php(328): XF\Service\AbstractNotifier->notifyAndEnqueue(3)
#23 src/XF/Pub/Controller/Forum.php(593): XF\Service\Thread\Creator->sendNotifications()
#24 src/XF/Pub/Controller/Forum.php(751): XF\Pub\Controller\Forum->finalizeThreadCreate(Object(XF\Service\Thread\Creator))
#25 src/XF/Mvc/Dispatcher.php(321): XF\Pub\Controller\Forum->actionPostThread(Object(XF\Mvc\ParameterBag))
#26 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('XF:Forum', 'PostThread', Object(XF\Mvc\RouteMatch), Object(XenMax\PrefixFilter\XF\Pub\Controller\Forum), NULL)
#27 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XenMax\PrefixFilter\XF\Pub\Controller\Forum), NULL)
#28 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#29 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#30 src/XF.php(390): XF\App->run()
#31 index.php(20): XF::runApp('XF\\Pub\\App')
#32 {main}
Request state
array(4) {
["url"] => string(34) "/forum/adv-level-8.123/post-thread"
["referrer"] => string(68) "https://quantnet.com/forum/adv-level-8.123/post-thread?inline-mode=1"
["_GET"] => array(1) {
["/forum/adv-level-8_123/post-thread"] => string(0) ""
}
["_POST"] => array(13) {
["prefix_id"] => string(2) "29"
["title"] => string(52) "PathEvent(res) and EndOfSimulation() do not response"
["message_html"] => string(2683) "<p>Hi,</p><p><br></p><p>The problem is that in my start method of MCMediator.h the PathEvent(res) and EndOfSimulation do not work at all but the program can still go to the end without any bugs. I am wondering where I got it wrong . Possible places are the following :</p><p><br></p><p>1. In the initialization of MCMediator, two of my passed-in parameters are const path_signal& optionPaths, const end_signal& finishOptions. And I use "PathEvent.connect(optionPaths);" and "EndOfSimulation.connect(finishOptions);" to connect with them. (where path_signal is boost::signals2::signal<void(const vector<double>& )> and end_signal alike). But I think it is rarely wrong.</p><p><br></p><p>2. In the test.cpp, I use "MCMediator mcp(partsa, builder.GetPaths(), builder.GetEnd(), get<6>(data));" to initialize my mediator. I felt confused here as builder.GetPaths(), builder.GetEnd() can work here ( they are rvalue, but parameter list of MCMediator is lvalue . What's wrong here?) The GetPaths method is as following :</p><p><br></p><p>[CODE=cpp]using path_signal = boost::signals2::signal<void(const vector<double>& )>;// Send a path array </p><p><br></p><p>template <typename GSDE, typename GFDM, typename GRng></p><p>class MCBuilder{</p><p>private:</p><p> path_signal PathEvent;</p><p>public:</p><p>...</p><p> path_signal GetPaths() { return boost::move(PathEvent); };</p><p>}</p><p>
Fixed bugs
- Fixed an ACP error when XF sends an email notification about new post in the thread or when creating a new thread (@Andy.N)
Fixes a problem with upgrading.
If any other errors happen, try to fully remove the addon. Than install it again with this version.
We use essential cookies to make this site work, and optional cookies to enhance your experience.