2

since updating my QGIS to version 2.8.3 the postgreSQL Layers wouldn't shown in the QGIS web client.

In the Desktop version the project works very well

I only can see the projecttitle and the groups where the layers in.

Have anybody some idea ?

4
  • Have you tried to set up a new connection?
    – AndreJ
    Commented Oct 16, 2015 at 10:51
  • Yes i tried with the old connection and with the new connection.
    – Bukmop
    Commented Oct 16, 2015 at 11:09
  • QGIS Desktop is still working normally?
    – AndreJ
    Commented Oct 16, 2015 at 11:13
  • in the Desktop Version it works well
    – Bukmop
    Commented Oct 19, 2015 at 10:14

2 Answers 2

2

I tried writing a comment but ran out of characters...

I also had the same problem. But in my case, when I started the desktop version it always asked me for password and username of the connection.

Now if in the connection you dont specify save user/pass, it wont write it in your .qgs file -> <datasource>dbname='DB_NAME' host=localhost port=5432 user='postgres' password='password' sslmode=disable key='ogc_fid' srid=3787 type=Polygon table="public"."somelayer" (wkb_geometry) sql=</datasource>

This is how the correct data source should be, and this is the datasource you get when you skip the save password part: <datasource>dbname='DB_NAME' host=localhost port=5432 user='postgres' sslmode=disable key='ogc_fid' srid=3787 type=Polygon table="public"."somelayer" (wkb_geometry) sql=</datasource>

Suddenly your web client wont be able to connect to the database because there is no password provided, so your qgis webserver wont return anything.

19
  • thank's for your hint. I had saved my password and the datasource looks like yours
    – Bukmop
    Commented Oct 19, 2015 at 12:34
  • ok, do you get any errors in browser console output when it fails to load?
    – Piskr
    Commented Oct 19, 2015 at 12:36
  • Sorry, No i doesn't
    – Bukmop
    Commented Oct 19, 2015 at 12:37
  • projects which I had created some time ago also work with postgresql. First after updating to QGIS 2.8.3 i get these problem
    – Bukmop
    Commented Oct 19, 2015 at 12:39
  • Well I'm using qgis (used 2.8.2. before) 2.10. and I have no problems. Did you try creating a fresh project and added some random layers, just for testing to see if they load in QGISWC? This way you will know for certain if there is a problem with your project or if the problem is hiding somewhere else.
    – Piskr
    Commented Oct 19, 2015 at 12:43
0

i found out that they have changed the datasource in combination with the provider encoding... in the newer version. I changed it in the xml-code back and now it works well.

THANKS for the help Ena2345

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.