1

I have a running Qgis Server 2.14 with a QGIS Web Client. As soon as I create a print layout in the composer and save the project in QGIS, it is no longer possible to load the map in the QGIS Web Client. It is stuck on loading map. This is the error message I get form the browser console.

Uncaught TypeError: Cannot read property 'width' of undefined
    at postLoading (WebgisInit.js:469)
    at Ext.tree.AsyncTreeNode.load (WebgisInit.js:246)
    at EXTUTIL.Event.fire (ext-all-debug-w-comments.js:518)
    at Ext.tree.AsyncTreeNode.fireEvent (ext-all-debug-w-comments.js:159)
    at Ext.tree.AsyncTreeNode.fireEvent (ext-all-debug-w-comments.js:54140)
    at Ext.tree.AsyncTreeNode.loadComplete (ext-all-debug-w-comments.js:55372)
    at Ext.tree.AsyncTreeNode.<anonymous> (ext-base-debug.js:969)
    at QGIS.WMSCapabilitiesLoader.processResponse (QGISExtensions.js:298)
    at QGIS.WMSCapabilitiesLoader.handleResponse (ext-all-debug-w-comments.js:56415)
    at Ext.data.Connection.handleResponse (ext-all-debug-w-comments.js:6528) 

The code in WebgisInit.js:469 is this:

var mapWidth = composerTemplate.map.width / ptTomm;

The layout I set up in the composer is regular A4 300dpi

  • Could you provide me with a GetProjectSettings request because in that request there should be a ComposerTemplates tag containing your printing definitions. If the tag has no elements, then that is why you get the undefined error. – Piskr Feb 12 '17 at 11:19