Why does my Navigation revert to a previous version when I export a project from the server?

2
I have a Mendix project file (project,.mpr) in an SQL Server repository. I use 'Export Project To ...' to save a local version on my PC. I then work on the local version, and use the 'Export to file ...' option to export individual modules which are then imported to the server using 'Import module ...'. Changes to the Navigation menu cannot be imported and exported however (as far as I am aware), so I manually update any Navigation changes on the server version, having already made the same changes on my local copy. I then use 'Export Project To ...' and overwrite my local copy of project.mpr. However when I open project.mpr the changes I made to the Navigation have been replaced with the previous version. If I export to a different file name (e.g. project2.mpr) this doesn't happen. Also the project settings on my local version do not get refreshed by the server version. This suggests that some information is being held somewhere outside of the mpr file, but I can't find anything. Can someone explain why this is happening please. Thanks.
asked
6 answers
1

OK - I have answered a part of my question. I have found the user.xml file in my local AppData folder which holds the project settings, but this does not hold any navigation settings, which I would expect to be held in the mpr file itself. So my outstanding question is just why are my Navigation changes not being maintained when I export a new version.

answered
1

Hi Andrew,

I tried to reproduce your problem, but I wasn't able to. I did the following:

  • First, I created a new project on SQL Server. I exported this project to a local .mpr file.
  • While working on this local file, I added a form to the module MyFirstModule and created a navigation item for this form.
  • I exported MyFirstModule from the local file and imported it into the SQL Server project.
  • I updated navigation in the SQL Server project to match the navigation in the local file.
  • Then, I exported the SQL Server project to overwrite the local .mpr file.

The local .mpr file now featured the same navigation menus as the SQL Server version. Even after making some more changes to the SQL Server navigation, and exporting the project again, the changes were always correctly written to the local .mpr file.

Are you able to reproduce this problem, and if so, what exact steps are needed to reproduce it?

As a side note, it is correct that some of the project settings (particularly the ones in the 'Deployment' group box) are stored on your computer in a separate file, as these settings can differ per user and per project.

answered
1

Thanks Benny. I can reproduce it fairly consistently, although the symptoms are not always exactly the same. Just now I made some changes to a module in my local .mpr file, and added 2 new menu items called 'Customer Account' and 'Inactive Accounts' to the navigation, both linked to a different form. I then exported my module & closed the .mpr file. I then opened the SQL Server project, imported the module and added the same 2 new menu items to the navigation on the server, called 'Customer Account' and 'Inactive Accounts'. I then exported the project to a local .mpr file, overwriting my previous version. When I open the new local .mpr file both of the 2 new menu items appear simply as 'Menu item' on the navigation rather than 'Customer Account' and 'Inactive Accounts'. Although strangely, when I deploy the project the menu items appear correctly as 'Customer Account' and 'Inactive Accounts'. It appears that the Mendix Business Modeler is displaying a previous version of the navigation when it's being edited, but when it deploys, it deploys the correct current version. I assume the project file holds previous versions to allow changes to be undone, so maybe you are not seeing any problems because you have not made so many changes, whereas our project file has been under development for several weeks & has had many updates. Although it is odd that the symptoms don't appear if I save the exported file with a new project name.

answered
1

Hi Andrew,

Exporting a project to an existing .mpr file will delete this file and replace it with a fresh export, so this should not lead to different behavior than exporting to a new file. Is the local .mpr file still opened in the Modeler when you export the project from SQL server? If so, maybe you should try to export while the local file is not opened in the Modeler.

Let me know if this solves your problem.

answered
1

Hi Benny - thanks again, but yes I am closing the local file before I export from the server.

answered
1

OK - I think I have got to the bottom of this problem. It appears to be due to the Mendix language settings. The changes I have made have been made with the default language set to English, United Kindom (which is my default language). If I update it on the server & export it to the same file name then it retains the default language 'English, United Kingdom'. However if I export it and give it a different file name then it reverts the language to 'English, United States' when I re-open the local copy of the file (even though 'English, United Kingdom' is still set as the default). Hence the differences.

answered