Forum Replies Created

Viewing 15 replies - 16 through 30 (of 77 total)
  • Thread Starter suntower

    (@suntower)

    No. In fact, the Attachment was not attached to any post. I then attached it to a Public post and it made no difference.

    Thread Starter suntower

    (@suntower)

    Interesting! I get the same when not logged in as Admin.

    Is there some Post Status that might be involved?

    Thread Starter suntower

    (@suntower)

    Thanks for being so quick and so diligent.

    Here is a link to an attachment/jpg that does not show in the Search for “Ray Bishop” even though it is tagged “Ray Bishop” and the media_donor_name is “Ray Bishop” and “Ray_Bishop” is in the file name.

    https://seatacnoise.info/?attachment_id=10557

    Thread Starter suntower

    (@suntower)

    Thanks for the quick reply.

    1. I have enabled Debug Mode in the Debugging tab. Now what?
    2. FWIW, in the top half of the Debugging tab, I enter the attachment ID and it returns what looks normal. But when I enter the same number in the lower half “how does the post look like”, the results are empty.
    3. I have -no- relevanssi filters or code in my theme. I just checked the box to index attachments. As I said, it properly finds both PDFs and DOCs.
    4. I went so far as to open the database and check the image.

    UPDATE: Other searches for images -do- work. The results are inconsistent. This makes me think that the index is not working properly or that some items are not being indexed. Any ways to test the integrity of the index or to ‘flush’ it?

    UPDATE #2: I unchecked the Expand Shortcodes box and tried again. It did -not- make the correct image visible BUT the results now include an image that does -not- contain the keyword -anywhere- I can see. Not in the tags, categories, caption, title, filename, nothing.

    • This reply was modified 3 years, 3 months ago by suntower.
    Thread Starter suntower

    (@suntower)

    You rock! 🙂

    Agreed. does not work for moderated comments. But to be fair, I have tried 3 similar plugins now and none of them do this. I do not understand why this is so hard.

    Thread Starter suntower

    (@suntower)

    Of course I meant in the Footer. Arghhhhh. It wouldn’t let me edit the topic. Sorry.

    Thread Starter suntower

    (@suntower)

    Sorry… I’ll stop bugging you with this one last thing. It appears that the code you gave me prevents the index from being built. It wipes out the index, the gets stuck during the Counting…

    Is there a way to debug what is getting stuck? SQL query being run?

    Thanks as always.

    Thread Starter suntower

    (@suntower)

    Also: note that the filter you gave me is running when I hit Update on editing a post. I guess I had expected it to hook into the actual Search Query.

    Perhaps there is another filter I could apply this to?

    Thanks in advance.

    Thread Starter suntower

    (@suntower)

    OK then…

    Can you tell me how to output the complete SQL query that is being run on the search page -after- it is processed by this hook so I can see what is happening for myself?

    Thanks in advance.

    Thread Starter suntower

    (@suntower)

    Tried it. It does not throw an error, but it does nothing.

    Any ideas?

    Thread Starter suntower

    (@suntower)

    Thanks. It throws numerous errors. Is this feature new? UNFORTUNATELY, I have a site still using Relevanssi 4.2.3. But it also looks like an interaction with Yoast. Ideas?

    Notice: Undefined property: wpdb::$post in /home/content/55/8933555/html/jcharrisfordesmoines/wp-includes/wp-db.php on line 648
    
    Notice: Undefined index: mysql in /home/content/55/8933555/html/jcharrisfordesmoines/wp-content/themes/jchwebdev-twentysixteen/functions.php on line 1441
    
    Notice: Undefined index: reason in /home/content/55/8933555/html/jcharrisfordesmoines/wp-content/themes/jchwebdev-twentysixteen/functions.php on line 1442
    
    Notice: Array to string conversion in /home/content/55/8933555/html/jcharrisfordesmoines/wp-content/plugins/relevanssi/lib/compatibility/yoast-seo.php on line 44
    
    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Array AND post.ID NOT IN (SELECT post_id FROM wp_postmeta WHERE meta_key = '_yoa' at line 1]
    SELECT ID FROM wp_posts AS post WHERE ID = 3547 Array AND post.ID NOT IN (SELECT post_id FROM wp_postmeta WHERE meta_key = '_yoast_wpseo_meta-robots-noindex' AND meta_value = '1' )
    Thread Starter suntower

    (@suntower)

    You are welcome to examine the site, of course. Just let me know what you need to proceed.

    TIA,

    —JC

    Thread Starter suntower

    (@suntower)

    Below is my search.php

    What I meant in my previous msg is that I thought that relevanssi_excerpt_content() runs for every search, but relevanssi_content_to_index() only runs when the index is built. Do I have that right?

    Anyhoo, please let me know what I’m doing wrong.

    —JC

    <?
    /* 
    Template Name: Search
    */
    
    get_header(); ?>
    
    <div id="search" class="section p-search">
       <div class="fullwidth triangle">
          <div class="subtlecircle sectiondivider faicon">
            <span class="fa-stack">
            <i class="fa fa-circle fa-stack-2x"></i>
            <i class="fa fa-search fa-stack-1x"></i>
            </span>
          </div>  
          <h5 class="icon-title">Search</h5>
        </div>
      <div class="container ">
    
    					<p class="nb nodisplay">Please note that this page only searches for stuff in the fabulous <a href="/blog">blog</a> and the <a href="/newsletters">newsletters</a>. Everything else, such as the <a href="/#gallery">gallery</a>, information on <a href="/#who">me</a> and how I can help <a href="/#what">you</a>, etc. can be found on the <a href="/">home page</a>.</p>	
    
       
      <?php if (have_posts() ||  $_GET['s'] == '' ) : // the loop ?>
    
    				<? 
    					if( $sq == '') {
              	$ph = 'Type you want to search for here, then press enter...';
    						
    				} else { 
    						$ph = 'Search Again'; 
    						if( $_GET['s'] !== '')
    						    $ph = '';
      		    //    $ph = $wp_query->found_posts . ' results found for: ' . '&quot;' . $sq . '&quot;' .'. Search Again.';
    					} 
    				?>          
                     
         <div class="search-page-wrapper">
              <form method="get" id="searchform" action="<?php bloginfo('home') ?>">
                <input name="s" id="s" type="text" placeholder="<? echo( $ph );?>">
              </form>
            </div>	         
    
    		  <? $gsq = strtolower( get_search_query() ); 	?>	 
    
     			<? if( $gsq == 'quote' || $gsq == 'quotation' ) {
    					 $pTitle = 'Get a Quote';									 
    					 $pLink .= '#quote';									 
    					 
               echo('<div class="postwrap"><div class="post"><h4 id="quote"><a class="quotation" title="Get a Quote now!" href="#quote">Get a Quote now!</a><a title="Relevance" class="relevance-weight">(50)</a></h4>Fill out this simple form and we\'ll get back to you with an estimate!</div></div>');
    	 			 }
    			?> 							 
    
    			<?php while (have_posts()) : the_post(); // the loop ?>
    
              <div class="postwrap">
           
                 <!--post title as a link-->
                 <? $pType    = get_post_type();
    							  $pTitle   = get_the_title();
    								$pLink    = get_the_permalink();
    								$pExcerpt = get_the_excerpt();
    								 
    								if( rtrim($pLink, '/') == rtrim( get_site_url(), '/') ) {
    									 $pTitle = 'Home Page';
    
    									 if( $gsq == 'gallery' ) {
    										 $pTitle = 'Gallery (Home Page)';
    										 $pLink .= '#gallery';
    										 $pExcerpt = 'Some samples of recent work.';
    									 }
    
    									 if( $gsq == 'bio' ) {
    										 $pTitle = 'Bio (Home Page)';
    										 $pLink .= '#who';
    										 $pExcerpt = 'My background.';										 
    									 }
    
    									 if( $gsq == 'tools' ) {
    										 $pTitle = 'Tools (Home Page)';
    										 $pLink .= '#tools';
    										 $pExcerpt = 'My tools.';										 										 
    									 }
    
    									 if( $gsq == 'contact' ) {
    										 $pTitle = 'Contact (Home Page)';
    										 $pLink .= '#contact';
    										 $pExcerpt = 'Fill out this short form for more information or call <a href="2069490892">(206) 949-0892</a> right now!';										 										 										 
    									 }
    									 
    								 }
    							?>
                  
                  
                  <h4 id="post-<?php the_ID(); ?>"><a class="<?php echo($pType); ?>" title="<?php echo($pTitle); ?>" href="<?php echo($pLink); ?>"><?php echo($pTitle); ?></a><a title="Relevance" class="relevance-weight">(<? echo round($post->relevance_score) ?>)</a></h4>
                 <? if( $pType == 'post') { ?>
    							<ul class="post-categories"> 
    							  <? the_category(', '); ?>
    							</ul>	 
                  
    						 <? } ?>
    
                <div class="post ">
                
               
    						        				
                  <? // post text with the read more link ... sorta
                  echo( $pExcerpt);
    							
    							// echo($post->original_excerpt);
    
                  if(strstr($post->post_content,'<!--more')) { //if the story has the more tag... 
    							?>
    	              <p class="post-more"><a href="<?php the_permalink(); ?>">Read the rest of this entry &raquo;</a></p>
                <?php } ?>
            
                <!--post meta info-->
            
               </div> <!--post-->
            
            </div> <!--postwrap-->
    
    	
          <?php endwhile; // end of one post ?>
    
        
          <?php else : // do not delete ?>
            <div class="postwrap">
    
    	  		<p class="subtitle">Oops!</p>
            <p class="search_results">No results. Nothing. A black, empty void of fear, uncertainty and doubt.</p>
    
            
            <form id="searchform" action="http://jchwebdev.com" method="get">
    						<input id="s" type="text" name="s" placeholder="Search Again">
    				</form>
            
            <p class="search_results">Please try again with another search term or just <a href="#contact">contact</a> me and we'll get to the bottom of this!</p>
            
            </div>
    
    	<?php endif; // do not delete ?>
      
         <!-- Previous/Next page navigation -->
         <p class="page-nav">
    	     <?php previous_posts_link('&larr; Previous') ?><?php next_posts_link('Next &rarr;') ?>
         </p>    
    
    		<? blog_sidebar(); ?>
    
    	</div>
      
      
      </div>
      
    <!--include footer-->
    <?php get_footer(); ?>
    Thread Starter suntower

    (@suntower)

    I’m confused by your statement, “If the function doesn’t run at all when a search is made, where do the excerpts come, then? ”

    relevanssi_content_to_index() runs when index is built, right?

    And relevanssi_excerpt_content() runs during a search, right?

    So I would expect my little filter function to return whatever is in your index (wherever -that- is). Is there some row/column data I can give you from the WP tables to help you troubleshoot? Any -other- info I can provide?

    FWIW: My original assumption was that this results is garbage from some bad pointer (sorry, old guy alert) but I can tell you that it is completely repeatable. ie. I have -removed- Relevannsi, deleted your tables and then re-installed and the exact same garbage result is returned for the same page.

    Please let me know how I can help. It’s kinda driving me nuts. Thanks.

Viewing 15 replies - 16 through 30 (of 77 total)