[XFA] Thread Template - XF2

[XFA] Thread Template - XF2 [Paid] 3.0.3

No permission to buy (€5.00)
@XFA
We're getting this error in XF 2.2.3 patch 1 (not updated to 2.2.4 yet) with this addon version 3.0.1, when a new node is attempted to be created. It happens on our test forum and our live forum.

XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'xfa_tt_template' in 'field list' - src/XF/Db/AbstractStatement.php:228

Stack trace:
Code:
INSERT  INTO `xf_node` (`node_type_id`, `title`, `node_name`, `description`, `parent_node_id`, `display_order`, `display_in_list`, `style_id`, `navigation_id`, `node_id`, `effective_style_id`, `breadcrumb_data`, `effective_navigation_id`, `xfa_tt_template`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#5 src/XF/Mvc/Entity/Entity.php(1510): XF\Db\AbstractAdapter->insert('xf_node', Array, false)
#6 src/XF/Mvc/Entity/Entity.php(1242): XF\Mvc\Entity\Entity->_saveToSource()
#7 src/XF/Mvc/FormAction.php(69): XF\Mvc\Entity\Entity->save(true, false)
#8 src/XF/Mvc/FormAction.php(187): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#9 src/XF/Admin/Controller/AbstractNode.php(110): XF\Mvc\FormAction->run()
#10 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\AbstractNode->actionSave(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Forum', 'Save', Object(XF\Mvc\RouteMatch), Object(SV\MultiPrefix\XF\Admin\Controller\Forum), NULL)
#12 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\MultiPrefix\XF\Admin\Controller\Forum), NULL)
#13 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#15 src/XF.php(488): XF\App->run()
#16 admin.php(13): XF::runApp('XF\\Admin\\App')
#17 {main}

Request state:
Code:
array(4) {
  ["url"] => string(24) "/admin.php?forums/0/save"
  ["referrer"] => string(92) "https://forums.taleworlds.com/admin.php?forums/add&parent_node_id=0&forum_type_id=discussion"
  ["_GET"] => array(1) {
    ["forums/0/save"] => string(0) ""
  }
  ["_POST"] => array(18) {
    ["node"] => array(7) {
      ["title"] => string(13) "TEST - DELETE"
      ["description"] => string(21) "testing node creation"
      ["node_name"] => string(0) ""
      ["parent_node_id"] => string(3) "546"
      ["display_order"] => string(1) "1"
      ["display_in_list"] => string(1) "1"
      ["navigation_id"] => string(0) ""
    }
    ["forum_type_id"] => string(10) "discussion"
    ["sv_multiprefix_min_prefixes"] => string(1) "0"
    ["sv_multiprefix_max_prefixes"] => string(1) "0"
    ["allow_posting"] => string(1) "1"
    ["count_messages"] => string(1) "1"
    ["find_new"] => string(1) "1"
    ["similar_threads_include"] => string(1) "1"
    ["allow_index"] => string(5) "allow"
    ["min_tags"] => string(1) "0"
    ["allowed_watch_notifications"] => string(3) "all"
    ["default_sort_order"] => string(14) "last_post_date"
    ["default_sort_direction"] => string(4) "desc"
    ["list_date_limit_days"] => string(1) "0"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(63) "/admin.php?forums/add&parent_node_id=0&forum_type_id=discussion"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}

It seems a database table should have been modified to have the 'xfa_tt_template' column added to it when the addon was installed, but it wasn't for some reason? I tried to Rebuild the addon, but that made no difference.
 
I suppose I could probably just add that column to the xf_node table (as string type) through phpMyAdmin, but this is obviously something the addon should have handled, and for all I know there will be further issues even if I did that.
Since I'd rather not go for a manual fix to an integral part of this addon, I've had to just disable this addon for now so that we can actually create new nodes.

@XFA
Looking forward to a fix.
 
No as a matter of fact this column had been removed as it changed to its own table.
But it seems I forgot to remove a bit of code.
Going to provide a fix release.
 
So upon installing the update, I get 3 pages of errors in the error log.
All the errors are the same but just different node ID's.
Code:
Server error log
InvalidArgumentException: Accessed unknown getter 'xfa_tt_template' on XF:Node[55] src/XF/Mvc/Entity/Entity.php:203
Generated by: Unknown account Mar 15, 2021 at 2:19 PM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(110): XF\Mvc\Entity\Entity->get('xfa_tt_template')
#1 src/addons/XFA/ThreadTemplate/Job/Upgrade/Node903000090.php(38): XF\Mvc\Entity\Entity->__get('xfa_tt_template')
#2 src/XF/Job/AbstractRebuildJob.php(47): XFA\ThreadTemplate\Job\Upgrade\Node903000090->rebuildById(55)
#3 src/XF/Job/Manager.php(258): XF\Job\AbstractRebuildJob->run(8)
#4 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, 8)
#5 src/XF/Job/Manager.php(84): XF\Job\Manager->runJobEntry(Array, 8)
#6 job.php(43): XF\Job\Manager->runQueue(false, 8)
#7 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(85) "https://www.joyfreak.com/admin.php?add-ons/install-from-archive-complete&batch_id=246"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Oh right the job wasn't put into the conditional.

Just ignore the errors.
I'll update the package.
 
Hey @XFA, can you update the add-on for the new version of XenForo or is running fine?

In the descriptions says is only compatible with the 2.0 version, unfortunately.
 
Top Bottom