Gravatar for rvijay@cadence.com

Question by rvijay@cadence.com, May 30, 2018 10:00 PM

Recommendation component has no parent interface. Disabling responsive mode for this component.

Got the following error while working with Recommendations component. My code is below

<CoveoV2:JsSearch debug="true" filter="{!UserFilter}" additionalUserIdentities="{!AdditionalUserIdentities}" stylesheet="CoveoFullSearch.css">
    </CoveoV2:JsSearch>
&lt;script&gt;    
    document.addEventListener('DOMContentLoaded', function () {
        Coveo.initRecommendation(document.querySelector("#recommendation"),document.querySelector("#search"));
    });
&lt;/script&gt;


&lt;div id="recommendation" class="CoveoRecommendation" data-results-per-page="5" data-pipeline="RecommendationsPipeline" data-hide-if-no-results="true" data-main-search-interface="search"&gt;
    &lt;div class="CoveoAnalytics" data-search-hub='Demo'&gt;&lt;/div&gt;
    &lt;div class="coveo-recommendation-header"&gt;
        &lt;div class="coveo-recommendation-title"&gt;Recommendations&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="coveo-recommendation-body"&gt;
        &lt;div class="CoveoResultList"&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
1 Reply
Gravatar for olamothe@coveo.com

Answer by olamothe, May 30, 2018 10:37 PM

It's not an error message, it should be displayed as an "INFO" (information message). It only means that the "auto-docking" functionnality of the recommendation interface in mobile mode will not be activated.

This is expected, as it is not wrapped "inside" a full search interface, but as a "standalone" recommendation interface.

Gravatar for rvijay@cadence.com

Comment by rvijay@cadence.com, May 30, 2018 10:47 PM

Thanks. But, I'm always stuck with a question, How do the recommendations components knows, which document I'm viewing and how does it get the Recommended results for the same?

Second, I'm not getting any results for the above code, How can I check if I have enough analytics or something wrong with the code?

Thanks,

Vijay.

Ask a question