Forums

Relevanssi - A Better Search
Getting PHP notices and WP notice about "unexpected outp (4 posts)

  1. Johanbrook
    Member
    Posted 10 months ago #

    Hi.

    I installed the latest version of Relevanssi on WordPress 3.2.1 today in order to get more powerful search in a semi-big WP site. The plugin is awesome, but there are some hickups.

    First, I get this WP notice when I activate the plugin:

    The plugin generated 1700 characters of unexpected output during activation

    Is this a known issue? Couldn't find it anywhere.

    Also, I keep getting PHP notices on the top of the search page and in feeds for a certain search term:

    Notice: Trying to get property of non-object in /Users/Johan/Sites/projektforum/site/wp-includes/post-template.php on line 30

    I've tried to trace the errors, but there's no reference to a specific piece of plugin code. Note that I got 17 of these notices just before the head section of my site – there are also 17 search results for that very term.

    Line 30 in post-template.php is the WP function get_the_ID() – is the plugin doing anything weird with the $post variable?

    Thanks in advance! Would really appreciate an answer!

    http://wordpress.org/extend/plugins/relevanssi/

  2. msaari
    Member
    Posted 10 months ago #

    Can you dump the $post variable before the offending line to find out what's in it when the error happens?

    That activation error sounds odd, I haven't received any other reports of it, so it might be some local conflict with your host.

  3. Johanbrook
    Member
    Posted 10 months ago #

    Sure:

    stdClass Object
    (
        [ID] => 148
        [post_author] => 1
        [post_date] => 2007-09-04 09:55:04
        [post_date_gmt] => 2007-09-03 23:55:04
        [post_content] => [.. Content ..]
        [post_title] => A post with multiple pages
        [post_excerpt] =>  [.. Excerpt ..]
        [post_status] => publish
        [comment_status] => open
        [ping_status] => open
        [post_password] =>
        [post_name] => a-post-with-multiple-pages
        [to_ping] =>
        [pinged] =>
        [post_modified] => 2007-09-04 09:55:04
        [post_modified_gmt] => 2007-09-03 23:55:04
        [post_content_filtered] =>
        [post_parent] => 0
        [guid] => http://asdftestblog1.wordpress.com/2007/09/04/a-post-with-several-more-tags/
        [menu_order] => 0
        [post_type] => post
        [post_mime_type] =>
        [comment_count] => 0
        [relevance_score] => 17.12
        [filter] => raw
    )

    The activation error message only showed up in wp-admin when developing locally. When I installed the plugin on a test site online, it didn't show (perhaps depending on if WP_DEBUG is set to false or true).

  4. msaari
    Member
    Posted 10 months ago #

    I'll have to try the activation with debugging turned on (I've run Relevanssi a lot with debugging on, but since I activate the debugging from Relevanssi files, I don't think I've ever activated it with debugging enabled). I don't see why it should cause unexpected output, but I suppose it is possible.

    I don't get why you should get errors about non-objects, as that's a fine object. Relevanssi shouldn't mess with the global $post object, as you notice there's just an extra field added, nothing else.

Reply

You must log in to post.

About this Plugin

About this Topic