• Hi,

    I’ve used Relevanssi several times and was very happy with it and never had any problem until the last webpage I made (https://schwarzwaelder-haus.de).

    It has a custom theme (based on the underscore_s starter theme) and the search is limited to pages, posts and a custom post called projects.

    When indexing, 2 pages – always the same 2, the homepage and the about (uber uns) page – are not indexed and don’t appear in the result list (when building the index, I always have 2 posts excluded: I guess it is them).

    Other posts (like the parallax posts created with the plugin Parallax Scroll by adamrob.co.uk) appear even though their corresponding post type is not checked in the Relenvassi settings.

    While I was able to solve this last problem by manually excluding all undesired posts through the Relenvassi’s settings, I didn’t succeed in including those 2 pages that keep getting excluded from the index.

    All solutions I found online didn’t help: can you give me a hand here?

    Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 20 total)
  • That does look like Relevanssi results, sure. However, there should be no way for posts to appear in Relevanssi results, if the post type is not indexed.

    As for the front page, does the front page have any actual content in it, or is it built from other posts?

    If you look at the Relevanssi index, has Relevanssi indexed the home page and the über uns page at all? Are there any rows in the wp_relevanssi database table with the doc column having a value 66 or 68? That is, are they being blocked in the indexing, or in the searching?

    Thread Starter btlrknd

    (@btlrknd)

    thaks for the superfast reply!

    Are there any rows in the wp_relevanssi database table with the doc column having a value 66 or 68?

    can you please provide more info on how to check this? I’m a front end dev, not super skilled on the db side…

    Thread Starter btlrknd

    (@btlrknd)

    To reply to your other questions:
    Yes, the front-page has content in it.
    And yes, the custom post type is correctly indexed and correctly displayed. The 2 posts missing are regular pages.

    To check the database, use phpMyAdmin or Adminer or what you have, most hosts offer some kind of access to the database. Find the wp_relevanssi database table and then use the search to find all rows where the doc column is either 66 or 68.

    Thread Starter btlrknd

    (@btlrknd)

    Hi Mikko,

    Thanks again for your fast reply.

    Under the DOC column in the wp_relevanssi (the db table was called YnQkiOGPrelevanssi) there is no 66 nor 68, it jumps from 64 to 70…

    Hope this will help!

    That means Relevanssi has not indexed those pages. It rules out searching issues: this problem has nothing to do with searching.

    Now can there be something that is excluding those pages from the search index? Anything that says “do not index this page”? Any custom functions in your theme?

    Thread Starter btlrknd

    (@btlrknd)

    Hi,

    I’m using Underscore_s as a starter theme to develop a custom theme.
    None of the custom functions I added have anything to do with pages, and anyway this is not the first time that I use Relevanssi with Undescore_s based custom theme. So I would exclude that there’s a conflict between Underscore_s functions and Rlevanssi.

    Also, all other pages are correctly indexed, so I wouldn’t even know how it would possible to exclude only those 2 pages by mistake from the indexing.

    Is there a way to force Relevanssi to index them? Any other solution?

    Possible reasons for Relevanssi not to index a post:

    – Relevanssi post exclusion says no (this is a Premium feature)
    relevanssi_do_not_index filter says no (you’d need to add one yourself)
    – The post type is not indexed (but other pages are indexed in your case)
    – The post status is wrong (but these are published pages)
    – There’s nothing to index in the post

    What happens if you add this to your theme functions.php and then go save one of those pages:

    add_filter( 'relevanssi_indexing_values', 'rlv_test' );
    function rlv_test( $values ) {
        var_dump( $values );
        exit();
    }

    This should spit out a bunch of MySQL queries and then halt. Does it? If it does, then that’s weird, because the post should definitely be indexed then. If it doesn’t, then something weird is going on. You can then try this:

    add_filter( 'relevanssi_indexing_data', 'rlv_test_data' );
    function rlv_test_data( $values ) {
        var_dump( $values );
        exit();
    }

    Again add this and go save the post. This is a step back and shows the data before it is converted to MySQL queries. If this shows an empty array, that tells us Relevanssi sees nothing in the post.

    What do you get from these? Can you show me what the post content looks like in the plain text editor?

    Thread Starter btlrknd

    (@btlrknd)

    Hi,

    Sorry for the delayed response and thanks for your support.

    I added the first piece of code you posted and went and saved the uber uns page. Only thing, I don’t really know where to check this “This should spit out a bunch of MySQL queries and then halt. Does it?”… Can you be so patient to give me better directions please?

    Thanks once again!

    It should be really obvious: when the code is in the theme functions.php and a post is saved, you should see a white screen with a bunch of code in it. If you don’t, then something’s wrong, the Relevanssi indexing is not triggering for some reason.

    Are you using Gutenberg or the classic editor?

    Thread Starter btlrknd

    (@btlrknd)

    I’m using the Classic Editor but actually I’m using ACF PRO for the content. I’m using that in each page though, and used it so far for many websites and the integration with Relevanssi was never a problem.

    In the meanwhile, I also tried the other piece of code you sent to me and also that doesn’t change how the page looks…

    If you go save a different page (one that is indexed), do you get results from the debugging checks?

    There’s something weird with those pages, but it’s really hard for me to say what’s up with them without getting my hands on the site.

    Thread Starter btlrknd

    (@btlrknd)

    I saved another page and I got the expected results from the debugging, but still nothing from those pages…

    I can give you access if you tell me what kind you need, so you can check the site. Let me know!

    Sorry, that level of service is only available for paying Relevanssi customers.

    Thread Starter btlrknd

    (@btlrknd)

    I understand…

    What would you suggest I do then, if there is something else I could do?

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Relevanssi excludes 2 pages’ is closed to new replies.