Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 5.x > Installation and deployment > Error during export when selecting Role object View modes: 
User avatar
Member
Member
michiel - 8/5/2010 8:51:29 AM
   
Error during export when selecting Role object
Today I added a role to site and tried to export the site afterwards. The xport process throws the following exceptions consistently. If I don't select the role then the export completes successfully. I just updated to the latest v5.5.11 but it doesn't help.

Any idea what could cause this exception?

Thanks for looking!


ERROR: Fout tijdens het ophalen van 'Rol' gegevens
Message: Object reference not set to an instance of an object. Stack Trace: at CMS.SettingsProvider.TranslationHelper.GetCodeNamesFromDB(String className, Int32[] objectIDs, String siteName)
at CMS.SettingsProvider.TranslationHelper.RegisterRecords(DataTable dt, String className, String idColumnName, String siteName, String[] excludedNames)
at CMS.CMSHelper.CMSObjectHelper.GetObjectsData(OperationTypeEnum operation, IInfoObject infoObj, String where, String orderBy, Boolean childData, Boolean binaryData, TranslationHelper th, String[] excludedNames, Int32 siteId)
at CMS.CMSImportExport.ExportProvider.GetExportData(SiteExportSettings settings, String where, String objectType, Boolean childData, TranslationHelper th)
at CMS.CMSImportExport.ExportProvider.GetExportData(SiteExportSettings settings, String objectType, Boolean siteObjects, Boolean childData, TranslationHelper th)

ERROR: Fout tijdens het exporteren van objecten.
Message: Object reference not set to an instance of an object. Stack Trace: at CMS.CMSImportExport.ExportProvider.GetExportData(SiteExportSettings settings, String objectType, Boolean siteObjects, Boolean childData, TranslationHelper th)
at CMS.CMSImportExport.ExportProvider.ExportObjectsData(SiteExportSettings settings)

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 8/6/2010 3:09:39 AM
   
RE:Error during export when selecting Role object
Hi,

I created a role in Site Manager and exported site without any issue. Tested on default 5.5 installation.

So I have several questions for you:

1. Could you describe how did you create your role (using Site Manager or API)?
2. Did you add same custom field to CMS_Role table? If yes, did you also add this field to CMS_Class table? Custom fields created in CMS_Role has to be added to ClassFormDefinition column of CMS_Class table.
3. Could you please check if your new role was correctly saved in database (CMS_Role table)?

Best regards,
Ivana Tomanickova

User avatar
Member
Member
michiel - 8/9/2010 5:53:44 AM
   
RE:Error during export when selecting Role object
1. I created the role using the site manager.
2. I did not add custom fields to the CMS_Role table
3. What is the definition of "correctly saved"? I got no errors when saving, and the role is displayed with all its fields the way I saved it.

The values for RoleGroupID, RoleIsGroupAdministrator are both NULL, the rest of the columns have the correct values.

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 8/9/2010 7:16:59 AM
   
RE:Error during export when selecting Role object
Hi

Could you describe with more details how did you create this role and how did you export the site, please? Regrettably, I am not able to simulate this behavior without your description.

What kind of database are you using?

Error message means that NullReferenceException was thrown. If the role is in database, null should not be returned.

Thank you in advance for information.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
michiel - 8/9/2010 7:54:32 AM
   
RE:Error during export when selecting Role object
Like I said, I created the role in the Site Manager, there is only one way to create a role I think. CMS Site Manager > Administration > Roles > New rol.

As for the export, it's just a matter of exporting the site, select previous export settings (containing only a few document types), and then also selecting the role.

I don't think I've done it any different way than I normally do.

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 8/9/2010 8:37:42 AM
   
RE:Error during export when selecting Role object
Hi

Could you please specify what was the role display name and the role code name? Did you assign same user to this role?
Could you describe your export settings?
Do you have problem only with this one role or you are not able to export any new role?
Have you tried to export only this one role?

Best regards,
Ivana Tomanickova

User avatar
Member
Member
michiel - 8/16/2010 3:04:59 AM
   
