Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

JavaScript error - Object is invalid

New Here ,
Jan 07, 2016 Jan 07, 2016

Problem (while using Indesign CS6 on Mac OS X😞

  • After updating to El Capitan and installing the, now necessary, legacy Java SE 6
    • there's a JavaScript error;
    • Indesign files won't open;
    • Indesign won't "Quit" without force quitting.
  • The following error message appears:

JavaScript Error!

Error Number: 54

Error String: Uncaught JavaScript exception:

ReferenceError: Object is invalid

Engine: ConvertURLToHyperlinks

File: /Applications/Adobe InDesign CS6/Scripts/converturltohyperlink/startup scripts/ConvertURLtoHyperlinkMenuItemLoader.jsx

Line: 100

Source: Folder.current = cacheCurrent ;

I assume that if I knew even the basics of JavaScript for Indesign, I'd be able to solve this, but I don't, so any information would be great, thanks.

TOPICS
Scripting
5.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jan 07, 2016 Jan 07, 2016

Hi,

Looks related to some mess in the El capitan / CS6 / java cooking. Looking at the code, the Folder.current isn't declared at the time it's used hence the error. Who ever declared it before is something I can't answer. You can probably change the line 100 with :

var cacheCurrent = Folder.current || Folder.desktop ;

Which will set the desktop as current folder if Folder.current isn't declared at the time. That should prevent further errors. However keep in min that that multiple issues were reported with CS6 apps and El Capitan mostly due to JAVA and those problems will probably grow in the future to the unavoidable term where you won't be able to use CS6 anymore.

Loic

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 07, 2016 Jan 07, 2016

Hm, that doesn't seem to have worked. Do I need to move a folder or something to the desktop as well? (I assume it's pointing to something that just isn't there.. ?)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jan 08, 2016 Jan 08, 2016

Hi,

No that just means "current" is not a property available at this time.

Try this :

var cacheCurrent = Folder.hasOwnProperty("current")?  Folder.current : Folder.desktop ;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 08, 2016 Jan 08, 2016

Unfortunately, that didn't work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jan 08, 2016 Jan 08, 2016

Sorry about that, out of clues here.

You can remove that script from that folder if it's an issue to you but I can't mesaure the side effects.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 08, 2016 Jan 08, 2016

I'll test that out.. Wonder if there are meant to be other scripts in that folder even.

Thanks anyway, for the suggestions!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 12, 2016 Aug 12, 2016

Could you post the script text so that someone could see the full script and possibly work out what's going wrong?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 12, 2016 Aug 12, 2016

Hi Skemicle, did you try to read out the code from the said InDesign Startup Script that is installed with every InDesign version?

The script's source code is available for developers only, that signed in to a special Adobe program for the InDesign SDK (Software Development Kit). For the average user of InDesign the code is saved in hexbin encoding and cannot be read out as readable code easily.

I once looked briefly into it and saw some dependencies on other ExtendScript scripts. Maybe a global variable not declared is running nuts. Maybe other things. I cannot tell, because all my installations are working flawless in this regards.

Regards,
Uwe

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 13, 2016 Nov 13, 2016
LATEST

Hi Uwe,

I understand this is an old thread, but my friend had just asked me to help with a similar problem.  Adobe InDesign is failing to load and it throws a similar error.  After chasing down the startup scripts, it seems like the "app" global variable used in many Adobe applications is not properly initialized anymore, and it blows up as soon as you access it:

     app.doScript(ConvertURLToHyperlinkMenuItemLoader.script);

The error message reported to the user is actually the very next step in the execution, and it's very misleading.  Knowing that you have looked at some dependencies on other scripts before, would you mind sharing where I should look to find those dependencies?  The same variable blows up when Flash components are loading as well.

Thanks,

Calvin

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines