Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

debugger flagging long-deleted scripts

Avatar

Former Community Member

Several aeons ago, in the early days of developing this form, I had scripts in both the Initialize and Calculate events of a number of subforms. It's a monster of a form with subforms for 9 different types of change request, each with numerous hidden fields that become visible depending on user answers to various questions. When I first started it, that was the only way I could figure out to ensure that the appropriate subforms would still be visible when a user closed and reopened the form.

I removed the Initialize scripts when I discovered the Preserve scripting changes setting (duh... ). That was many months and several version ago.

However. the console still pops up and flags objects that were apparently referenced in those Initialize scripts, but whose names have changed in the interim. I've checked the form several times to be sure there aren't any renegade Initialize scripts still lurking in the background, and I'm confident there's nothing there...but that darn debugger jumps in every single time.

I assume it's not going to be a problem for any form user who doesn't have the debugger enabled in their own instance of Acrobat, correct? Since I'm pretty much the only person here who even comes close to working with Acrobat this way, I'm relatively confident it'll never come up.

But I would love to figure out how to get rid of it, and I have a niggling concern that there's actually some kind of problem behind the scenes that *will* come back to bite me sometime down the road. Can anybody tell me how to debug the debugger, or alternatively, how to locate the scripts it seems to still be finding somewhere?

Mil gracias!

1 Accepted Solution

Avatar

Correct answer by
Level 2

When you the error in the debugger. Copy a string of the script that you have already removed.

Go into "XML Source" press ctrl + f (Find). Paste the the string that you copied.

if you find the script in here then remove it from <event> till the </event>, i will give you an example:

 


<event activity="initialize" name="event__initialize">

    <script contentType="application/x-javascript" runAt="both">

*script will be here*

 

</script>

</event>

Remove all that and it sholdn't appare in the debugger. If it is there, otherwise I don't really know that it can be.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 2

When you the error in the debugger. Copy a string of the script that you have already removed.

Go into "XML Source" press ctrl + f (Find). Paste the the string that you copied.

if you find the script in here then remove it from <event> till the </event>, i will give you an example:

 


<event activity="initialize" name="event__initialize">

    <script contentType="application/x-javascript" runAt="both">

*script will be here*

 

</script>

</event>

Remove all that and it sholdn't appare in the debugger. If it is there, otherwise I don't really know that it can be.

Avatar

Former Community Member

Wow, THANK YOU!

That's absolutely fascinating...and seriously scary! Thankfully I know just enough XML to know what I'm looking at...and to know how easy it would be to trash the entire file this way !! (and to wonder why Initiate events are just an event type enclosed in <event> tags, but Calculate events have their own <calculate> tags...but that's not exactly in the scope of my current project, so I'll put it off for another day.)

But yes, that's it -- I can remove them one by one and watch the number of errors decrease in the console. Thank you so much!!!