Filename cannot be empty

  • estevaoacioli
    Participant
    # 3 months, 2 weeks ago

    We have a new error

    Error on line 169 of file /home/admin/web/finpliance.com.br/public_html/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/ruflin/elastica/lib/Elastica/Document.php: file_get_contents(): Filename cannot be empty

    estevaoacioli
    Participant
    # 3 months, 2 weeks ago

    print

    wpsolr
    Keymaster
    # 3 months, 2 weeks ago

    It could be that you have an attachment post with an empty file name. Perhaps due to faulty imports.

    Edit file /wp-content/plugins/wpsolr-pro/wpsolr/core/classes/engines/class-wpsolr-abstractindexclient.php:

    Replace
    $response = $this->search_engine_client_extract_document_content( $post_attachement_file );

    with

    if ( empty( trim( $post_attachement_file ) ) ) {
     throw new \Exception( 'Attachment without empty file name.' );
    }
    $response = $this->search_engine_client_extract_document_content( $post_attachement_file );

    You will then see the attachment ID in the error message.

    estevaoacioli
    Participant
    # 3 months, 2 weeks ago

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.