Select to view content in your preferred language

Print Button doesn't export anything in WebApp Print Widget

617
3
10-12-2023 12:41 PM
mikeytes
Emerging Contributor

Greetings,

Using the Print Widget in our web applications has been a huge value add to our organization. It was tough to implement the custom print services, but we figured it out!

However, we have a peculiar issue that only pertains to one web mapping application and the error only occurs when a particular layer is turned on. Otherwise, the print widget is working fantastically.

Issue: When I attempt to print the web map with the legend on, upon clicking the print button, nothing happens. No PDF/PNG/etc is exported or is queued. If I choose to not include the legend, it works! If I turn the dubious layer off, it works! And to make things even more interesting, when I print directly from the web map associated with the application, it works totally fine... legend, layer on, and all print just fine. It's only with the web mapping application.

Here is what the console throws in DevTools when I click the print button.

 

 

Widget.js?wab_dv=2.21:16 Uncaught TypeError: Cannot read properties of undefined (reading 'renderer')
    at Object._excludeInvalidLegend (Widget.js?wab_dv=2.21:16:211)
    at Object.<anonymous> (init.js:65:75)
    at Object.e [as _createOperationalLayers] (init.js:122:23)
    at Object._getPrintDefinition (Widget.js?wab_dv=2.21:55:160)
    at Object.advice (init.js:122:101)
    at Object.e [as _getPrintDefinition] (init.js:121:393)
    at Object._execute (Widget.js?wab_dv=2.21:37:248)
    at Object.execute (Widget.js?wab_dv=2.21:33:426)
    at Object.print (Widget.js?wab_dv=2.21:28:314)
    at HTMLDivElement.<anonymous> (init.js:65:75) 

 

 

 

Again... printing works fine in the web map. Just the application throws this error.

Please let me know if anyone has experienced something similar or if you have a solution or work around.

 

Thank you!

Mike

0 Kudos
3 Replies
MichaelVolz
Esteemed Contributor

Is this layer from a 3rd party outside your organization?

0 Kudos
mikeytes
Emerging Contributor

Hi MichaelVolz. Thank you for your response.

No it's not. But the layer is owned by someone else in our organization.

0 Kudos
JohnSteed1
Occasional Contributor

Has anyone else had this issue?  Seems like it is a very important one.

0 Kudos