Error in Result
-
Hi Miko
I use divi and revelanssy
Today i see a big problem in my search result.
Search terms and results not correct.I have h1 title page
and text coresponding at other page…..
-
I have some search results that are not consistent, I have a page that is still displayed in the results but the title of the results and the accompanying text are part of two completely different page is inconsistent
First of all, see how to make Divi show Relevanssi-generated excerpts here. By default, the excerpts Divi shows are not generated by Relevanssi, but by Divi, and Relevanssi has nothing to do with them.
If, after that modification, you’re still seeing titles and excerpts that don’t match the same post, there’s something weird going on in your site, and I would recommend you start by deactivating other plugins to see if they are messing up with the results.
Also, can I please see your site?
hi Miko,
I desactivate all plugin but, my problem it’s same
If i understand this : your link solution i change my custom search page :<?php get_header(); ?> <?php echo do_shortcode('[et_pb_section global_module="49642"][/et_pb_section]'); ?> <?php echo do_shortcode('[et_pb_section global_module="49644"][/et_pb_section]'); ?> <div id="main-content"> <div class="container"> <div id="content-area" class="clearfix"> <div id="left-area"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); $post_format = et_pb_post_format(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class( 'et_pb_post' ); ?>> <?php $thumb = ''; $width = (int) apply_filters( 'et_pb_index_blog_image_width', 1080 ); $height = (int) apply_filters( 'et_pb_index_blog_image_height', 675 ); $classtext = 'et_pb_post_main_image'; $titletext = get_the_title(); $thumbnail = get_thumbnail( $width, $height, $classtext, $titletext, $titletext, false, 'Blogimage' ); $thumb = $thumbnail["thumb"]; et_divi_post_format_content(); if ( ! in_array( $post_format, array( 'link', 'audio', 'quote' ) ) ) { if ( 'video' === $post_format && false !== ( $first_video = et_get_first_video() ) ) : printf( '<div class="et_main_video_container"> %1$s </div>', $first_video ); elseif ( ! in_array( $post_format, array( 'gallery' ) ) && 'on' === et_get_option( 'divi_thumbnails_index', 'on' ) && '' !== $thumb ) : ?> <a class="entry-featured-image-url" href="<?php the_permalink(); ?>"> <?php print_thumbnail( $thumb, $thumbnail["use_timthumb"], $titletext, $width, $height ); ?> </a> <?php elseif ( 'gallery' === $post_format ) : et_pb_gallery_images(); endif; } ?> <?php if ( ! in_array( $post_format, array( 'link', 'audio', 'quote' ) ) ) : ?> <?php if ( ! in_array( $post_format, array( 'link', 'audio' ) ) ) : ?> <?php endif; ?> <?php if ( 'on' !== et_get_option( 'divi_blog_style', 'false' ) || ( is_search() && ( 'on' === get_post_meta( get_the_ID(), '_et_pb_use_builder', true ) ) ) ) { truncate_post( 250 ); } else { the_content(); } ?> <?php endif; ?> <p style="text-align: center; margin-top:15px;"><button class="searchbut"> <a style="padding:10px;" href="<?php the_permalink(); ?>">Voir plus</a> </button></p> </article> <!-- .et_pb_post --> <?php endwhile; if ( function_exists( 'wp_pagenavi' ) ) wp_pagenavi(); else get_template_part( 'includes/navigation', 'index' ); else : get_template_part( 'includes/no-results', 'index' ); endif; ?> </div> <!-- #left-area --> </div> <!-- #content-area --> </div> <!-- .container --> </div> <!-- #main-content --> <?php get_footer();?>
to
<?php get_header(); ?> <?php echo do_shortcode('[et_pb_section global_module="49642"][/et_pb_section]'); ?> <?php echo do_shortcode('[et_pb_section global_module="49644"][/et_pb_section]'); ?> <div id="main-content"> <div class="container"> <div id="content-area" class="clearfix"> <div id="left-area"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); $post_format = et_pb_post_format(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class( 'et_pb_post' ); ?>> <?php $thumb = ''; $width = (int) apply_filters( 'et_pb_index_blog_image_width', 1080 ); $height = (int) apply_filters( 'et_pb_index_blog_image_height', 675 ); $classtext = 'et_pb_post_main_image'; $titletext = get_the_title(); $thumbnail = get_thumbnail( $width, $height, $classtext, $titletext, $titletext, false, 'Blogimage' ); $thumb = $thumbnail["thumb"]; et_divi_post_format_content(); if ( ! in_array( $post_format, array( 'link', 'audio', 'quote' ) ) ) { if ( 'video' === $post_format && false !== ( $first_video = et_get_first_video() ) ) : printf( '<div class="et_main_video_container"> %1$s </div>', $first_video ); elseif ( ! in_array( $post_format, array( 'gallery' ) ) && 'on' === et_get_option( 'divi_thumbnails_index', 'on' ) && '' !== $thumb ) : ?> <a class="entry-featured-image-url" href="<?php the_permalink(); ?>"> <?php print_thumbnail( $thumb, $thumbnail["use_timthumb"], $titletext, $width, $height ); ?> </a> <?php elseif ( 'gallery' === $post_format ) : et_pb_gallery_images(); endif; } ?> <?php if ( ! in_array( $post_format, array( 'link', 'audio', 'quote' ) ) ) : ?> <?php if ( ! in_array( $post_format, array( 'link', 'audio' ) ) ) : ?> <?php endif; ?> <?php if ( 'on' !== et_get_option( 'divi_blog_style', 'false' ) || ( is_search() && ( 'on' === get_post_meta( get_the_ID(), '_et_pb_use_builder', true ) ) ) ) { the_excerpt(250); } else { //the_content(); } ?> <?php endif; ?> <p style="text-align: center; margin-top:15px;"><button class="searchbut"> <a style="padding:10px;" href="<?php the_permalink(); ?>">Voir plus</a> </button></p> </article> <!-- .et_pb_post --> <?php endwhile; if ( function_exists( 'wp_pagenavi' ) ) wp_pagenavi(); else get_template_part( 'includes/navigation', 'index' ); else : get_template_part( 'includes/no-results', 'index' ); endif; ?> </div> <!-- #left-area --> </div> <!-- #content-area --> </div> <!-- .container --> </div> <!-- #main-content --> <?php get_footer();?>
for simply i change truncate_post( 250 ); to the_excerpt(250);
but this solution i if understand correctly don’t work ??
my site to this shortener url https://bit.ly/2AHYtrS
if you search “rouleau” your see same texte for all result ??i don’t understand why it’s same page who appear in result
can you help me? :s
- This reply was modified 6 years ago by valentinchevo.
- This reply was modified 6 years ago by valentinchevo.
That is really quite bizarre.
I think this is somehow related to how your product pages are built. After there’s a heading on the page, the excerpt-builder somehow fetches the wrong product information.
If you add this to your theme functions.php and then search for “Lingettes imprégnées”, what does it print out?
add_filter( 'relevanssi_pre_excerpt_content', 'rlv_test' ); function rlv_test( $test ) { var_dump( $test ); exit(); }
Once you get the results, you can remove this code.
hi Mikko
this result :https://drive.google.com/open?id=1URSVVB31ZpUIHcZKOZWznRe4NyXIf0zK
this site is a beta do you want an access for testing ?
thank for you help ??
Now there’s the thing: as you can see, the wrong content is already there when Relevanssi starts building the excerpts. For most products, the product details are replaced with the wrong product details.
This is a complicated issue, with your theme and the page builder your theme is using heavily involved in this. You’d need to figure out why your theme is showing Relevanssi the wrong content; probably it’s because Relevanssi is accessing the posts in somewhat unexpected context outside the post loop, and that throws the page builder off somehow.
I’m not sure how to fix this; it may be this can’t be easily fixed. In any case, this is something I can’t fix here on the forums, it’s just too big and not directly related to a Relevanssi bug, either.
Also, this issue doesn’t affect only the excerpts: I’m pretty sure it’s also affecting indexing, ie. the wrong content is indexed and the posts probably cannot found with all the right content.
Fixing this would require extensive debugging; it may well be easier to just switch to another search plugin that works better with your theme. Getting Relevanssi to work with your site may be possible, but it’s such a big job I can’t do it for free here on the forums.
hi mikko
can this be a migration problem with duplicator? who would I do not know for example mixing the IDs of the different elements?
I delete the page found in all search results that bug and despite the removal of the page. it still appears in searches that bug even after reindexing. it annoys me, I have not found a solution similar to yours ??
Duplicator should create an identical copy, IDs and all, and that should not affect this.
Did you remove the problem page from the trash? If it’s in the trash, it can still appear elsewhere.
hi MIKKO,
me and divi support have found a problem is a divi bug.
Divi had HTML in a shortcode in builder.Divi support don’t know why i have this error.
Revelenssy is not a problem in this situation. so sorry ??
have nice day
- This reply was modified 6 years ago by valentinchevo.
- The topic ‘Error in Result’ is closed to new replies.