Gravatar for gdubey@deloitte.com

Question by govinddubey, Jun 8, 2016 6:22 AM

Search page is not able to display the records while implementing Standalone searchbox - Chrome Console message: "Two folding component are active at the same time for the same tab. Can't process result !"

Hi,

My search page is not able to display the records while implementing Standalone searchbox in Home Page and in Chrome console of search page below message is there:

Two folding component are active at the same time for the same tab. Can't process result !

My search page is having one pageblock there i have included the Coveo searchInterface component (configured the coveo full search page) and added the required script also mentioned in the above link:

<script>
 $(function () {
    Coveo.Rest.SearchEndpoint.configureSampleEndpoint();

    $('#search').coveo('init', {
      externalComponents: [$('#searchBox')]
    });
  });

</script>
<apex:pageBlock >
    <div id="search">
        <CoveoSolutions:SearchInterface />
    </div>
    <!--apex:include pageName="coveo_test"/--> 
</apex:pageBlock>
1 Reply
Gravatar for mlaporte@coveo.com

Answer by Martin Laporte, Jun 8, 2016 6:37 AM

Normally that error means that you have multiple CoveoFolding components active at the same time in your search page. This is not supported, you can only "fold" results in one way at the same time. So first I'd look at your search page code (or edit it through the interface editor, depending on your setup) to try and find the duplicate components. If you really need to have multiple ones, use the data-tab attribute to enable only one on each tab (you can also exclude one from a tab using data-tab-not).

Gravatar for gdubey@deloitte.com

Comment by govinddubey, Jun 8, 2016 10:40 AM

Hi,

I removed the unused data-tab after that it is adding the "#firstQueryMeta=%5Bobject%20Object%5D" in URL of search page and fetching the result in coveo full search page from external source (from internet) not from my custom object (Job__c). Below is the coveo searchinterface component (interface editor) code for your reference:

Gravatar for gdubey@deloitte.com

Comment by govinddubey, Jun 8, 2016 10:43 AM

Code:

