Bug report #17519

GetPrint issue: empty map in PDF

Added by Éric Lemoine over 2 years ago. Updated over 2 years ago.

Status:Closed
Priority:Normal
Assignee:Paul Blottiere
Category:QGIS Server
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:25416

Description

I have a case where the generated PDF has an empty map:

This is what I see in the QGIS Server logs:

8181][08:54:10] ******************** New request ***************
[8181][08:54:10] REMOTE_ADDR: 10.0.2.2
[8181][08:54:10] CONTENT_TYPE: application/x-www-form-urlencoded
[8181][08:54:10] HTTP_USER_AGENT: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
[8181][08:54:10] HTTP_AUTHORIZATION: Basic cGFnZ2Y6cGFnZ2Y=
[8181][08:54:10] Warning: error parsing post data as XML: at line 1, column 1: error occurred while parsing element. Assuming urlencoded query string sent in the post body.
[8181][08:54:10] formatString is: pdf
[8181][08:54:10] DPI:300
[8181][08:54:10] FORMAT:pdf
[8181][08:54:10] LAYERS:communes
[8181][08:54:10] MAP%25S%3AEXTENT:3272095.500363964,-429603.1550792752,3394505.062863964,-331713.4363292752
[8181][08:54:10] MAP%25S%3AGRID_INTERVAL_X:1000
[8181][08:54:10] MAP%25S%3AGRID_INTERVAL_Y:1000
[8181][08:54:10] MAP%25S%3AHIGHLIGHT_GEOM:
[8181][08:54:10] MAP%25S%3AHIGHLIGHT_LABELBUFFERCOLOR:white
[8181][08:54:10] MAP%25S%3AHIGHLIGHT_LABELBUFFERSIZE:1
[8181][08:54:10] MAP%25S%3AHIGHLIGHT_LABELCOLOR:black
[8181][08:54:10] MAP%25S%3AHIGHLIGHT_LABELSTRING:
[8181][08:54:10] MAP%25S%3AHIGHLIGHT_SYMBOL:
[8181][08:54:10] MAP%25S%3AROTATION:0
[8181][08:54:10] MAP%25S%3ASCALE:531250
[8181][08:54:10] OPACITIES:255
[8181][08:54:10] REQUEST:GetPrint
[8181][08:54:10] SERVICE:WMS
[8181][08:54:10] SRS:EPSG:3857
[8181][08:54:10] TEMPLATE:Carte
[8181][08:54:10] TRANSPARENT:true
[8181][08:54:10] VERSION:1.3
[8181][08:54:10] Field validity_period ignored, because of unsupported type r
[8181][08:54:10] Field validity_period ignored, because of unsupported type r
[8181][08:54:10] Field validity_period ignored, because of unsupported type r
[8181][08:54:10] Service WMS 1.3 not found, returning default
[8181][08:54:10] WMS Request parameters:
[8181][08:54:10]  - SRS : EPSG:3857
[8181][08:54:10]  - LAYERS : communes
[8181][08:54:10]  - OPACITIES : 255
[8181][08:54:10]  - FORMAT : pdf
[8181][08:54:10]  - TRANSPARENT : true
[8181][08:54:10]  - DPI : 300
[8181][08:54:10]  - TEMPLATE : Carte
[8181][08:54:10]  - VERSION : 1.3
[8181][08:54:10] Request finished in 362 ms

The map object in the composer is named "MAP 0", while the log trace above includes references to "MAP%25S", which is "MAP S".

And the GetProjectSettings response has this:

  <ComposerTemplates>
   <ComposerTemplate width="297" name="Carte" height="210">
    <ComposerMap width="230.418" name="map%s" height="184.263"/>
   </ComposerTemplate>
  </ComposerTemplates>

Suggesting that QGIS Server changes the map object from "map 0" to "map%s" in the GetProjectSettings.

Associated revisions

Revision d0ffaa7c
Added by Paul Blottiere over 2 years ago

Fixes #17519 by fixing GetProjectSettings response

Revision d147064f
Added by Paul Blottiere over 2 years ago

Merge pull request #5697 from pblottiere/server_bugfix_getprojectsettings

[server][bugfix] Fixes #17519 by fixing GetProjectSettings response

History

#1 Updated by Paul Blottiere over 2 years ago

  • Assignee set to Paul Blottiere

#2 Updated by Paul Blottiere over 2 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

#3 Updated by Giovanni Manghi over 2 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF