Resource icon

Template Modification System (TMS) 1.3.1

No permission to download
Here's a fix:

Replace the fetchAllKeyed function in TMS/Model/Template.php with:
Code:
 public function fetchAllKeyed($sql, $key, $bind = array(), $nullPrefix = '')
{
if (strpos($sql, 'template_map') !== false) {
$sql = str_replace('SELECT ', 'SELECT template_map.template_final, template_map.template_modifications, ', $sql);
}
 
return parent::fetchAllKeyed($sql, $key, $bind, $nullPrefix);
}
I've submitted a pull request so he should see it pretty soon.
 
Here's a fix:

Replace the fetchAllKeyed function in TMS/Model/Template.php with:
Code:
 public function fetchAllKeyed($sql, $key, $bind = array(), $nullPrefix = '')
{
if (strpos($sql, 'template_map') !== false) {
$sql = str_replace('SELECT ', 'SELECT template_map.template_final, template_map.template_modifications, ', $sql);
}
 
return parent::fetchAllKeyed($sql, $key, $bind, $nullPrefix);
}
Fifteen minutes after 1.1.4 is released and we've already got a fix for about the only thing I use that broke. This is pretty much why I paid good money for XenForo.
 
1.1.4 Discussion thread :) Questions, comments and upgrades!

I'm going to highlight this one point in particular.

register_form
Add support for the registration timer and add the reg_key input.​

You need to update/revert this template, otherwise you may lose the ability for people to register on your site.


Common issues.

TMS (http://xenforo.com/community/resources/template-modification-system-tms.293/) needs an update if you have debug enabled

in library/TMS/Model/Template.php:

Find:
Code:
public function fetchAllKeyed($sql, $key, $bind = array())
{
if (strpos($sql, 'template_map') !== false) {
$sql = str_replace('SELECT ', 'SELECT template_map.template_final, template_map.template_modifications, ', $sql);
}
 
return parent::fetchAllKeyed($sql, $key, $bind);
}

Replace with:

Code:
public function fetchAllKeyed($sql, $key, $bind = array(), $nullPrefix = '')
{
if (strpos($sql, 'template_map') !== false) {
$sql = str_replace('SELECT ', 'SELECT template_map.template_final, template_map.template_modifications, ', $sql);
}
 
return parent::fetchAllKeyed($sql, $key, $bind, $nullPrefix);
}

http://xenforo.com/community/threads/1-1-4-discussion-thread.47031/#post-505736
FYI Guiltar.
 
I've got an error upgrading from XF 1.1.3 > 1.1.4 involving the TMS:

Server Error

Declaration of TMS_Model_Template::fetchAllKeyed() should be compatible with that of XenForo_Model::fetchAllKeyed()
  1. XenForo_Application::handlePhpError() in XenForo/Autoloader.php at line 119
  2. XenForo_Autoloader::autoload() in XenForo/Autoloader.php at line 119
  3. XenForo_Autoloader->autoload() in XenForo/Application.php at line 872
  4. XenForo_Application::autoload() in XenForo/Application.php at line 411
  5. XenForo_Application::resolveDynamicClass() in XenForo/Model.php at line 189
  6. XenForo_Model::create() in XenForo/Controller.php at line 101
  7. XenForo_Controller->getModelFromCache() in XenForo/ControllerAdmin/Home.php at line 26
  8. XenForo_ControllerAdmin_Home->actionIndex() in XenForo/FrontController.php at line 310
  9. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  10. XenForo_FrontController->run() in /home/mytennis/public_html/admin.php at line 13
 
If you uninstall TMS and then reinstall it and have add-ons that use TMS.. do you have to uninstall and reinstall all those add-on xml files as well?
 
Everything seems to be screwed now. All Developers need to update their resource according to 1.1.4. I have disabled most of the addons associated with TMS.

:(
 
If you uninstall TMS and then reinstall it and have add-ons that use TMS.. do you have to uninstall and reinstall all those add-on xml files as well?
Yes because when you uninstall TMS you lose all the mods.
Everything seems to be screwed now. All Developers need to update their resource according to 1.1.4. I have disabled most of the addons associated with TMS.

:(
You only need to upgrade TMS to fix the above issue.
 
Everything seems to be screwed now. All Developers need to update their resource according to 1.1.4. I have disabled most of the addons associated with TMS.

:(

I'm sure they will when they have time. I'm also sure most are hard working and have other priorities and can't update an add-on as soon as an update comes out.
 
I'm sure they will when they have time. I'm also sure most are hard working and have other priorities and can't update an add-on as soon as an update comes out.

Yes, Agree with you. Most of them would be working for the releases.
 
I expect everything to be gone when I uninstall something.

Was this 1.1.4 and TMS conflict avoidable ?
Yes and no. Yes because it's a strict error that only affects admincp in debug mode, and TMS doesn't make use of this new parameter. No because this extra parameter popped up just in this version.
 
I hate to be the one to spoil a party, but in general it is not a good idea to grab every upgrade (even XF) on the first day and install it on production servers.

Most IT pros would never consider upgrading en masse on release day. Heck, my Mac Pro was running Snow leopard (two OS's back) until last week.

More conflicts are avoidable.....by waiting a bit.
 
I hate to be the one to spoil a party, but in general it is not a good idea to grab every upgrade (even XF) on the first day and install it on production servers.

Most IT pros would never consider upgrading en masse on release day. Heck, my Mac Pro was running Snow leopard (two OS's back) until last week.

More conflicts are avoidable.....by waiting a bit.
Well to justify this is a minor releases so guards were down, and we had waited years for this update... :P

But you do have a point.
 
Top Bottom