Method closeSolution doesn't open given solution

The method ‘closeSolution’ doesn’t open given solution when called in global method which is called in webclient using deeplinking in Servoy 5.1.1. For example we use a method ‘setLocale’ for a webclient application to force a certain locale settings independent of the browser settings. This method calls the closeSolution method with solution name if it changes the locale setting to force Servoy to reload the solution with the right locale settings. This worked fine in Servoy 3.5, but not anymore in 5.1.1. However when calling the same global method from a form in the solution, everything works fine. So it’s just when called from deeplinked method in webclient.

Ok, but what happens when you call it from global method ? The same solution reloads ? Does it happen from developer or from application server (in case you only tried in developer can you also try from application server) ?

I tried it on both developer and application server. Same result on both.
Here is the code of the global method:

function setLocale() {
	// gets the parameter from url and set to glb_locale
	//
	// parameters : 	language-country etc. : nl-NL
	// returns:			null
	application.output('setLocale: START');
	var vChosenLanguage = arguments[0];
	if (!vChosenLanguage) return; // no new locale settings so nothing to do
	if (!vChosenLanguage.split) return; // no split, so no string value, so do nothing
	
	// set Locale
	
	var arrLocale = vChosenLanguage.split('-');
	var _language = arrLocale[0];
	var _country = arrLocale[1];
	application.output('setLocale, language:' + _language);
	if (!i18n.getCurrentLanguage().equalsIgnoreCase(_language)) {
		application.output('setLocale, set i18n locale');
		i18n.setLocale(_language, _country);
		// reset solution to activate locale change for first form
		application.output('setLocale, closeSolution');
		application.closeSolution('testCloseSolution'); 
	}
	application.output('setLocale: END');
}

When called in onAction method of button on a form the solution is closed and opened again. When called via deeplink URL (like ‘…/ss/s/testCloseSolution/m/setLocale/a/en-US’) the solution is closed and session stays in a solutionless state (admin page).

Ok, did you open a case about this ( http://www.servoy.com/s ) ? We have to check why it doesn’t work anymore …

I opened a case for it. (case 284155)

The issue is fixed now, will be included in next version (5.1.3). The problem was it also wanted a method name in order for this mechanism to work. So, if you just create a dummy method and give it to closeSolution should work well (to use as workaround until next release).