Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Hmm, when I check the index attachment box and search for an attachment, it appears in the search results without any problems. Seems to me your search results template is correct as well.

    First thing I’d check is to make sure the attachments are actually being indexed. Does the number of documents in the index (shown on the Relevanssi options page) change if you change the attachment option?

    Thread Starter yagraph

    (@yagraph)

    Hi msaari, and thanks for your answer !

    yes, the index number change, but I have a warning :
    Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /home/grandeur/public_html/gn/wp-content/plugins/relevanssi/relevanssi.php on line 1877

    Can it be the problem (PHP safe mode) ?

    and here is the
    State of the Index

    Documents in the index: 414
    Highest post ID indexed: 1866

    clicking “continue indexing” do not allow to improve the index farer than 414, even with a little amount of documents…

    Maybe it’s only an hosting problem ?

    By the way, many thanks for Relevanssi, it is really a great add-on, very useful in most website I run !

    My best regards,
    yagraph

    Thread Starter yagraph

    (@yagraph)

    Hi,

    I’ve solved the PHP safe mode warning issue with my hoster, but the Relevanssi indexing do not seem to be improved :

    I’m stuck with
    Documents in the index: 415
    Highest post ID indexed: 1876

    If I turn WP_debug ON, I see notices of a conflict with mediaelement.js.

    Notice: Undefined variable: type_attribute in /home/grandeur/public_html/gn/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement-js-wp.php on line 297
    
    Notice: Undefined variable: poster_attribute in /home/grandeur/public_html/gn/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement-js-wp.php on line 297
    
    etc.

    If I turn off all my plugins except relevanssi, it’s not better… and I can’t see any image in the search result with Relevanssi or with the default search engine.

    Any help welcome ??

    Thansk again,
    yagraph

    Plugin Author Mikko Saari

    (@msaari)

    What if you disable the Media Element plugin and try to reindex? Will it go past the document 1876? It would seem to me there’s a plugin conflict, and in that case you can usually disable the conflicting plugin, reindex and then enable the plugin again.

    Thread Starter yagraph

    (@yagraph)

    Hi msaari,

    I tried to disable every other plugin and build the index again…
    Or only mediaelement.js… but no results. Warnings disappear, but I get no additional information on why indexing is stuck.

    Now (slightly progress as we add datas) :
    Documents in the index: 418
    Highest post ID indexed: 1937

    Caching in Relevanssi or with another plugin is not activated…

    Here is my extension list apart from Relevanssi :

    • Akismet
    • Annual Archive
    • Blubrry PowerPress
    • Contact Form 7
    • Duplicate Post
    • Enable Media Replace
    • gText Widget
    • MediaElement.js – HTML5 Audio and Video
    • Media Tags
    • Mime Type Link Images
    • QR Code Widget
    • qTranslate
    • Really Simple CAPTCHA
    • Recent Posts Plus

    I realized that maybe qTranslate is a potential conflict source, as it modify the database including conditional comments etc.
    By the way, I use Relevanssi on several blogs, and it’s the first time I encounter an issue, as it’s the first time I use it with qTranslate…

    Plugin Author Mikko Saari

    (@msaari)

    Hmm, it’s hard to say what’s happening without closer debugging (var_dumps in the indexing process and so on). There’s something in there that’s hanging Relevanssi up, but if the indexing fails with all plugins disabled, then it’s probably not a plugin conflict then.

    Thread Starter yagraph

    (@yagraph)

    Hi,

    I’ve finally solved that ! the problem was that the wordpress search query filtered only the ‘post’ post type to be displayed in results…

    the workaround is to put

    <?php if(!$wp_query) global $wp_query;
    $args = array(
    'post_type' => 'any',
    'post_status' => 'any'
    );
    query_posts( array_merge( $args , $wp_query->query ) ); ?>

    at the start of search.php, and then filter in the display loop :

    <?php if ($post->post_type == 'attachment'): ?>
    <!-- Display something -->
    <?php endif; ?>

    Here is my full code :
    https://pastebin.com/MKiz3LRZ

    I hope this will help others…
    Thanks for your time msaari !

    Plugin Author Mikko Saari

    (@msaari)

    Glad you got it sorted out.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] Display pictures in search results ?’ is closed to new replies.