• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Upgrade 1.5.1 --> 1.5.2

malachiel

Active member
#1
I tried to upgrade from 1.5.1 to 1.5.2 and during installation it was complain about missing tables xf_email things, i created all necessary tables and now it saying this
Code:
Server Error

Mysqli prepare error: Unknown column 'modification.template' in 'where clause'

    Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
    Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
    Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
    Zend_Db_Adapter_Abstract->query() in XenForo/Model.php at line 219
    XenForo_Model->fetchAllKeyed() in XenForo/Model/TemplateModificationAbstract.php at line 83
    XenForo_Model_TemplateModificationAbstract->getActiveModificationsForTemplate() in XenForo/DataWriter/EmailTemplate.php at line 193
    XenForo_DataWriter_EmailTemplate->_getTemplateModifications() in XenForo/DataWriter/EmailTemplate.php at line 201
    XenForo_DataWriter_EmailTemplate->_verifyTemplateField() in XenForo/DataWriter/EmailTemplate.php at line 160
    XenForo_DataWriter_EmailTemplate->_verifySubject()
    call_user_func_array() in XenForo/DataWriter.php at line 982
    XenForo_DataWriter->_runVerificationCallback() in XenForo/DataWriter.php at line 725
    XenForo_DataWriter->_isFieldValueValid() in XenForo/DataWriter.php at line 643
    XenForo_DataWriter->set() in XenForo/DataWriter.php at line 995
    XenForo_DataWriter->bulkSet() in XenForo/Model/EmailTemplate.php at line 647
    XenForo_Model_EmailTemplate->importEmailTemplatesAddOnXml() in XenForo/Deferred/ImportEmailTemplate.php at line 15
    XenForo_Deferred_ImportEmailTemplate->execute() in XenForo/Deferred/Atomic.php at line 66
    XenForo_Deferred_Atomic->execute() in XenForo/Model/Deferred.php at line 295
    XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 429
    XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 355
    XenForo_Model_Deferred->runByUniqueKey() in XenForo/Install/Controller/Abstract.php at line 34
    XenForo_Install_Controller_Abstract->_manualDeferredRunner() in XenForo/Install/Controller/Upgrade.php at line 221
    XenForo_Install_Controller_Upgrade->actionRunDeferred() in XenForo/FrontController.php at line 351
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in /var/www/vhosts/sanitariacamporomano.com/trollandia/install/index.php at line 18
 

Mike

XenForo developer
Staff member
#2
There's really no reason for this error to happen. The table wasn't touched. What was the last upgrade you did? Have you installed and/or uninstalled any add-ons since then?
 

Mike

XenForo developer
Staff member
#4
Do you remember the specific errors? I'd be very concerned if you appear to be randomly missing tables and columns. They are not things that can generally disappear randomly and recreating them will still lead to data loss.
 

Mike

XenForo developer
Staff member
#7
Code:
CREATE TABLE `xf_email_template_modification` (
    `modification_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `addon_id` VARBINARY(25) NOT NULL,
    `template` VARBINARY(50) NOT NULL,
    `modification_key` VARBINARY(50) NOT NULL,
    `description` varchar(255) NOT NULL,
    `execution_order` int(10) unsigned NOT NULL,
    `enabled` tinyint(3) unsigned NOT NULL,
    `search_location` varchar(25) NOT NULL,
    `action` varchar(25) NOT NULL,
    `find` text NOT NULL,
    `replace` text NOT NULL,
    PRIMARY KEY (`modification_id`),
    UNIQUE KEY `modification_key` (`modification_key`),
    KEY `addon_id` (`addon_id`),
    KEY `template_order` (`template`,`execution_order`)
) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE TABLE `xf_email_template_modification_log` (
    `template_id` int(10) unsigned NOT NULL,
    `modification_id` int(10) unsigned NOT NULL,
    `status` varchar(25) NOT NULL,
    `apply_count` int(10) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`template_id`,`modification_id`),
    KEY `modification_id` (`modification_id`)
) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;
 

malachiel

Active member
#8
Now it saying this
Code:
Mysqli statement execute error : Field 'modification.template' doesn't have a default value

    Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
    Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
    Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
    Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1624
    XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1613
    XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1405
    XenForo_DataWriter->save() in XenForo/Model/EmailTemplate.php at line 648
    XenForo_Model_EmailTemplate->importEmailTemplatesAddOnXml() in XenForo/Deferred/ImportEmailTemplate.php at line 15
    XenForo_Deferred_ImportEmailTemplate->execute() in XenForo/Deferred/Atomic.php at line 66
    XenForo_Deferred_Atomic->execute() in XenForo/Model/Deferred.php at line 295
    XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 429
    XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 355
    XenForo_Model_Deferred->runByUniqueKey() in XenForo/Install/Controller/Abstract.php at line 34
    XenForo_Install_Controller_Abstract->_manualDeferredRunner() in XenForo/Install/Controller/Upgrade.php at line 221
    XenForo_Install_Controller_Upgrade->actionRunDeferred() in XenForo/FrontController.php at line 351
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in /var/www/vhosts/sanitariacamporomano.com/trollandia/install/index.php at line 18
 

Brogan

XenForo moderator
Staff member
#9
This has been resolved.

It was due to a field which had been added (either manually or from an add-on) to one of the database tables.