Overview
It can happen that you get a failure when trying to update the content of your M-Files objects used with the M-Files Plugin for Hubshare.
Versions of the Plugin that are concerned are 25.3.173.2 and below.
This article will explain to you why it happens and what the workaround is.
Solution
- To confirm that you have the issue mentioned in this article, verify if you get an error when trying to use the "Update now" button in the M-Files Plugin for Hubshare configuration dashboard.
You can verify it by going to the log file as well, by clicking on "View latest" in the logging section
If you see this error log below, then follow the article.
Error: The plugin couldn't compare the hub information between M-Files Hubshare and M-Files.
System.NullReferenceException: Object reference not set to an instance of an object.
at Hubshare.VAF.VaultApplication.GetHubChanges(Vault vault, Dictionary`2 hubsInMFiles, Dictionary`2 usersInMFiles, Dictionary`2 groupsInMFiles, Dictionary`2 hubPropertyChangesNeeded, Dictionary`2 hubsNotFoundInHubshare) in K:\GRB\HHaVvdJo\0\m-files-integrations\hubshareintegration\Hubshare.VAF\Classes\Synchronization.cs:line 1119
at Hubshare.VAF.VaultApplication.SyncItems(ITaskProcessingJob`1 job) in K:\GRB\HHaVvdJo\0\m-files-integrations\hubshareintegration\Hubshare.VAF\Classes\TaskQueues.cs:line 145 - This is happening because you created hubs from M-Files and those have no name and Hubshare has filled it by default.
- The first workaround is to identify your Hub objects that have an empty "Hub name" value and rename them.
- The other workaround is to rename the hubs that have "N/A" as name by going to Hubshare.
In Hubshare, click on the hubs button, and then "All hubs"
Look for the hubs that are called N/A in your list, and edit their name by going to "Configuration & Style" and "General configuration"
When edited press Save. - Go back to M-Files and you can manually update the content of the Hub object by applying this article /article/How-to-update-your-objects-Hubshare-related-metadata-with-the-M-Files-Plugin-for-Hubshare
This article will be edited when the Plugin version containing the fix for this will be published.
