Bug report #959

Windows Vista - Error saving project - missing datasource params at qgs file

Added by luigibr - over 12 years ago. Updated about 11 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Project Loading/Saving
Affected QGIS version: Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11018

Description

I use qgis 0.91 for windows avaliable at www.qgis.org
I have a project with 4 postgis layer's. I do some thematic work and save the project.
When i was loading that project, a message appers saying that some layer's cannot be found.
So I open the project file (*.qgs) and the information about the schema was missing at node datasource (inside maplayer node).
To correct the file, i write the information and the project open without problems.
So i think the problem is when the QGIS write the information about db connection at project file (qgs file).

---------------------------*.qgs file save by qgis-----------------------------------

.....
 <projectlayers layercount="4" >
        <maplayer minScale="1" maxScale="1e+08" scaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
            <id>_public+_table_v2+_the_geom+_sql_20080226164351311</id>
            <datasource>dbname=db host=192.168.0.100 port=5432 user=postgres password='******' table=*here-is-missing-the-squema*"table_v2" (the_geom) sql=</datasource>
            <layername>table_v2</layername>
            <srs>  
............


and

---------------------------*.qgs file edited-----------------------------------

.....
 <projectlayers layercount="4" >
        <maplayer minScale="1" maxScale="1e+08" scaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
            <id>_public+_table_v2+_the_geom+_sql_20080226164351311</id>
            <datasource>dbname=db host=192.168.0.100 port=5432 user=postgres password='******' table="public"."table_v2" (the_geom) sql=</datasource>
            <layername>table_v2</layername>
            <srs> 
...

-----------------------------------------------------------------------------------
i put "public". before "table_v2" at table description.

History

#1 Updated by Marco Pasetti - about 12 years ago

Replying to luigibr:

I use qgis 0.91 for windows avaliable at www.qgis.org
I have a project with 4 postgis layer's. I do some thematic work and save the project.
When i was loading that project, a message appers saying that some layer's cannot be found.
So I open the project file (*.qgs) and the information about the schema was missing at node datasource (inside maplayer node).
To correct the file, i write the information and the project open without problems.
So i think the problem is when the QGIS write the information about db connection at project file (qgs file).

---------------------------*.qgs file save by qgis-----------------------------------

> 
> .....
>  <projectlayers layercount="4" >
>         <maplayer minScale="1" maxScale="1e+08" scaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
>             <id>_public+_table_v2+_the_geom+_sql_20080226164351311</id>
>             <datasource>dbname=db host=192.168.0.100 port=5432 user=postgres password='******' table=*here-is-missing-the-squema*"table_v2" (the_geom) sql=</datasource>
>             <layername>table_v2</layername>
>             <srs>  
> ............

and

---------------------------*.qgs file edited-----------------------------------

> .....
>  <projectlayers layercount="4" >
>         <maplayer minScale="1" maxScale="1e+08" scaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
>             <id>_public+_table_v2+_the_geom+_sql_20080226164351311</id>
>             <datasource>dbname=db host=192.168.0.100 port=5432 user=postgres password='******' table="public"."table_v2" (the_geom) sql=</datasource>
>             <layername>table_v2</layername>
>             <srs> 
> ...

-----------------------------------------------------------------------------------
i put "public". before "table_v2" at table description.

could you please test that bug with 0.11.0?
Thanks,

Marco

#2 Updated by luigibr - about 12 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Hello Marco,

i have tested QGIS 0.11.0 with one postgis layer, one shp layer and one csv layer and all function without problem. I think the problem is solved.

Very thanks :D

#3 Updated by Anonymous about 11 years ago

Milestone Version 1.0.0 deleted

Also available in: Atom PDF