Skip to main content
K.Daube
Community Expert
Community Expert
November 24, 2021
Answered

ES bug after Windows update - now gone

  • November 24, 2021
  • 1 reply
  • 359 views

Not all problems with FM are the result of an error in FrameMaker as the following eposide tells:

On Friday, November 19 I had this effect in a script function, which until then worked without problems (snippet around the problem):

$.writeln (sNewMtype);       // "comment"
if (sNewMtype != undefined) {
$.writeln (sNewMtype);       // → sNewMtype is undefined
}

 Then, on Monday, November 22 I wanted to post this as an error in FM - verifying the situation again, all was OK!

From Klaus Göbel I heard that he had a similar problem around the same time with a global variable, which suddenly wasn't global any more. He assumed a Windows update (in my case it was on Fri 2021-11-12). IMHO he was right with this assumption - and Windows was fixed after the 19th again with a hidden update - which is not recognisable.

This topic has been closed for replies.
Correct answer K.Daube

Stefan,

I provided only the relevant part of the script where the error was reported by ESTK. The whole function is this

KLD_M.ModifyMarker = function (oMarker, sNewMtype, sNewMtext ) { // =====
var oDoc, oNewMtype;
  oDoc     = app.ActiveDoc;
  if (sNewMtype != undefined) {
  	oNewMtype = oDoc.GetNamedMarkerType (sNewMtype);
    if (!oNewMtype.ObjectValid()) {return undefined; }
  	oMarker.MarkerTypeId = oNewMtype;
    return oMarker;
  }
  if (sNewMtext != undefined) {
    oMarker.MarkerText = sNewMtext;
    return oMarker;
  }
} //--- end ModifyMarker ----------------------------------------

 

1 reply

Community Manager
November 24, 2021

Strange. However, in your code neither $ or sNewMtype are defined anywhere. Therfore any parser will give you an uncaught reference Error that sNewMtype is not defined.

K.Daube
Community Expert
K.DaubeCommunity ExpertAuthorCorrect answer
Community Expert
November 24, 2021

Stefan,

I provided only the relevant part of the script where the error was reported by ESTK. The whole function is this

KLD_M.ModifyMarker = function (oMarker, sNewMtype, sNewMtext ) { // =====
var oDoc, oNewMtype;
  oDoc     = app.ActiveDoc;
  if (sNewMtype != undefined) {
  	oNewMtype = oDoc.GetNamedMarkerType (sNewMtype);
    if (!oNewMtype.ObjectValid()) {return undefined; }
  	oMarker.MarkerTypeId = oNewMtype;
    return oMarker;
  }
  if (sNewMtext != undefined) {
    oMarker.MarkerText = sNewMtext;
    return oMarker;
  }
} //--- end ModifyMarker ----------------------------------------