Closed Bug 485326 Opened 17 years ago Closed 16 years ago

"Table of contents" showing in new search results

Categories

(support.mozilla.org :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: djst, Assigned: paulc)

References

()

Details

(Whiteboard: sumo_only)

Attachments

(1 file, 1 obsolete file)

In some search results (see URL), the string "Table Of Contents" is showing up in the search result summary. The summary should always end before the TOC marker, since our article summary is always placed before it.
Target Milestone: 1.0 → 1.1
Attached patch Proposed fix with strpos (obsolete) — Splinter Review
Needs testing. My machine keeps timing out when indexing, but I managed to test a bit.
Attachment #369628 - Flags: review?(laura)
Comment on attachment 369628 [details] [diff] [review] Proposed fix with strpos Is this a complete patch? Where is $maketocpos set?
Oops! Of course... a minor detail :D
Attachment #369628 - Attachment is obsolete: true
Attachment #369711 - Flags: review?(laura)
Attachment #369628 - Flags: review?(laura)
Laura...?
Target Milestone: 1.1 → 1.0.2
Attachment #369711 - Flags: review?(laura) → review+
r24429 / r24430 Thanks Laura!
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
This breaks on http://support-stage.mozilla.org/ko/kb/%EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C%20%EA%B4%80%EB%A6%AC%EC%9E%90 while indexing. If '{maketoc}' occurs before any display text (text present after being parsed for wiki syntax) it will result in an essentially empty $document['data']. This will make searching the document useless, and cause problems when inserting words into the se_word table. For such an example see: https://support-stage.mozilla.org/tiki-pagehistory.php?locale=ko&page=%EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C+%EA%B4%80%EB%A6%AC%EC%9E%90&source=0 While this is different than the original request, can't we just use something like this? $document['data'] = preg_replace('/\{maketoc\}/Ui', '', $document['data']); It'll just remove the {maketoc} command and stop the toc from being created.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Tested locally and seems better to follow Eric's suggestion. We should wait for the reindexing bug and do some testing to make sure this works as expected. r24524-5 / r24526 Thanks Eric!
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Looking fixed on https://support-stage.mozilla.org/tiki-newsearch.php?where=d&locale=en-US&q=menu+reference&sa= to me; verified. Will do more search testing, of course...
Status: RESOLVED → VERIFIED
Whiteboard: sumo_only
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: