Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Crazy bug with index entry

Contributor ,
Jun 23, 2019 Jun 23, 2019

Copy link to clipboard

Copied

Hi,

can anyone confirm that? If you select the word »sit« (attached document) and create an index entry using script, the page reference will be created after the word.

selected_word.png

var _doc = app.activeDocument;

var _docIndex;

if(_doc.indexes.length === 0) {

    _docIndex = _doc.indexes.add();

} else {

    _docIndex = _doc.indexes.firstItem();

}

var _textObj = app.selection[0];

var _parentTopic = _docIndex.topics.add("Topicname");

var _pageRef = _parentTopic.pageReferences.add(_textObj);

pageReference_insert_after_the_selection.png

  • word before that, everything's correct

word_before.png

 correct_behaviour.png

  • tables with 3 or more rows
  • the more table rows the more offset

more_rows_more_offset.png

MacOS and InDesign CC2019 14.0.1

Roland

TOPICS
Scripting

Views

739

Likes

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

correct answers 1 Correct answer

LEGEND , Jun 23, 2019 Jun 23, 2019
Yes, that is a bug. Report ASAP at Adobe InDesign: SDK/Scripting Bugs and Features: Top (27 ideas) – Adobe InDesign Feedback as it seems only related to scripts (using the same selection and the Index panel works as expected).I find inconsistent results (offsets of one or two characters after the selected word) when the table above is 3 or more rows – but there is more to this, because the problem seems to shift or disappear when the word is more than 4 characters!Tested in CS4, so it seems a lo...

Likes

Translate

Translate
LEGEND ,
Jun 23, 2019 Jun 23, 2019

Copy link to clipboard

Copied

Yes, that is a bug. Report ASAP at Adobe InDesign: SDK/Scripting Bugs and Features: Top (27 ideas) – Adobe InDesign Feedback as it seems only related to scripts (using the same selection and the Index panel works as expected).

I find inconsistent results (offsets of one or two characters after the selected word) when the table above is 3 or more rows – but there is more to this, because the problem seems to shift or disappear when the word is more than 4 characters!

Tested in CS4, so it seems a long-running bug.

Likes

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
Contributor ,
Jun 23, 2019 Jun 23, 2019

Copy link to clipboard

Copied

Thanks Jongware! Reported.

Likes

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
Adobe Community Professional ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

Hi Roland,

I can confirm the bug.

Thanks for reporting this.

Hm. Just trying to make out the "rules" of this misbehavior.

The scope of the bug seems to be the story.

Numbers of table rows before the text selection and numbers of characters selected are a factor.

Regards,
Uwe

Likes

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
Adobe Community Professional ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

If there is only one table before the text selection in the same story one could see what words are affected.

With a table of one row: No bug.

A table of two rows affects words with one character.

A table of three rows affectes words with one or two characters.

Four text frames, four stories, four tables with different row lengt:

190624-1-IndexMarkerOffPosition.PNG

I selected every single word and ran the script for doing an index topic.

The issue gets more complicated if several tables are positioned in the story before the selected text.

Regards,
Uwe

Likes

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
Contributor ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

Hi Uwe!

This topic has already been mentioned here in 2010, I found out in the meantime (by a hint on Twitter): https://www.hilfdirselbst.ch/foren/Skript_zum_Index_generieren_P430412.html

Another weird example: many table rows and not enough insertion points after the selection in the story.

Bildschirmfoto 2019-06-24 um 11.09.11.png

Roland

Likes

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
Adobe Community Professional ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

LATEST

Tested also this case and can confirm that the index marker is created in a text cell.

Text selected is the "A" that comes after the table in the same story:

190624-2-IndexMarkerOffPosition.PNG

Regards,
Uwe

Likes

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