Hi Wim,
This looks like it could be a regression introduced in Mendix 11.12.7, especially since the same implementation was working correctly in 11.12.6.
As a first step, I would suggest checking whether the Phone navigation profile is actually being passed correctly to the Runtime when the microflow is executed.
A few things worth checking:
Try opening the application in an incognito window or clearing the browser cache to rule out any cached profile information.
Check whether the same issue occurs when accessing the application from an actual mobile device, rather than forcing the Phone profile through the URL.
Try displaying $currentDeviceType directly on the page and compare the results between Mendix 11.12.6 and 11.12.7.
One important point is that selecting the Phone navigation profile and retrieving $currentDeviceType should be consistent. If the Phone profile is applied but the microflow still receives Desktop, something might have changed in how the device type is detected or passed to the Runtime.
As a temporary workaround, you could use separate homepages for the Responsive Web and Phone Web profiles if the requirement is only to show different pages. However, I wouldn't recommend changing all existing microflows just to handle this issue.
Since this was working in 11.12.6 and started behaving differently in 11.12.7, I think it is worth reporting to Mendix Support as a possible regression.
It would also be helpful to reproduce this in a small test project with both navigation profiles and a simple microflow that displays $currentDeviceType. Testing the same project in both versions would help identify whether this is version-specific.
Hi Wim,
The important distinction here is that $currentDeviceType and the active navigation profile are two different concepts in Mendix.
The URL parameter:
?profile=Phoneselects the Phone Web navigation profile, but it does not change the actual device type detected by the Mendix client.
For example, when opening:
http://localhost:8081/index.html?profile=Phonein a desktop browser, Mendix can display the Phone Web navigation profile while $currentDeviceType still evaluates to Desktop.
1. Verify the behavior on an actual mobile device
Open the application on a physical phone or use Chrome DevTools device emulation, ensuring that mobile device emulation is enabled before loading the page.
Then check the value of $currentDeviceType.
2. Separate navigation profile logic from device detection
If your requirement is to display pages based on the actual device type, continue using $currentDeviceType.
However, if your requirement is to display different pages based on the selected navigation profile, do not rely on $currentDeviceType to identify that profile.
3. Check for a version-specific regression
Since you mentioned that the same scenario worked in Studio Pro 11.12.6 but behaves differently in 11.12.7, I recommend reproducing it in a minimal application using both versions.
Test the following scenarios:
Desktop browser with the Responsive Web profile.
Desktop browser with ?profile=Phone.
Actual mobile browser with the Phone Web profile.
If the behavior differs between versions under identical conditions, raise a Mendix Support ticket with the reproduction project and results.
If your intention is to determine whether the user is accessing the application from a desktop or mobile device, use $currentDeviceType.
If your intention is to determine which navigation profile is active, implement that logic separately rather than using $currentDeviceType as a navigation-profile identifier.
The fact that the Phone Web navigation profile is active does not necessarily mean the detected device type must be Phone.
Reference:
https://docs.mendix.com/refguide/system-variables/
Hope this helps! If you find this answer helpful, please mark it as the accepted answer.