<div id="search" class="CoveoSearchInterface" data-hidden-expression="Job__c" data-hide-until-first-query="false" data-auto-trigger-query="true">
  <span class="CoveoAnalytics">
  </span>
  <span class="CoveoTopAnalyticsSuggestions">
  </span>
  <div class="coveo-search-section">
    <div class="coveo-logo-column" style="background-color:white; border: 0px solid;">
    </div>
    <h1 style="text-decoration: none;font-size:30px;padding-left: 50%;font-weight:bold">
      Search Job
    </h1>
    <div class="coveo-searchBox-column">
      <div class="coveo-search-section-wrapper">
        <div class="CoveoSearchBox" data-activate-omnibox="true">
        </div>
      </div>
    </div>
  </div>
  <div class="coveo-results-section">
    <div class="coveo-facet-column" style="background-color:white; border: 0px solid;">
      <div class="CoveoFacet" data-title="Job Location" data-field="@SfJobCCityC" data-colors="#00FTH0">
      </div>
      <div class="CoveoFacet" data-title="Job Type" data-field="@sfjobcjobtypec" data-is-multi-value-field="true">
      </div>
      <div class="CoveoFacet" data-title="Employer Name" data-field="@sfemployernamename">
      </div>
      <div class="CoveoFacet" data-title="Job Title" data-field="@sfjobcname">
      </div>
      <div class="CoveoFacet" data-title="Year" data-field="@sysyear" data-tab="All">
      </div>
      <div class="CoveoFacet" data-title="Month" data-field="@sysmonth" data-tab="All">
      </div>
    </div>
    <div class="coveo-results-column">
      <div class="CoveoShareQuery">
      </div>
      <div class="CoveoPreferencesPanel">
        <div class="CoveoResultsPreferences">
        </div>
        <div class="CoveoResultsFiltersPreferences">
        </div>
      </div>
      <div class="CoveoBreadcrumb">
      </div>
      <div class="coveo-results-header" style="background-color:white">
        <div class="coveo-summary-section">
          <span class="CoveoQuerySummary">
          </span>
          <span class="CoveoQueryDuration">
          </span>
        </div>
        <div class="coveo-clear">
        </div>
      </div>
      <div class="CoveoHiddenQuery" style="background-color:white">
      </div>
      <div class="CoveoDidYouMean">
      </div>
      <div class="CoveoErrorReport" data-pop-up="false">
      </div>
      <div class="CoveoResultList" data-wait-animation="fade">
        <script id="Salesforce" class="result-template" type="text/html" data-condition="raw.sfid != null || raw.syssfid != null">
          <div class="coveo-result-frame">
            <div class="coveo-result-row">
              <div class="coveo-result-cell" style="width:20px; font-size:14px">
              </div>
              <div class="coveo-result-cell" style="font-size:14px">
                <a class="CoveoResultLink" style="font-weight:bold" data-field="@sfjobcid" data-open-quickview="true">
                </a>
                <span class="CoveoQuickView" data-template-id="Salesforce" data-title="Job Description">
                </span>
                <table class="CoveoFieldTable" data-use-json-template-fields="true">
                  <tbody>
                    <tr data-caption="Posting Date" data-field="@SfJobCPostingDateC">
                    </tr>
                    <tr data-caption="Employer Name" data-field="@SfEmployerNameName">
                    </tr>
                    <tr data-caption="Job Description" data-field="@sfjobcjobdescriptionpartc">
                    </tr>
                    <tr data-caption="Education Level" data-field="@SfJobCEducationalLevelC">
                    </tr>
                    <tr data-caption="City" data-field="@sfjobccityc">
                    </tr>
                    <tr data-caption="State" data-field="@SfJobCStateC">
                    </tr>
                    <tr data-caption="Hours per week" data-field="@SfJobCHoursPerWeekC">
                    </tr>
                  </tbody>
                </table>
              </div>
              <div class="coveo-result-cell" style="width:120px; text-align:right; font-size:14px">
                <span class="CoveoFieldValue" data-field="@sysdate" data-helper="date">
                </span>
              </div>
            </div>
            <div class="coveo-result-row">
              <div class="coveo-result-cell" style="width:20px">
              </div>
              <div class="coveo-result-cell">
              </div>
            </div>
          </div>
        </script>
Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 8, 2016 1:43 PM

Code continued:

        <script id="Default" class="result-template" type="text/html">
          <div class="coveo-result-frame">
            <div class="coveo-result-row">
              <div class="coveo-result-cell" style="width:20px; font-size:14px">
                <span class="CoveoFileTypeIcon"></span>
              </div>
              <div class="coveo-result-cell" style="font-size:14px">
                <a class="CoveoResultLink"></a>
                <span class="CoveoQuickView"></span>
              </div>
              <div class="coveo-result-cell" style="width:120px; text-align:right; font-size:14px">
                <span class="CoveoFieldValue" data-field="@sysdate" data-helper="date"></span>
              </div>
            </div>
            <div class="coveo-result-row">
              <div class="coveo-result-cell" style="width:20px"></div>
              <div class="coveo-result-cell" style="text-align:justify">
Gravatar for mlaporte@coveo.com

Comment by Martin Laporte, Jun 8, 2016 4:00 PM

Your filter in data-hidden-expression is incorrect. It matches only documents containing the text "Job__c". You probably want to use something like @objecttype==jobc

Gravatar for gdubey@deloitte.com

Comment by govinddubey, Jun 9, 2016 2:08 AM

Hi,

I changed data-hidden-expression value to @objecttype==jobc still issue is not resolved. It is fetching result from external Source (internet) not from my custom object (jobC).

Gravatar for mlaporte@coveo.com

Comment by Martin Laporte, Jun 13, 2016 9:00 AM

I'm not 100% certain about what it the proper query expression to match your data… You should try to remove the hidden expression and then test the query in the query box until you get one that really matches your intended content…

Ask a question