Forums

[resolved] Relevanssi: index and imageproblem (25 posts)

  1. henkboersema
    Member
    Posted 1 year ago #

    I'm having two problems with the Relevanssi plugin.

    First problem: I can't seem to index pages, the indexing of the posts did work.
    I get stuck at a blank page if I try to index only pages or pages and posts.

    Second problem: If I search my website for a certain term Relevanssi brings me to the correct post, but after 1 second it jumps to a different page showing only the image of one of the posts from the previous page...:s The image is a javascript.

    Can somebody help me with this?

    Thanks in advance!

  2. msaari
    Member
    Posted 1 year ago #

    Strange problems. Relevanssi can definitely index pages, so this is about something else. Are you perhaps using another plugin that might cause a conflict here? Blank pages when indexing sound like a plugin conflict to me.

    Your second problem sounds even stranger. Frankly I've got no idea what could cause this. Is there something special in that post? Is it caused by the term, or does the same thing happen with the same posts but different terms?

    Could you point me to the site and tell me how the problem is reproduced, I'd like to see it myself. If you want to be private, you can contact me at mikko at mikkosaari.fi.

  3. henkboersema
    Member
    Posted 1 year ago #

    Thanks for your quick response,

    it could be another plugin causing the conflict but I've got no idea which one. I'm using the following plugins:
    -Contact Form by ContactMe.com
    -Customized Recent Comments
    -Display widgets
    -Flexi Pages Widget
    -GD Star Rating
    -Google XML Sitemaps
    -JJ NextGen Image List
    -JJ NextGen JQuery Carousel
    -NextGEN Gallery
    -NoSpamNX
    -Platinum SEO Pack
    -Relevanssi
    -Strx Zurb CSS3 Awesome Buttons
    -WP Hide Pages

    About the second problem, you can have a look for yourself: http://www.verzekeraars-vergelijken.nl

    The site is in dutch, but if you search for: aansprakelijkheidsverzekering

    you will notice my problem.

    Greetings

  4. msaari
    Member
    Posted 1 year ago #

    Lovely word that 'aansprakelijkheidsverzekering'. Almost as good as 'epäjärjestelmällisyydettömyydellänsäkään'.

    I tried searching with that word and got no funny behaviour, just regular search results. Could it be something local on your computer, or does it only happen to users who are logged in?

    I've used several of your plugins with Relevanssi and nothing stands out... Does any of those plugins use shortcodes that would appear on pages alone and not on posts? If so, try deactivating that plugin and indexing then.

  5. henkboersema
    Member
    Posted 1 year ago #

    I noticed that the "image" problem only occurs when i'm using Chrome(google). With IE noting strange happens.

    The plugin tip helped! The GD star rating plugin conflicted, I deactivated it and indexing went just fine afterwards. Thanks you!

  6. msaari
    Member
    Posted 1 year ago #

    Good, and good to know there's a conflict with GD Star Rating.

    I tried the search with Chrome (OS X), and nothing odd happens.

  7. cortig
    Member
    Posted 1 year ago #

    I’m having the same problem (with a twist).
    Indexing used to bring up a blank page, but since I last updated, I now get a statement telling me Indexing Complete, even though the page has

    Documents in the index:
    Highest post ID indexed:

    Nothing seems to get indexed.
    The Dashboard still says that I need to build my index.
    I played around with the options, to see if I could do anything allowing the plugin to go through and index but nothing I tried helped in any way.
    FYI, it’s on http://www.actinbiotech.com/

  8. msaari
    Member
    Posted 1 year ago #

    What other plugins are active? Indexing works for me in 2.7.4, so it's not a general bug, but something local. Hard to say what's causing the problem, if it isn't a plugin conflict.

  9. cortig
    Member
    Posted 1 year ago #

    I have a bunch indeed. I need to check on that.
    - Akismet
    - Auto-hyperlink URLs
    - bdp-comments
    - Contact Form 7
    - Get recent comments
    - Google Analyticator
    - Obfuscate e-mail
    - Optimize DB
    - Post-Plugin Library
    - reCAPTCHA
    - Relevanssi (obviously)
    - ShareThis
    - Similar Posts

    (later)
    I deactivated everything but Relevanssi and she I select Build Index, I get to the blank page I used to see before.
    Going back to the setting page still mentions that 0 documents are indexed.

    Corentin

  10. msaari
    Member
    Posted 1 year ago #

    Can you access server error logs? There might be a clue of what's causing the problem. Lack of mbstring functions used to be a problem, but Relevanssi should warn about that these days.

  11. cortig
    Member
    Posted 1 year ago #

    I can't access the server logs (very) unfortunately, but I made tests with another blog on the same server and didn't experience any issue, so I''m not so sure it's a server issue :-\

    Corentin

  12. msaari
    Member
    Posted 1 year ago #

    Well, without more information it's hard to say. There's something that's breaking Relevanssi, and it's either something general or in the very first document Relevanssi tries to index.

  13. rmlumley
    Member
    Posted 1 year ago #

    I'm having a similar issue. I just installed the plugin on WordPress 3.1 on our development site.

    I click to Build the Index and Relevanssi says, "Indexing complete!" Nothing is listed for the State of the Index.

    State of the Index

    Documents in the index:
    Highest post ID indexed:

    Any search I try comes up with 0 results. I've tried deactivating every plugin outside of Relevanssi. Same issue. We are using a TwentyTen Child Theme, so I tried removing all of the search files in our child theme (so it just used TwentyTen's theme) and same issue.

  14. msaari
    Member
    Posted 1 year ago #

    Some things you can try... On line 1815 or so is this:

    foreach ($content as $post) {
    		$n += relevanssi_index_doc($post, false, $custom_fields);
    		// n calculates the number of insert queries
    	}

    Change it to

    foreach ($content as $post) {
    var_dump($post->ID);
    		$n += relevanssi_index_doc($post, false, $custom_fields);
    		// n calculates the number of insert queries
    	}

    Do you get a list of all your post ID's?

  15. rmlumley
    Member
    Posted 1 year ago #

    Yes, I received a list of post IDs.

  16. msaari
    Member
    Posted 1 year ago #

    Ok, so the indexing goes through documents. Would you say the list has all your posts and pages or not?

    Next step in debugging this would be to put some var_dump()s in relevanssi_index_doc() to see what happens in the indexing of a single document.

    For example, find this in relevanssi_index_doc():

    $wpdb->query("INSERT INTO $relevanssi_table (doc, term, tf, title)
    			VALUES ($post->ID, '$content', $count, 0)");

    and change it to

    echo $wpdb->query("INSERT INTO $relevanssi_table (doc, term, tf, title)
    			VALUES ($post->ID, '$content', $count, 0)") . '<br>';

    Possible results:
    - nothing: posts are not processed properly
    - FALSE: saving data to the database gives an error
    - 1: term is stored properly in the index

    I'd also take a look at the database - are the database tables present? Maybe they're missing, for some reason.

  17. rmlumley
    Member
    Posted 1 year ago #

    I receive a large list that includes string(4) "ID"

    For example:

    string(4) "3034"

    I'm going to dig deeper into the database. We recently brought our live database down to our dev environment so that they were the same. I wonder if there was an issue that occurred in that migration.

  18. msaari
    Member
    Posted 1 year ago #

    It should print out the number of rows affected in each query, and that should be 1 for each query (as they are simple INSERT queries).

    Do check that the database tables are intact and correct. The indexing clearly processes the entries, but for some reason the entries don't go into the database.

    You could try enabling MySQL errors by adding $wpdb->show_errors(); to the function.

  19. rmlumley
    Member
    Posted 1 year ago #

    One thing I should point out is that there are a ton of breaks before each entry, 287 to be exact. Our site has around 400 pages + posts.

    Where in your function should I add show_errors?

  20. msaari
    Member
    Posted 1 year ago #

    Anywhere before the INSERT queries.

  21. henkboersema
    Member
    Posted 1 year ago #

    Nice work msaari, thanks for your help. I'm singning of for this thread.

  22. rmlumley
    Member
    Posted 1 year ago #

    It turns out it was a database permissions issue. The plugin didn't have permission to create the table. It's all fixed now.

    Thanks for your help, msaari.

  23. msaari
    Member
    Posted 1 year ago #

    Good, glad you got that sorted out and thanks for giving me material for another Relevanssi Knowledge Base article =)

  24. lahrah
    Member
    Posted 1 year ago #

    Msaari, I am having the same problem with it not indexing, so I tried your trick on line 1815 to list the post IDs, but it didn't return any. The plugin HAS successfully created the Relevanssi database tables. Any thoughts off the top of your head what could be causing that behavior? I've done the basic troubleshooting of disabling all other plugins to no avail.

  25. msaari
    Member
    Posted 1 year ago #

    If you have the latest version, the var_dump() needs to be added on line 1876. If you get no results even though the code is in the right place, then... hard to say.

Topic Closed

This topic has been closed to new replies.

About this Topic