Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File paths not updated when using 'Package current QGIS project' option #600

Open
raherin opened this issue Jul 8, 2024 · 3 comments
Open

Comments

@raherin
Copy link

raherin commented Jul 8, 2024

When using the Mergin Maps plugin to upload an existing project using the 'Package current QGIS project' option, the paths to the newly created project's file paths are not updated in the new .qgz and .gpkg files. Instead, the project will still point to the original file paths resulting in unavailable layers when opening the project in the app for the first time or downloading it via the Mergin Maps Plugin on a separate machine. To reproduce this issue:

  1. Download the attached .zip file containing a simple survey project
  2. Extract the project from the .zip file
  3. Open the project_create.qgz file in QGIS (in the example, I used 3.34 LTR)
  4. Press the '+' button in on the Mergin Maps Plugin menu
  5. In the project creation dialogue, select the 'Package current QGIS project' option to create the project
  6. Click 'Next'
  7. In the next dialogue window, select a different directory for the 'Create Mergin Maps Project in:' than the current project directory and press 'Finish'
  8. Once the project creation is finished, download and open the project in the Mergin Maps mobile app and an error will appear stating that there are missing layers.

project_create.zip

There is a workaround if this error occurs after creating the project. After finishing step 7 in the above sequence, go to the new project directory and open the project in QGIS. Then follow the steps provided in the QGIS documentation to fix the paths to the layer data sources for each of the layers in your project and synchronise the changes in the plugin.

@drekseimertutje
Copy link

Any update on this issue?
We have about 100 employees which have this issue.
Some of them also have this issue when you synchronize an existing project.

@tomasMizera
Copy link
Contributor

I just tried to reproduce the issue but could not. Maybe a silly question, but did you select the option "package" for gpkgs?
image

@drekseimertutje
Copy link

Hi Tomas,

Yes we do.

The strange thing is, my computer with the same QGIS and Plugin version does not have this issue.
Also, this issue only appeared for my colleagues after they got new laptops with fresh installs. Even with QGIS 3.24 and the previous version of the plugin does the issue arrise so to me, it means it is Windows (configuration) related.

Can you perhabs tell which environment variables (related to the layer file paths) are used by the plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants