• Resolved ricardowordpress

    (@ricardowordpress)


    I’m trying to activate the plugin and I get this error:

    solr 5.1.0 WordPress 4.2.1 (NO war file deployment)

    Solr HTTP error: OK (500) {“error”:{“msg”:”Ping query caused exception: Bad contentType for search handler :text/xml; charset=UTF-8 request={q=solrpingquery&json.nl=flat&omitHeader=true&wt=json&echoParams=all&distrib=false}”,”trace”:”org.apache.solr.common.SolrException: Ping query caused exception: Bad contentType for search handler :text/xml; charset=UTF-8 request=

    Tests:

    https://192.168.3.18:8984/solr/wordpress/admin/ping?action=status
    <response>
    <lst name=”responseHeader”>
    <int name=”status”>0</int>
    <int name=”QTime”>0</int>
    <lst name=”params”>
    <str name=”action”>status</str>
    <str name=”echoParams”>all</str>
    <str name=”q”>solrpingquery</str>
    <str name=”distrib”>false</str>
    </lst>
    </lst>
    <str name=”status”>enabled</str>
    </response>

    Test with Solarium examples

    Solarium library version: 3.2.0 –
    {“endpoint”:{“localhost”:{“host”:”192.168.3.18″,”port”:8984,”path”:”\/solr\/wordpress”}}}
    {}

    Fatal error: Uncaught exception ‘Solarium\Exception\HttpException’ with message ‘Solr HTTP error: OK (500) {“error”:{“msg”:”Ping query caused exception: Bad contentType for search handler :text/xml; charset=UTF-8 request=

    Directory rights:
    drwxr-xr-x 7 www-data www-data 4096 May 4 12:56 .
    drwxr-x— 10 www-data www-data 4096 May 4 12:56 ..
    -rw-r–r– 1 www-data www-data 11952 Apr 25 20:34 ajax_solr_services.php
    -rw-r–r– 1 www-data www-data 2559 Apr 25 20:34 autocomplete.php
    drwxr-xr-x 3 www-data www-data 4096 May 4 12:56 classes
    -rw-r–r– 1 www-data www-data 26716 May 4 14:34 class-wp-solr.php
    -rw-r–r– 1 www-data www-data 55 Apr 25 20:34 composer.json
    -rw-r–r– 1 www-data www-data 4510 Apr 25 20:34 composer.lock
    -rw-r–r– 1 www-data www-data 1048648 Apr 25 20:34 composer.phar
    drwxr-xr-x 2 www-data www-data 4096 May 4 12:56 css
    -rw-r–r– 1 www-data www-data 37134 Apr 25 20:34 dashboard_settings.php
    drwxr-xr-x 2 www-data www-data 4096 May 4 12:56 images
    drwxr-xr-x 2 www-data www-data 4096 May 4 12:56 js
    -rw-r–r– 1 www-data www-data 8337 Apr 25 20:34 readme.txt
    -rw-r–r– 1 www-data www-data 7792 Apr 25 20:34 securecookie.php
    -rw-r–r– 1 www-data www-data 10151 Apr 25 20:34 solr_services.php
    drwxr-xr-x 5 www-data www-data 4096 May 4 12:56 vendor
    -rw-r–r– 1 www-data www-data 6716 Apr 25 20:34 wpsolr_search_engine.php

    ———————————————————————–
    Second test to solr 4.9 instance:

    Working OK.

    https://www.ads-software.com/plugins/wpsolr-search-engine/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WPSolr free

    (@wpsolr)

    Did you try with Solr 5.0, just to be sure it is not related to your install ?

    Can you confirm that you used the Solr 5.0 config files on wpsolr.com ?

    Else, there is an issue that looks like yours:
    https://github.com/solariumphp/solarium/issues/326

    (I’ve already patched solarium in WPSOLR 2.5 to fix change of paradigms in 5.0:
    https://github.com/solariumphp/solarium/issues/320)

    Thread Starter ricardowordpress

    (@ricardowordpress)

    I’m using

    solr-impl
    5.1.0 1672403 – timpotter – 2015-04-09 10:37:54
    lucene-spec
    5.1.0
    lucene-impl
    5.1.0 1672403 – timpotter – 2015-04-09 10:30:49

    all_wpsolr-2-solr-5-x

    solrconfig.xml
    <luceneMatchVersion>5.0</luceneMatchVersion>

    Thread Starter ricardowordpress

    (@ricardowordpress)

    Changing the Curl.php line 162 the ping worked in both environments 4.9 and 5.1

    if (!isset($options[‘headers’][‘Content-Type’])) {
    $options[‘headers’][‘Content-Type’] = ‘text/xml; charset=utf-8’;
    $options[‘headers’][‘Content-Type’] = ”;
    }
    Solarium library version: 3.2.0 –
    {“endpoint”:{“localhost”:{“host”:”127.0.0.1″,”port”:8984,”path”:”\/solr\/wordpress”}}}
    {}
    {}
    Ping query successful
    array(1) {
    [“status”]=>
    string(2) “OK”
    }

    Now in the indexing process:
    Solr HTTP error: OK (415) {“responseHeader”:{“status”:415,”QTime”:4},”error”:{“msg”:”Missing ContentType”,”code”:415}}

    Plugin Author WPSolr free

    (@wpsolr)

    You’d rather use Solr 4.9 or 5.0. Until Solarium solves those issues.

    I suggest you open a ticket at Solarium’s github project.

    Thread Starter ricardowordpress

    (@ricardowordpress)

    Thanks, I’m just doing some tests. My installation is just for personal training.

    If you instruct me what should I write into the ticket for Solarium, what part of the code I’m debugging?

    Any simple example to follow and do some tests?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plugin Activation Error with solr 5.1.0’ is closed to new replies.