PaulB
Well-known member
Hello,
Could anyone please help me? I got the following error after upgrading XenTag:
Code:InvalidArgumentException: Unknown content type 'tinhte_xentag_forum' - library/XenForo/Model/Tag.php:1014 #0 /var/www/html/library/Tinhte/XenTag/XenForo/ControllerAdmin/Forum.php(41): XenForo_Model_Tag->getTagger('tinhte_xentag_f...') #1 /var/www/html/library/Tinhte/XenTag/XenForo/DataWriter/Forum.php(22): Tinhte_XenTag_XenForo_ControllerAdmin_Forum->Tinhte_XenTag_actionSave(Object(Tinhte_XenTag_XenForo_DataWriter_Forum)) #2 /var/www/html/library/XenForo/DataWriter.php(1446): Tinhte_XenTag_XenForo_DataWriter_Forum->_preSave() #3 /var/www/html/library/XenForo/DataWriter.php(1385): XenForo_DataWriter->preSave() #4 /var/www/html/library/XenForo/ControllerAdmin/Forum.php(129): XenForo_DataWriter->save() #5 /var/www/html/library/Waindigo/ThreadEvents/Extend/XenForo/ControllerAdmin/Forum.php(20): XenForo_ControllerAdmin_Forum->actionSave() #6 /var/www/html/library/Hex/Thumbnails/Extend/XenForo/ControllerAdmin/Forum.php(53): Waindigo_ThreadEvents_Extend_XenForo_ControllerAdmin_Forum->actionSave() #7 /var/www/html/library/Tinhte/XenTag/XenForo/ControllerAdmin/Forum.php(33): Hex_Thumbnails_Extend_XenForo_ControllerAdmin_Forum->actionSave() #8 /var/www/html/library/XenForo/FrontController.php(351): Tinhte_XenTag_XenForo_ControllerAdmin_Forum->actionSave() #9 /var/www/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch)) #10 /var/www/html/admin.php(26): XenForo_FrontController->run() #11 {main}
Thanks!
Please try to upgrade using xml again. Make sure the files are uploaded correctly before upgrading.
That's not going to fix it. You have this at the bottom of Tinhte_XenTag_Installer::uninstallVersion134:
PHP:
$db->query('DELETE FROM xf_content_type WHERE content_type = ?', 'tinhte_xentag_page');
$db->query('DELETE FROM xf_content_type WHERE content_type = ?', 'tinhte_xentag_forum');
$db->query('DELETE FROM xf_content_type WHERE content_type = ?', 'tinhte_xentag_resource');
$db->query('DELETE FROM xf_content_type WHERE content_type = ?', 'tinhte_xentag_tag');
$db->query('DELETE FROM xf_content_type_field WHERE content_type = ?', 'tinhte_xentag_page');
$db->query('DELETE FROM xf_content_type_field WHERE content_type = ?', 'tinhte_xentag_forum');
$db->query('DELETE FROM xf_content_type_field WHERE content_type = ?', 'tinhte_xentag_resource');
$db->query('DELETE FROM xf_content_type_field WHERE content_type = ?', 'tinhte_xentag_tag');
That runs after the INSERT IGNORE statements in installCustomized. Anyone upgrading from version ID 134 or lower will lose those rows, and that'll result in all sorts of problems.
If you've encountered this issue, you can fix it by executing the following SQL:
Code:
INSERT INTO xf_content_type (content_type, addon_id) VALUES ('tinhte_xentag_forum', 'Tinhte_XenTag');
INSERT INTO xf_content_type_field (content_type, field_name, field_value) VALUES ('tinhte_xentag_forum', 'search_handler_class', 'Tinhte_XenTag_Search_DataHandler_Forum');
INSERT INTO xf_content_type_field (content_type, field_name, field_value) VALUES ('tinhte_xentag_forum', 'tag_handler_class', 'Tinhte_XenTag_TagHandler_Forum');
Then copy this to a PHP file in the root of your XenForo installation and run it (make sure you delete it when you're done):
PHP:
<?php
$startTime = microtime(true);
require __DIR__ . '/library/XenForo/Autoloader.php';
XenForo_Autoloader::getInstance()->setupAutoloader(__DIR__ . '/library');
XenForo_Application::initialize(__DIR__ . '/library', __DIR__);
XenForo_Application::set('page_start_time', $startTime);
$dependencies = new XenForo_Dependencies_Public();
$dependencies->preLoadData();
$contentTypeModel = XenForo_Model::create('XenForo_Model_ContentType');
$contentTypeModel->rebuildContentTypeCache();
Last edited: