Server error log
XF\Db\Exception: MySQL query error [1364]: Field 'ozzmodz_tpftt_discussion_type' doesn't have a default value src/XF/Db/AbstractStatement.php:230
Generated by: Jay Feb 8, 2023 at 9:16 PM
Stack trace
INSERT INTO `xf_thread_prefix` (`css_class`, `prefix_group_id`, `display_order`, `allowed_user_group_ids`, `prefix_id`, `materialized_order`) VALUES (?, ?, ?, ?, ?, ?)
------------
#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL query err...', 1364, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(79): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1364, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(220): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1521): XF\Db\AbstractAdapter->insert('xf_thread_prefi...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1253): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Mvc/FormAction.php(71): XF\Mvc\Entity\Entity->save(true, false)
#7 src/XF/Mvc/FormAction.php(189): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#8 src/XF/Admin/Controller/AbstractPrefix.php(148): XF\Mvc\FormAction->run()
#9 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\AbstractPrefix->actionSave(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:ThreadPrefix', 'Save', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ThreadPrefix), NULL)
#11 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ThreadPrefix), NULL)
#12 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#14 src/XF.php(524): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}
Request state
array(4) {
["url"] => string(33) "/admin.php?thread-prefixes/0/save"
["referrer"] => string(52) "https://*********/admin.php?thread-prefixes/add"
["_GET"] => array(1) {
["thread-prefixes/0/save"] => string(0) ""
}
["_POST"] => array(12) {
["_xfToken"] => string(8) "********"
["title"] => string(8) "Feedback"
["description"] => string(0) ""
["usage_help"] => string(0) ""
["css_class"] => string(17) "label label--blue"
["prefix_group_id"] => string(2) "10"
["display_order"] => string(1) "1"
["usable_user_group"] => string(3) "all"
["node_ids"] => array(1) {
[0] => string(2) "42"
}
["_xfRequestUri"] => string(30) "/admin.php?thread-prefixes/add"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
Hi @Ozzy47
<xf:if is="$hasPrefixes">
<div class="block">
<div class="block-container">
<h2 class="block-header">{{ phrase('ozzmodzForumPrefix_title') }}</h2>
<ul class="block-body" style="padding: 10px;">
<a href="{{ link('forums', $forum) }}"><span class="label label--blue" style="line-height: 1.8;">{{ phrase('ozzmodzForumPrefix_all_threads') }}</span></a>
<xf:foreach loop="array_keys($prefixes)" value="$groupId">
<xf:foreach loop="{$prefixes.{$groupId}}" key="$prefixId" value="$prefix">
<a href="{{ link('forums', $forum, {'prefix_id': $prefix.prefix_id}) }}" class="labelLink"><span class="{$prefix.css_class}" dir="auto" style="line-height: 1.8;">{{ prefix_title('thread', $prefixId) }}</span></a>
</xf:foreach>
</xf:foreach>
</ul>
</div>
</div>
</xf:if>
Until he does... think post #35 tells you how to resolve the issue by editingIf the prefixes are newlines, they are attached.
Could you add a little space?
Thanks
View attachment 289581
ozzmodzForumPrefix_block
template, or do a TMS entry to do it so it keeps the edit upon upgrades.gap:3px;
into a segment of the template due to the style I use and the way I have it set to display the main site block container forum list.We use essential cookies to make this site work, and optional cookies to enhance your experience.