RE:Error during export when selecting Role object
I can't delete the role. When I click the delete button in CMS Site Manager > Administration > Roles I get a confirmation, I click OK, and then nothing seems to happen.

When I check the role details, I see that all users have been removed from the role when I clecked delete. But the role is not deleted.

Here is the exception from the log, I don't really know how to interpret it, seems like a missing translation in the database?

----------

Message: De objectverwijzing is niet op een exemplaar van een object ingesteld.
Stack Trace:
bij CMS.SettingsProvider.TranslationHelper.GetCodeNamesFromDB(String className, Int32[] objectIDs, String siteName)
bij CMS.SettingsProvider.TranslationHelper.RegisterRecords(DataTable dt, String className, String idColumnName, String siteName, String[] excludedNames)
bij CMS.CMSHelper.CMSObjectHelper.GetObjectsData(OperationTypeEnum operation, IInfoObject infoObj, String where, String orderBy, Boolean childData, Boolean binaryData, TranslationHelper th, String[] excludedNames, Int32 siteId)
bij CMS.CMSHelper.CMSObjectHelper.GetObjectsData(OperationTypeEnum operation, IInfoObject infoObj, String where, String orderBy, Boolean childData, Boolean binaryData, TranslationHelper th, String[] excludedNames)
bij CMS.CMSHelper.CMSObjectHelper.GetObjectsData(OperationTypeEnum operation, IInfoObject infoObj, String where, String orderBy, Boolean childData, Boolean binaryData, TranslationHelper th)
bij CMS.Staging.TaskInfoProvider.GetObjectsData(IInfoObject infoObj, String where, String orderBy, Boolean childData, Boolean binaryData, TranslationHelper th)
bij CMS.Staging.ExportTaskInfoProvider.LogTask(IInfoObject infoObj, TaskTypeEnum taskType, GeneralConnection conn, String siteName)
bij CMS.Staging.SynchronizedInfo.Delete()
bij CMS.SiteProvider.RoleInfoProvider.DeleteRoleInfoInternal(RoleInfo roleObj, GeneralConnection conn)
bij CMS.SiteProvider.RoleInfoProvider.DeleteRoleInfo(Int32 roleId)
bij CMSSiteManager_Administration_Roles_Controls_RoleList.gridElem_OnAction(String actionName, Object actionArgument) in c:\Users\Michiel\projecten\elan service platform\source\cms\CMSSiteManager\Administration\Roles\Controls\RoleList.ascx.cs:regel 130
bij CMS.UIControls.UniGrid.RaiseAction(String cmdName, String cmdValue)
bij CMSAdminControls_UI_UniGrid_UniGrid.Page_Load(Object sender, EventArgs e) in c:\Users\Michiel\projecten\elan service platform\source\cms\CMSAdminControls\UI\UniGrid\UniGrid.ascx.cs:regel 167
bij System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
bij System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
bij System.Web.UI.Control.OnLoad(EventArgs e)
bij CMS.ExtendedControls.AbstractUserControl.OnLoad(EventArgs e)
bij CMS.UIControls.CMSUserControl.OnLoad(EventArgs e)
bij System.Web.UI.Control.LoadRecursive()
bij System.Web.UI.Control.LoadRecursive()
bij System.Web.UI.Control.LoadRecursive()
bij System.Web.UI.Control.LoadRecursive()
bij System.Web.UI.Control.LoadRecursive()
bij System.Web.UI.Control.LoadRecursive()
bij System.Web.UI.Control.LoadRecursive()
bij System.Web.UI.Control.LoadRecursive()
bij System.Web.UI.Control.LoadRecursive()
bij System.Web.UI.Control.LoadRecursive()
bij System.Web.UI.Control.LoadRecursive()
bij System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 8/18/2010 9:00:33 AM
   
RE:Error during export when selecting Role object
Hi,

Thank you for your additional information, but could you please answer the questions from my previous post (at least what was the code name you used).

It seems that CMS.SettingsProvider.TranslationHelper.GetCodeNamesFromDB method returned null. This method should get the code names from database and returns Hashtable of couples [ID] -> [Codename].


Best regards,
Ivana Tomanickova