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

Not a Bug Server Errors after upgrading to RM 1.1

Discussion in 'Resource Manager Resolved Bugs' started by Scharesoft, Oct 9, 2013.

  1. Scharesoft

    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:

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

    They appear even when disabling all other addons.

    I hope this is the correct thread for these error messages.
     
  2. Mike

    Mike XenForo Developer Staff Member

    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.
     
    JVCode and Scharesoft like this.
  3. Jon W

    Jon W Well-Known Member

    As @Mike, said you will have to uninstall the Custom Fields add-on first or wait for an update to be released.
     
    Scharesoft likes this.
  4. Scharesoft

    Scharesoft Active Member

    Thanks for your help! It's really the Custom Fields add-on.
     
    Jon W likes this.
  5. ggace

    ggace Active Member

    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?

     
  6. Jon W

    Jon W Well-Known Member

    Uninstalling custom fields and then reupgrading resource manager should also work.
     
    Andrej, oVR, Scharesoft and 2 others like this.
  7. ggace

    ggace Active Member

    Confirmed. Thanks!
     
  8. Jon W

    Jon W Well-Known Member

    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.
     
    Mike likes this.
  9. 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?
     
  10. Jon W

    Jon W Well-Known Member

    Install the latest version of custom fields and then reinstall resource manager.
     
  11. Thanks for the quick reply, I'll give it a try.
     
  12. 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.
     
  13. Jon W

    Jon W Well-Known Member

    How are you installing the upgrade?
     
  14. For RM, I'm uploading the files for the beta2 upload and installing with the xml file that is included. For the Custom Fields addon, I'm using @Chris Deeming's installer.
     
  15. Jon W

    Jon W Well-Known Member

    Try disabling Chris Deeming's add-on and then upgrade Resource Manager again.
     
  16. 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.
     
  17. Jon W

    Jon W Well-Known Member

    Do you have any other add-ons that are related to Resource Manager?
     
  18. 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.
     
  19. Jon W

    Jon W Well-Known Member

    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'
     
    Mike likes this.

Share This Page