• Resolved squarestar

    (@squarestar)


    I’m working on a local site, so I can’t provide a link.

    When I click process all posts I get: Uncaught TypeError: can't access property "length", chunk is undefined.

    This happens when Relevanssi Light is the only plugin active (though I do have posts in my database of post types from other plugins).

    Using latest version of WP and Relevanssi Light. I have added the filter for boolean mode but made no other customisations

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

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

    (@msaari)

    That would happen if Relevanssi Light fetches the posts, but doesn’t actually get any posts.

    It’s easy to fix the error so that it doesn’t happen and I will do that, but it won’t remove the actual cause of this error, which is that the relevanssi_light_get_chunks() function in relevanssi-light-admin-ajax.php tries to fetch posts with get_posts() but for some reason doesn’t get any.

    If you want to debug this further, I would look at what that function is doing. Why is the get_posts() there not getting any results? It’s looking for all posts with post_status of publish – do you perhaps have no posts of the post post type? That could be one explanation.

    Thread Starter squarestar

    (@squarestar)

    Thanks for responding. I do have content that is published, but only of a custom post type. After adding 'post_type' => 'any' to the $args for get_posts() in that function, the process worked without error

    Plugin Author Mikko Saari

    (@msaari)

    That’s an oversight in the code, I’ll add that any in there. Thanks!

    Thread Starter squarestar

    (@squarestar)

    Thanks! Much appreciated ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Javascript TypeError when clicking Process All Posts’ is closed to new replies.