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

InDesign 2024 crashing when trying to run script

Explorer ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

Let me begin by saying that I know extremely little about scripts, so if you respond with a highly technical answer, I'll be lost! 🙂 

 

I'm using Adobe InDesign 2024 on a 2020 Macbook Pro (Ventura 13.3.1). I have a Bibliography with many entries and was trying to run the "Sort Paragraphs" javascript (as outlined in this article) to sort all entries alphabetically. It is critical that I'm able to retain formatting. For now, I've pulled the Bibliography out of the source document and dropped it into a new InDesign file (see attached).

 

Each time I run the script (as shown below), InDesign crashes.

 

Screenshot 2023-12-28 at 3.12.01 PM.pngScreenshot 2023-12-28 at 3.12.23 PM.png

 

 

 

 

 

 

 

 

 

 

 

 

Sometimes I get this warning before it crashes:

Screenshot 2023-12-28 at 3.12.39 PM.png

 

Can anyone help???? I really don't want to have to sort these manually!

 

Thanks in advance! - Kristin

TOPICS
Scripting

Views

560

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

Make sure you have no empty paragraphs in what you are trying to sort by runnning a Find Grep for multiple returns.

Votes

Translate

Translate

Report

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
Explorer ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

I ran the Find Grep and there was one extra return, which I removed. Still getting the same error. 

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

Also, try to split your text in half - maybe there is something "extra" in the text? Just for testing. 

 

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

After removing last empty paragraph - It just crashed for me as well.

 

Votes

Translate

Translate

Report

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
Explorer ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

Good suggestions, but no luck. I split the document in half and ran both halves, still encountering the same issue. I did get a warning message this time which said, "All corrupt hyperlinks in the selected text have been removed." I clicked OK, but got the same error message again. 

 

Screenshot 2023-12-28 at 3.12.39 PM.png

 

For what it's worth, I've also quit InDesign and then did a hard restart, deleting all preferences. That didn't work either.

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

As per my other reply - your document has been damaged for some reason.

 

You can either do IDMLing yourself - just for fun - or download file I've attached.

 

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

It looks like your original document has been damaged - after IDMLing - it sorted OK.

 

Votes

Translate

Translate

Report

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
Explorer ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

@Robert at ID-Tasker - So perhaps if I save as an IDML, open it and save as a new INDD file, it might work?

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

That's what I've done - exported as IDML, opened, run sorting and saved and uploaded here for you.

 

RobertTkaczyk_0-1703798339213.png

 

That's a preview of my tool - on the left is effect of the JS script for comparison.

Unfortunately, it's PC only.

 

Votes

Translate

Translate

Report

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
Explorer ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

@Robert at ID-Tasker - Thank you for your help. I tried the same thing on my end, but to no avail. I appreciate you sending me a properly sorted document. I'm going to try and reintegrate that into my original main document, and hopefully all shall go smoothly from there!

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

I tried the same thing on my end, but to no avail.

 

Does it happen if you create a new document, with a text frame containing Palceholder text—Type>Fill with placeholder Text?

Votes

Translate

Translate

Report

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
Explorer ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

@rob day I tried what you suggested (placeholder text, new doc) and everything worked fine. So obviously something is messed up with my Bibliography doc. But I have no idea how to determine which link(s) are corrupted. I'm about to give up and just alphabetize it manually. It will be a pain, but perhaps less painful than these technical issues!

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

I am able to get the error when I select the slow method, and as @brianp311 suggests the error occurs on the last empty line—the authors are not catching the last line error. Before you select all, try deleting the two returns at the end:

 

Screen Shot 10.pngScreen Shot 11.png

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

Honestly, at this point, it will prob take me less time to just organize them manually

 

Attached is what I get with the retain formatting sort

Votes

Translate

Translate

Report

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
Explorer ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

@Robert at ID-Tasker Actually, it looks like there are issues with the file you sent over. It appears to be sorted alphabetically, but as you can see from the screenshot below, all of the hyperlinks are broken and some portions of text appear hyperlinked that shoudn't be (see the portions underlined in red). 

 

Screenshot 2023-12-28 at 4.22.56 PM.png

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

Unfortunately, it might be the fault of the script from InDesign - it uses Bubble Sort - and moves text around....

 

So hyperlinks might got "damaged".

 

I'll try to export your document my way - but you have to give me an hour or so - busy with something else at the moment.

 

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

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
Explorer ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

@Robert at ID-Tasker - I'll take a look at that script you just sent. You don't need to work on this anymore. I did discover that there were numerous places where regular text was inadvertently hyperlinked. I removed all of those and hoped that that would solve the problem, but it didn't. Honestly, at this point, it will prob take me less time to just organize them manually. But I'll check out the script you just sent over first. Again, thanks for your help!

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

Sorry it took me so long.

 

Loading info about all paragraphs takes about 20 seconds.

 

Fixing text, Sorting and Exporting into a new Story:

RobertTkaczyk_0-1703805649386.png

Duplicate() method is EXTREMELY fast...

 

Attached is your sorted document.

 

The wrong hyperlinks - they are in your original text - they are even visible on your 1st screenshot:

RobertTkaczyk_1-1703805788221.png

 

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

Below is partial report of the hyperlinks in your document:

RobertTkaczyk_0-1703806478679.png

 

"Biblio" without ".indd" is unsaved IDML version of the original file.

 

For some reason - you have errors in your original document - and then different errors after IDMLing and sorting - and some of the hyperlinks disappear after IDMLing?

 

There are 84 in original document - but only 28 after IDMLing?

 

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

After more digging...

 

Sorted by Name:

RobertTkaczyk_0-1703807316873.png

Each Hyperlink is a triplet - that's a raw data from your documents.

 

If you check column "INDD Doc" - 6th column - there are a lot of hyperlinks from "biblio.indd" - but they are missing after IDMLing - "biblio".

 

This might suggest that the original file you've uploaded - or even source document from which you've copied text for uploading - is damaged??

 

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

You are welcome.

 

I've done it on ID 2024 / v. 19.0.1 on a PC.

 

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

Hi @kg01915 , It worked for me in CC2021 (Converted), so yes try a Save As IDML and open the IDML.

Votes

Translate

Translate

Report

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 ,
Dec 28, 2023 Dec 28, 2023

Copy link to clipboard

Copied

> I'm using Adobe InDesign 2024 on a 2020 Macbook Pro (Ventura 13.3.1).

 

While it's probably not related to the script issues you're having, make sure to update to the latest version of Ventura, macOS 13.6.x. InDesign can have serious issues on pre-13.5 systems. (Just don't upgrade to macOS 14 Sonoma as it's not fully compatible with InDesign yet).

Votes

Translate

Translate

Report

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