Forum Replies Created

  • wpsolr
    Keymaster
    3 years ago in reply to: Excerpt of results not show #35626

    Let’s continue on /forums/topic/didi-you-mean-error/ for the “did you mean” issue.

    wpsolr
    Keymaster
    3 years ago in reply to: “Did you mean” error #35622

    I just tested the “Did you mean” with OpenSearch and the deprecated template. It worked fine.

    no mapping found for field [spell]

    It looks like your index schema does not contain the definition for field “spell”.
    Was the index created by WPSOLR?

    wpsolr
    Keymaster
    3 years ago in reply to: Excerpt of results not show #35621

    The “did you mean” section is added just before the search results. Just tested with OpenSearch.

    wpsolr
    Keymaster
    3 years ago in reply to: Excerpt of results not show #35617

    You can use a hook to modify the results, including title and content: WPSOLR_Events::WPSOLR_ACTION_BEFORE_RENDER_TEMPLATE

    use wpsolr\core\classes\WPSOLR_Events;
    add_filter( WPSOLR_Events::WPSOLR_ACTION_BEFORE_RENDER_TEMPLATE, 'wpsolr_action_before_render_template', 10, 1 );
    
    /**
    * @param array $template_params
    *
    * @return array
    */
    public function wpsolr_action_before_render_template( $template_params ) {
      foreach ( $template_params['template_data']['results']['items'] as &$result ) {
        // Modify $result if title or content are empty
        if ('...' === $result['content']) {
          // Replace with original post excerpt from get_post($result['PID'])
        }
      }
      return $template_params;
    }

    You can find a full example in /plugins/wpsolr-pro/wpsolr-pro/wpsolr/pro/extensions/woocommerce/class-wpsolr-plugin-woocommerce.php

    wpsolr
    Keymaster
    3 years ago in reply to: Excerpt of results not show #35614

    In fact, it is deprecated for many years. But let’s see what we can do to help you.

    The issue with the shortcode is that it does not call WP_Post to get additional informations, like the default excerpt. It relies only on the information returned by the search engine, which for performance reason does not return descriptions or excerpts.

    Let me dig in the code…

    wpsolr
    Keymaster
    3 years ago in reply to: Excerpt of results not show #35611

    Unfortunately, the WPSOLR search template shortcode is deprecated.

    wpsolr
    Keymaster
    3 years ago in reply to: Excerpt of results not show #35608

    Thanks. This url is not the standard search archive url ‘/?s=’. How is this page built?

    wpsolr
    Keymaster
    3 years ago in reply to: Excerpt of results not show #35606

    (By the way, we have a new series of self-signed certificate SSL configuration, and the first one is for OpenSearch: https://github.com/eostis-sarl/wpsolr-opensearch-self-signed-certificates)

    wpsolr
    Keymaster
    3 years ago in reply to: Excerpt of results not show #35605

    I’ve just tested with OpenSearch.

    Can you share here a screenshot of the search page with its troubled results?

    wpsolr
    Keymaster
    3 years ago in reply to: Excerpt of results not show #35603

    This should be like you describe: the highlighted title or description are show. If there are none, the original title and excerpt are displayed.

    Can you describe what are your WPSOLR settings: search engine, and add-ons activated?

    wpsolr
    Keymaster
    3 years ago in reply to: “Did you mean” error #35566

    This template being deprecated, I cannot help with questions or issues.

    wpsolr
    Keymaster
    3 years ago in reply to: “Did you mean” error #35564

    “Did you mean” appears only in the deprecated WPSOLR Ajax template.

    wpsolr
    Keymaster
    3 years, 1 month ago in reply to: Attempt to read property “name” on bool #35503

    This error is usually due to imported products, here variable attributes, missing some information.

    wpsolr
    Keymaster
    3 years, 1 month ago in reply to: Can’t Deactivate/Reactivate License #35490

    Please contact us with the chat box.

    wpsolr
    Keymaster
    3 years, 1 month ago in reply to: TitleCase Facets title in Filters with Hook #35488

    You cannot update facet item labels. It would prevent the filters working correctly.

Viewing 15 posts - 376 through 390 (of 3,679 total)