Item13376: Bookview only showing topic names

pencil
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: SEARCH
Branches:
Reported By: TroyGoodson
Waiting For:
Last Change By: PhilippHoppen
When I use bookview="on" with VarSEARCH, see BookView, the results only display the topic titles and some metadata, not the contents of the topics.

I have an example at CheckBookviewSearch, using this macro

%SEARCH{"cmm" scope="topic" order="created" limit="5" nonoise="on" bookview="on" }%

Here's what I see, but I know that Sandbox.CMMTest and TestTopicMM have content. Also, I don't think "$summary(searchcontext)" is supposed to be there.

Searched: cmm

Results from Sandbox web retrieved at 19:42 (GMT)

$summary(searchcontext)
$summary(searchcontext)
$summary(searchcontext)
Number of topics: 3

-- TroyGoodson - 16 Apr 2015

I had the same issue. I found that in Search.pm, the template variable TEXTHEAD is attempted to be replaced multiple times in this case. The second replacement would produce the correct content. So I made sure the first replacement is not done for book view:

    #for book view TEXTHEAD already gets replaced somewhere else
    if (!$doBookView) {
        if ($noSummary) {
            $repeatText =~ s/%TEXTHEAD%//g;
            $repeatText =~ s/ //g;
        }
        else {
            $repeatText =~ s/%TEXTHEAD%/\$summary(searchcontext)/g;
        }
    }

Not really sure if this is the best way, I would hope someone with a deeper understanding of the code in Search.pm could have a look at it.

-- PhilippHoppen - 19 Apr 2022
 
Topic revision: r3 - 19 Apr 2022, PhilippHoppen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy