Occasional problem with custom text in Print widget

377
7
11-16-2018 01:00 PM
RyanKelso
Occasional Contributor III

I modified my layout templates and print service so when using the Print widget, and opening the Advanced menu, you have a nice sized "Comments" box for your own text, rather than the Author and Copyright boxes provided by the default layouts.

This works great most of the time, but occasionally it reverts to the default Author and Copyright text boxes.  I haven't figured out the circumstances or how to replicate the problem, so right now it seems kind of random and hard to diagnose.  When it does happen, I see this error in the console:

panel [widgets_Print_Widget_25_panel] created.
WidgetManager.js?wab_dv=2.10:114 widget [widgets/Print/Widget] created.
Print.js?wab_dv=2.10:193 Get Layout Templates Info Error Error: Unable to complete operation.
 at Object.m.load (init.js:1034)
 at init.js:88
 at c (init.js:104)
 at e (init.js:104)
 at b.Deferred.resolve.callback (init.js:106)
 at c (init.js:105)
 at e (init.js:104)
 at b.Deferred.resolve.callback (init.js:106)
 at init.js:93
 at l (init.js:108)‍‍‍‍‍‍‍‍‍‍‍‍‍

I am running ArcGIS Server 10.5.1 and WAB 2.10.  I thought the problem could be related to instances of my print service going idle, but I have it set with a minimum of 2 instances running.

Any ideas on how to fix this?

Tags (2)
0 Kudos
7 Replies
TanuHoque
Esri Regular Contributor

Can you pls have your browser Developer Tools open and when you see that error, check the Network tab on the Developer Tool and see whether there is any error returned by Get Layout Templates Info request.

RyanKelso
Occasional Contributor III

Ok, what I found was status code 200 OK, with this response:

{"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool. Get Layout Templates Info"]}}
0 Kudos
TanuHoque
Esri Regular Contributor

thanks Ryan,

can you pls check and try to find out why Get Layout Templates Info is throwing an error? Check Server Log on the Manager or switching the Print service's log-level setting to Info or Warning and resubmit the job should give you more information which might help you narrow it down.

RyanKelso
Occasional Contributor III

Thanks for giving me some ideas to try, Tanu.  I see the following errors in the server log when I see the Get Layout Templates Info error in my app:

LevelTimeMessageSource
SEVERENov 19, 2018, 4:18:15 PMError executing tool. Get Layout Templates InfoPrinting/ExportWebMapSecured.GPServer
SEVERENov 19, 2018, 4:18:15 PMError executing tool. Get Layout Templates Info : Whitespace is not allowed at this location.Printing/ExportWebMapSecured.GPServer

I don't know what to make of those errors.  I can load the app the exact same way a dozen times and not get this error, and then might show up the next time, then go away after that.  So hard to troubleshoot.  I feel like I might have a better shot at trying to mod the Print widget to handle the error and repeat the Get Layout Templates Info request until it succeeds.

0 Kudos
TanuHoque
Esri Regular Contributor

Thanks Ryan.

I'm assuming this is your own print service with your own layout templates.

as you know Get Layout Template Info is a gp script tool available on Desktop/ArcMap. Can you see whether you can execute this script tool in ArcMap with your layout templates and repro this issue? if you can do that, can you try to narrow it to down to which layout template is causing this failure.

0 Kudos
RyanKelso
Occasional Contributor III

Yes, it is my own service with my own templates.  I'll give the script tool in ArcMap a shot and see what I can find out.  Does "Whitespace is not allowed at this location" mean anything to you?  Like, do you know if this means something specific I should be looking for?  Thanks again for helping me along with this.

0 Kudos
TanuHoque
Esri Regular Contributor

Sorry Ryan, the error message does not give me much clue.

0 Kudos