Error when using icons on buttons in Studio Pro 10.6
1
Hi, I recently updated to Mendix Studio Pro 10.6 and am facing an error with some of my pages. The error appears to be linked to using buttons with icons for displaying rather than text, please see the error message below. Is there a fix for this or a workaround as I cannot open the affected pages so would have to recreate them and also find an alternative for using the icon on the button. System.ArgumentException: Font 'GLYPHICONS Halflings' does not support style 'Regular'. at System.Drawing.Font.CreateNativeFont() at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont) at System.Drawing.Font..ctor(FontFamily family, Single emSize, GraphicsUnit unit) at Mendix.Modeler.WebUI.View.Windows.StructureMode.Drawing.Iconss.LegacyGlyphFontManager.CacheFont(Int32 heightInPixels) in Mendix.Modeler.WebUI.View.Windows\StructureMode\Drawing\Iconss\GlyphFontManager.Legacy.cs:line 45 at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) at Mendix.Modeler.WebUI.View.Windows.StructureMode.Drawing.ViewHelpers.ButtonConfig.WithIcon[T](T element, Func`1 getCaptionColor, ICustomIconCollectionFontCache customIconCollectionFontCache, ILegacyMxImageCache legacyMxImageCache, ILegacyImageConverter legacyImageConverter) in Mendix.Modeler.WebUI.View.Windows\StructureMode\Drawing\ViewHelpers\ButtonConfig.cs:line 56 at Mendix.Modeler.WebUI.View.Windows.StructureMode.Drawing.Views.Buttons.DrawableButtonView`1.GetButtonConfig(Boolean includeText) in Mendix.Modeler.WebUI.View.Windows\StructureMode\Drawing\Views\Buttons\DrawableButtonView.cs:line 63 at Mendix.Modeler.WebUI.View.Windows.StructureMode.Drawing.Views.Buttons.DrawableButtonView`1.Paint(Graphics graphics) in Mendix.Modeler.WebUI.View.Windows\StructureMode\Drawing\Views\Buttons\DrawableButtonView.cs:line 50 at Mendix.Modeler.WebUI.View.Windows.FormEditorControls.FormEditorControl.PaintElement(Graphics graphics, IDrawableView child, IViewWithEditableCaption skipCaption) in Mendix.Modeler.WebUI.View.Windows\FormEditorControls\FormEditorControl.cs:line 378 at Mendix.Modeler.WebUI.View.Windows.FormEditorControls.FormEditorControl.PaintChildren(Graphics graphics, IEnumerable`1 children, Rectangle bounds, IViewWithEditableCaption skipCaption) in Mendix.Modeler.WebUI.View.Windows\FormEditorControls\FormEditorControl.cs:line 354 at Mendix.Modeler.WebUI.View.Windows.FormEditorControls.FormEditorControl.PaintElement(Graphics graphics, IDrawableView child, IViewWithEditableCaption skipCaption) in Mendix.Modeler.WebUI.View.Windows\FormEditorControls\FormEditorControl.cs:line 378 at Mendix.Modeler.WebUI.View.Windows.FormEditorControls.FormEditorControl.PaintChildren(Graphics graphics, IEnumerable`1 children, Rectangle bounds, IViewWithEditableCaption skipCaption) in Mendix.Modeler.WebUI.View.Windows\FormEditorControls\FormEditorControl.cs:line 354 at Mendix.Modeler.WebUI.View.Windows.FormEditorControls.FormEditorControl.PaintElement(Graphics graphics, IDrawableView child, IViewWithEditableCaption skipCaption) in Mendix.Modeler.WebUI.View.Windows\FormEditorControls\FormEditorControl.cs:line 378 at Mendix.Modeler.WebUI.View.Windows.FormEditorControls.FormEditorControl.PaintChildren(Graphics graphics, IEnumerable`1 children, Rectangle bounds, IViewWithEditableCaption skipCaption) in Mendix.Modeler.WebUI.View.Windows\FormEditorControls\FormEditorControl.cs:line 354 at Mendix.Modeler.WebUI.View.Windows.FormEditorControls.FormEditorControl.PaintElement(Graphics graphics, IDrawableView child, IViewWithEditableCaption skipCaption) in Mendix.Modeler.WebUI.View.Windows\FormEditorControls\FormEditorControl.cs:line 378 at Mendix.Modeler.WebUI.View.Windows.FormEditorControls.FormEditorControl.PaintChildren(Graphics graphics, IEnumerable`1 children, Rectangle bounds, IViewWithEditableCaption skipCaption) in Mendix.Modeler.WebUI.View.Windows\FormEditorControls\FormEditorControl.cs:line 354 at Mendix.Modeler.WebUI.View.Windows.FormEditorControls.FormEditorControl.autoCanvas_CanvasPaint(Object sender, PaintEventArgs e) in Mendix.Modeler.WebUI.View.Windows\FormEditorControls\FormEditorControl.cs:line 291 at Mendix.Modeler.Utility.AutoCanvas.canvas_Paint(Object sender, PaintEventArgs e) in Mendix.Modeler.Utility.Gui\AutoCanvas.cs:line 385 at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
asked
Liam Gray
1 answers
3
Hello Liam Gray! I had the same problem, try the following procedure:
In "YourProjectFolder" \theme\web\fonts try to delete GLYPHICONS Halflings files :
glyphicons-halflings-regular.eot
glyphicons-halflings-regular.svg
glyphicons-halflings-regular.ttf
glyphicons-halflings-regular.woff
glyphicons-halflings-regular.woff2
and if there are others with the name glyphicons-halflings-regular delete them too.
After that, open the project in the latest version of mendix before making the migration.
It will open normally, check if the files were created again, if so, delete them and then commit the code.
Then open it with mendix version 10.6.1 and try to migrate.
In my case it was necessary to update the SAML2 and Atlas Core module, Atlas Web Content
OBS: If the problem persists, try deleting the following folders and repeat the process