-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
None
-
Affects Version/s: 9.2.25, 10.2.18
-
Component/s: Content - Inline Comments
-
None
-
1
-
Severity 2 - Major
Issue Summary
Creating an inline comment fails with an HTTP 412 error ("We can't add your inline comment; the section you highlighted may contain a macro or user mention") on pages containing hidden bundled macros with body content (such as the Excerpt macro with hidden=true).
Steps to Reproduce
- Create and edit a Confluence page.
- Insert a sentence with repeated words, e.g.:
- Select the word target in this sentence. First occurrence: target
- Insert an Excerpt macro, add text inside its body that contains the same word (e.g., target target target target target), and check the option "Hide excerpt on this page" (<ac:parameter ac:name="hidden">true</ac:parameter>).
- Below the hidden excerpt macro, add another sentence containing the word, e.g.:
The word target appears again in this sentence after the hidden excerpt: target
- Alternatively, paste the following storage format directly into the page source
<p>Select the word target in this sentence. First occurrence: target</p> <ac:structured-macro ac:name="excerpt"><ac:parameter ac:name="hidden">true</ac:parameter><ac:rich-text-body><p>target target target target target</p></ac:rich-text-body></ac:structured-macro> <p>The word target appears again in this sentence after the hidden excerpt: target</p>
- Publish the page.
- In view mode, highlight/select the word target in the second sentence (after the hidden excerpt) and attempt to add and save an inline comment.
Expected Results
The inline comment is successfully created and saved against the selected text. Confluence ignores non-rendered / hidden macro body text when calculating occurrence indices.
Actual Results
The inline comment fails to save, and a pop-up warning appears in the UI:
"We can't add your inline comment; the section you highlighted may contain a macro or user mention."
The browser network console shows a 412 Precondition Failed response for the REST call POST /rest/inlinecomments/1.0/comments.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available.
(Optional practical mitigation: Ensure that text inside a hidden excerpt macro does not share common or repeated words with the surrounding visible content, or uncheck "Hide excerpt" if visibility on the page is acceptable.)