Not a bug Server Errors after upgrading to RM 1.1

Scharesoft

Active member
I tried to update to the new version of the resource manager, but there is an server error when I want to go to the resource area:

Server Error
Undefined index: featured_count

  1. XenForo_Application::handlePhpError() in XenResource/Model/Category.php at line 503
  2. XenResource_Model_Category->_applyRecursiveCountsToGrouped() in XenResource/Model/Category.php at line 474
  3. XenResource_Model_Category->applyRecursiveCountsToGrouped() in XenResource/ControllerPublic/Resource.php at line 67
  4. XenResource_ControllerPublic_Resource->actionIndex() in XenForo/FrontController.php at line 337
  5. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  6. XenForo_FrontController->run() in /var/www/dev/forum.dev.scharesoft.de/index.php at line 13

In the ACP when choosing a resource category there is this error

Server Error
Mysqli prepare error: Unknown column 'resource_field.display_group' in 'order clause'

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in XenForo/Model.php at line 219
  5. XenForo_Model->fetchAllKeyed() in XenResource/Model/ResourceField.php at line 78
  6. XenResource_Model_ResourceField->getResourceFields() in XenResource/ControllerAdmin/Category.php at line 72
  7. XenResource_ControllerAdmin_Category->_getCategoryAddEditResponse() in XenResource/ControllerAdmin/Category.php at line 116
  8. XenResource_ControllerAdmin_Category->actionEdit() in XenForo/FrontController.php at line 337
  9. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  10. XenForo_FrontController->run() in /var/www/dev/forum.dev.scharesoft.de/admin.php at line 13

They appear even when disabling all other addons.

I hope this is the correct thread for these error messages.
 
Did you have any RM related add-ons installed? It's possible they conflict. It was told that @Waindigo's RM custom fields will cause conflicts and that could lead to this.

AFAIK, the only (simple) way to recover right now is to revert to your pre-upgrade backup and uninstall the conflicting add-on (assuming it cleans up its data) and then upgrade the RM.
 
Did you have any RM related add-ons installed? It's possible they conflict. It was told that @Waindigo's RM custom fields will cause conflicts and that could lead to this.

AFAIK, the only (simple) way to recover right now is to revert to your pre-upgrade backup and uninstall the conflicting add-on (assuming it cleans up its data) and then upgrade the RM.

So what's the hard way? =)

I had this mod installed well before the upgrade & it was disabled before I added it. How can I go about removing the above?

Mysqli prepare error: Unknown column 'resource_field.display_group' in 'order clause'
 
The latest update to Custom Fields by Waindigo add-on should now fix any issues and allow you to keep all your existing data and get all the new custom fields functionality from the Resource Manager update as well as all the extra functionality from the Custom Fields by Waindigo add-on:
http://xenforo.com/community/resources/custom-fields-by-waindigo.885/update?update=6623

Existing users of Custom Resource Fields in Resource Manager 1.0.0 using this add-on should upgrade this add-on first, then upgrade Resource Manager, then rebuild caches for Resources and Resource Categories (Admin CP -> Tools -> Rebuild Caches) to avoid losing any data.
 
Uninstalling custom fields and then reupgrading resource manager should also work.

This doesn't work if you've already upgraded to beta 2 apparently. As I'm still missing the column in the table. Could any one perhaps throw together a query that could be ran to add the missing column back?
 
Fixed my above issue, although now I'm getting this error.

Code:
Mysqli prepare error: Unknown column 'prefix_id' in 'field list'

    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 Zend/Db/Adapter/Abstract.php at line 574
    Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1612
    XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1601
    XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1393
    XenForo_DataWriter->save() in XenResource/ControllerPublic/Resource.php at line 1085
    XenResource_ControllerPublic_Resource->actionSave() in XenForo/FrontController.php at line 337
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in index.php at line 13

I've re-installed the upgrade for RM, and still get this.
 
Still no go. I've tried with and without Chris' addon. Also tried re-upgrading your custom fields addon without Chris' addon before trying to upgrade RM. Nothing seems to add the missing column back. Is there a way to export current resources and re-install RM completely? Or even better...is there an easy way to add the missing column back? I'm bad when it comes to mysql queries.
 
I believe XenTag is the only other addon that may tie into RM (for tagging resources.) I've disabled this addon before trying what you said to do above. Only other thing I can think to do would be to un-install it and try again...although the RM beta 2 upgrade doesn't appear to try and create the column that is missing, or is this because something may be conflicting with it? I don't see why it would fail to create a column because of that though.
 
The query that is failing is:
Code:
ALTER TABLE xf_resource
ADD custom_resource_fields MEDIUMBLOB NOT NULL,
ADD prefix_id INT UNSIGNED NOT NULL DEFAULT 0,
ADD icon_date INT UNSIGNED NOT NULL DEFAULT 0,
ADD KEY prefix_id (prefix_id)

This query will fail if any of these columns already exists. The latest update to the Custom Fields add-on should remove the custom_resource_fields column before this is attempted but this appears to be failing. I can't see any other reason why this wouldn't be working.

So my suggestion would be to run the following query manually:
Code:
ALTER TABLE xf_resource DROP custom_resource_fields
and then either run the above code or re-upgrade Resource Manager.

You may also need to run the following query manually:
Code:
ALTER TABLE xf_resource_category DROP field_cache

This relates to the following query, which is probably also failing:
Code:
ALTER TABLE xf_resource_category
ADD field_cache MEDIUMBLOB NOT NULL,
DROP allow_submit_user_group_ids,
ADD prefix_cache MEDIUMBLOB NOT NULL COMMENT 'Serialized data from xf_resource_category_prefix, [group_id][prefix_id] => prefix_id',
ADD require_prefix TINYINT UNSIGNED NOT NULL DEFAULT '0',
ADD featured_count SMALLINT UNSIGNED NOT NULL DEFAULT '0'
 
Top Bottom