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

QGIS 2.18.4 saves always with absolute paths #24152

Closed
qgib opened this issue Feb 27, 2017 · 23 comments
Closed

QGIS 2.18.4 saves always with absolute paths #24152

qgib opened this issue Feb 27, 2017 · 23 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Project Regression Something which used to work, but doesn't anymore
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Feb 27, 2017

Author Name: Giovanni Manghi (@gioman)
Original Redmine Issue: 16242
Affected QGIS version: 2.18.4
Redmine category:project_loading/saving
Assignee: Alessandro Pasotti


Regardless of what chosen in project properties.

Master seems ok.


Related issue(s): #24456 (duplicates)
Redmine related issue(s): 16550


@qgib
Copy link
Contributor Author

qgib commented Feb 27, 2017

Author Name: Giovanni Manghi (@gioman)


  • version was changed from 2.18.3 to 2.18.4

@qgib
Copy link
Contributor Author

qgib commented Feb 27, 2017

Author Name: Richard Duivenvoorde (@rduivenvoorde)


Hi, I just created a fresh project with current 2.18.4 yesterday, and sent it to a client with the shape files next to it, (and was afraid that I hit this bug...).

So I just checked the .qgs file, but I see: ./mylayer.shp in the xml.

It was a fresh project, and I have default 'relative paths'...

I have a yesterday fresh compiled 2.18.4, which in the checkbox says:
QGIS code revision 2ccdac7

So is there a certain thing you did? To have this?

@qgib
Copy link
Contributor Author

qgib commented Feb 27, 2017

Author Name: Giovanni Manghi (@gioman)


Richard Duivenvoorde wrote:

Hi, I just created a fresh project with current 2.18.4 yesterday, and sent it to a client with the shape files next to it, (and was afraid that I hit this bug...).

So I just checked the .qgs file, but I see: ./mylayer.shp in the xml.

It was a fresh project, and I have default 'relative paths'...

I have a yesterday fresh compiled 2.18.4, which in the checkbox says:
QGIS code revision 2ccdac7

So is there a certain thing you did? To have this?

Hi Richard,
yesterday when I first checked and replied in the dev ML I wasn't able to replicate.

The tested again and again in Windows with both 2.18.4 and master and with first I regularly only got absolute paths regardless the project configs. This was never the case on master.

@qgib
Copy link
Contributor Author

qgib commented Apr 9, 2017

Author Name: Christian S (Christian S)


We too have problems with relative paths becoming absolute paths.

Some background:
Several people access a QGIS-project with relative paths for some datasources.
All of them use linux (Ubuntu 14.04 and 16.04) but use different methods of mounting the project directory from a samba share so the basepath is different on each computer.
Some use the gvfs mechanism from Ubuntu and others use mount with autofs. The used QGIS-Versions are 2.18.4 and 2.18.5.

We observe that sometimes relative paths become absolute paths in this scenario but unfortunately we have not found a reproducable test case yet.
This 1 Question with answer may be related, too. The solution offered there seems to work for our broken QGIS-projects.

@qgib
Copy link
Contributor Author

qgib commented Apr 11, 2017

Author Name: Alexander Bruy (@alexbruy)


Seems works fine in 2.18.6


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Apr 11, 2017

Author Name: Giovanni Manghi (@gioman)


Alexander Bruy wrote:

Seems works fine in 2.18.6

Alex this is tricky, not easy to replicate. I have seen this lately too, also on 2.18.5, possibly .6.

Try open a project with a few file based layers, and check the .qgs file if it has absolute paths.

@qgib
Copy link
Contributor Author

qgib commented Apr 27, 2017

Author Name: Paul Henshaw (Paul Henshaw)


Hi all,

I am able to reproduce the problem using the "Save As" feature, as described in https://gis.stackexchange.com/questions/210992/relative-path-not-working-in-qgis

_It seems that the the relative path for a shp file will be changed to an absolute path after the project file is "saved as" a new project file. (see images below).

[...]

After saving the current QGIS project file as a new file, you MUST press the SAVE button so as to confirm that the relative path is registered in the project file. Otherwise, the absolute path will be used._

I am currently using QGIS 2.18.7 (64bit Windows 10) but was also able to reproduce using 2.18.3.

@qgib
Copy link
Contributor Author

qgib commented Apr 27, 2017

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Feedback to Open

@qgib
Copy link
Contributor Author

qgib commented Apr 27, 2017

Author Name: Paul Henshaw (Paul Henshaw)


Paul Henshaw wrote:

I am currently using QGIS 2.18.7 (64bit Windows 10) but was also able to reproduce using 2.18.3.

My colleague confirms that the behaviour is the same using 2.18.7 on Ubuntu 16.04 LTS (64bit).

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • regression was configured as 1

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • priority_id was changed from Severe/Regression to High

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0

@qgib
Copy link
Contributor Author

qgib commented May 12, 2017

Author Name: Alessandro Pasotti (@elpaso)


  • description was changed from Regardless of what chosen in project properties.

Master seems ok. to Regardless of what chosen in project properties.

Master seems ok.

  • assigned_to_id was configured as Alessandro Pasotti

@qgib
Copy link
Contributor Author

qgib commented May 12, 2017

Author Name: Anónimo (Anónimo)


Applied in changeset 913527b.


  • status_id was changed from Open to Closed
  • done_ratio was changed from 0 to 100

@qgib qgib closed this as completed May 12, 2017
@qgib
Copy link
Contributor Author

qgib commented May 12, 2017

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to fixed/implemented

@qgib
Copy link
Contributor Author

qgib commented May 12, 2017

Author Name: Alessandro Pasotti (@elpaso)


Explanation: when saving the project with a new name and the destination file did not exist, the path of the destintion file was blank, breaking the algorithm that build the relative path.
For this reason the bug could not be reproduced when saving (overwriting) an existing project file.


  • resolution was changed from fixed/implemented to

@qgib
Copy link
Contributor Author

qgib commented May 12, 2017

Author Name: Alessandro Pasotti (@elpaso)


  • resolution was changed from to fixed/implemented

@qgib
Copy link
Contributor Author

qgib commented May 19, 2017

Author Name: Jürgen Fischer (@jef-n)


@qgib
Copy link
Contributor Author

qgib commented Sep 7, 2017

Author Name: Patrick Dunford (@enzedrailmaps)


This issue can be produced in master revision 313ec55

Do I assume if I pull the zip file from https://github.com/qgis/QGIS/tree/913527b4c95dce5f0bc3c6def52c29f6341cec39 that I will get the fix to this problem.

@qgib
Copy link
Contributor Author

qgib commented Sep 7, 2017

Author Name: Alessandro Pasotti (@elpaso)


yes

@qgib
Copy link
Contributor Author

qgib commented Sep 7, 2017

Author Name: Patrick Dunford (@enzedrailmaps)


That one is 2.18, I need the version of master that has that fix incorporated.

@qgib
Copy link
Contributor Author

qgib commented Sep 7, 2017

Author Name: Giovanni Manghi (@gioman)


Patrick Dunford wrote:

This issue can be produced in master revision 313ec55

if is not fixed in master then a new (regression) ticket must be opened. Thanks.

@qgib
Copy link
Contributor Author

qgib commented Jan 9, 2018

Author Name: Patrick Dunford (@enzedrailmaps)


See also #25719

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Project Regression Something which used to work, but doesn't anymore labels May 25, 2019
@qgib qgib added this to the Version 2.18 milestone May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Project Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant