Error PHP 8.1
- YannParticipant2 years, 8 months ago #29140
Hi,
I get this error at the indexing windows after upgrading everything.
Error on line 63 of file /var/www/html/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/rmccue/requests/library/Requests/Cookie/Jar.php: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
I now get:
Error code: parsererror
Error message: SyntaxError: Unexpected token { in JSON at position 339
{“nb_results”:0,”status”:8192,”message”:”Error on line 160 of file \/var\/www\/html\/wp-content\/plugins\/wpsolr-pro\/wpsolr\/core\/vendor\/solarium\/solarium\/src\/Component\/RequestBuilder\/RequestParamsTrait.php: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated”,”indexing_complete”:false}{“nb_results”:0,”status”:8192,”message”:”Error on line 60 of file \/var\/www\/html\/wp-content\/plugins\/wp-mail-smtp\/vendor\/woocommerce\/action-scheduler\/classes\/ActionScheduler_DateTime.php: Return type of ActionScheduler_DateTime::setTimezone($timezone) should either be compatible with DateTime::setTimezone(DateTimeZone $timezone): DateTime, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice”,”indexing_complete”:false}using PHP 8.1.2, Solr 8.11.1 on debian
YannParticipant2 years, 8 months ago #29145Thanks, I was able to downgrade. Caused other issues that are now fixed.
Current one is now this on Solr:03/02/2022, 11:58:55 ERROR false x:xxxxxxxxxxxxxx RequestHandlerBase org.apache.solr.common.SolrException: org.apache.solr.search.SyntaxError: Query Field 'title' is not a valid field name
I must say that we had some specific settings in the Solr5 version before I upgrade to 8.11.1. The current version setting is curently vanilla. I do not know how to migrate ald settings to the new index I created. I am progressing one error fix at a time.
wpsolrKeymaster2 years, 8 months ago #29147This error means that the “title” field is expected in your solr schema.xml.
You need to merge your schema.xml and WPSOLR’s schema.xml.
I advise to create a new index from WPSOLR admin. It will deploy the schema.xml required. You can then change it if necessary.YannParticipant2 years, 8 months ago #29151OK Thanks.
Started over again with this, So got the new index running.
I got 2 different type of infomration. Video and Pdf. Knowing it’s harder for pdf, I tried indexing only video. It went well.
Back on the pdf articles indexing, I get this error from the index button:An error occured: Solr HTTP error: Bad Request (400) { "responseHeader":{ "status":400, "QTime":213}, "error":{ "metadata":[ "error-class","org.apache.solr.common.SolrException", "root-error-class","java.io.CharConversionException"], "msg":"Invalid UTF-8 middle byte 0x3c (at char #337493, byte #343591)", "code":400}}
YannParticipant2 years, 8 months ago #29152Following another tip, I tested indexing 1 element at a time. I was able to index the first 27 files. I can see it’s not good.:
search result with exerpt:
Le fruit de la vigne
://biblia.com/bible/ec-sbgbibs212007/Jn15.1-3, “file_metadata”:, “pdf:PDFVersion”,, “xmp:CreatorTool”,, “Company”,, “stream_content_type”,, “pdf:hasXFA”,, …Maybe it is now related to the solr custom configuration we had on version 5 ?
- This reply was modified 2 years, 8 months ago by wpsolr.
YannParticipant2 years, 8 months ago #29158Hi,
I made a lot of test and found out a weird behaviour that makes me think it’s not the pdf. (btw, It was working with old 2017 installation).1. Index using step 3. of the wpsolr plugin admin,
2. Error raise, I find the title of the post from the debug information
3. I find and open the problematic post
4. I just save the post without doing anychange:
You see that it raise a indexing error.
5. I can see there is no text in the post description and the exerpt. I add a space in the post description and save again:
https://ibb.co/47qtwn2
Now it works….
6. I also tested add a space in the exerpt field and it also works.So, it makes me think it is really not pdf related. I got 700 like that. Any idea how ot fix this?
wpsolrKeymaster2 years, 8 months ago #29169What is this answer? Is it supposed to help me fix the issues for the client?
It just means I could not replicate your issue on my environments. I gave you my Solr version, so you can compare to yours eventually. You can eventually set a whitespace character to all your description by hand or code, as a workaround.
All of that after paying 400$ plus sysadmin to upgrade from Solr V5.4
This has nothing to do with WPSOLR. We do not install, maintain, or host Solr for clients. But we provide connectors to some Solr hosting services, like Opensolr or Searchstax, if you do not want to do it.
Still having Invalid UTF-8 middle byte 0x3c
This is an error that comes from a format problem in documents. Nothing that can be fixed. You can check similar issue on https://www.wpsolr.com/forums/topic/indexing-error-invalid-utf-8-middle-byte-0x3c/.
Please create a topic for each of those issues. It will be easier to follow up each problem individually.
This topic was about PHP 8.1, and was mentioned by you as solved, therefore closed.
You must be logged in to reply to this topic.