Posts 1 - 10 of 12
First | Prev. | 1 2 | Next | Last
|
|
Brian Link
Guest
|
We've just started rolling out our app to machines running Win10 and Office 2016. One user is getting the error "Custom UI Runtime Error in <our app> - Error found in Custom UI XML of <our app> - The ID '<controlname_long string of characters'> is duplicated".
Not sure if this is a Win10/Office2016 problem, or just a coincidence that it's showing up on a user with that configuration.
Also, it's giving me a line and column number for this error. What XML document is that contained in? |
|
Posted 17 Aug, 2016 11:26:39
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hello Brian,
That's the XML markup available in the e.Xml parameter of the OnRibbonBeforeLoad event of the add-in module. I suppose you've copied/pasted the Id of a component and this is why you get this problem.
Andrei Smolin
Add-in Express Team Leader |
|
Posted 18 Aug, 2016 03:02:00
|
|
Top
|
|
Brian Link
Guest
|
Thanks, Andre. The question is how to do I fix/troubleshoot the issue? Is there actually a physical xml file in the file structure somewhere that I can edit to prevent this error? |
|
Posted 23 Aug, 2016 14:29:10
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hello Brian,
There's no physical XML file. Instead, the XML markup is generated basing on the settings of the Ribbon components. You can print the markup: see the e.Xml parameter of the OnRibbonBeforeLoad event of the add-in module. Almost every tag in the markup corresponds to a component.
Alternatively, you can compare the settings of the Ribbon components: see how the ID properties of the ribbon components are set in the InitializeComponent method() - it's called from the constructor of your add-in module.
Andrei Smolin
Add-in Express Team Leader |
|
Posted 24 Aug, 2016 01:16:56
|
|
Top
|
|
Brian Link
Guest
|
Again, thanks for your prompt responses, Andre.
I'm still stuck at this error. If it shows that there is indeed a duplicate name for a control, how do I fix it? |
|
Posted 24 Aug, 2016 21:19:06
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hello Brian,
In OnRibbonBeforeLoad, copy the XML to Clipboard, then paste the result to Notepad and use Ctrl+F to check if a duplicate exists for every ID in the Ribbon XML.
System.Windows.forms.Clipboard.SetText(e.Xml)
Sometimes this code line throws an exception. I don't know what causes it. I just ignore it and restart the host application.
Andrei Smolin
Add-in Express Team Leader |
|
Posted 25 Aug, 2016 03:46:02
|
|
Top
|
|
Brian Link
Guest
|
I've finally captured that XML when it throws an error. Indeed, that control id is present twice. It's in the element <tab getKeytip="getKeytip_Callback" getLabel="getLabel_Callback" getVisible="getVisible_Callback" id="adxRibbonTab_dbee1f362038445cb90e821d66b756d5">
So now that I've confirmed the duplicate, how do I remove it? Thank you. |
|
Posted 29 Aug, 2016 14:42:38
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hello Brian,
Now that you know the component containing this ID, you can modify the Id property of that component.
Andrei Smolin
Add-in Express Team Leader |
|
Posted 30 Aug, 2016 03:44:37
|
|
Top
|
|
Brian Link
Guest
|
That did it! Thanks, Andre. |
|
Posted 30 Aug, 2016 11:19:04
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
You are welcome!
Andrei Smolin
Add-in Express Team Leader |
|
Posted 31 Aug, 2016 03:17:21
|
|
Top
|
|
Posts 1 - 10 of 12
First | Prev. | 1 2 | Next | Last
|