Trying to create index but get an error every time
-
wowmattParticipant3 years, 10 months ago #22457
Hi there,
Hope you are well 🙂
I am having some issues with indexing a custom post type, it gets most the way and always leaves 68 left to index and according to the debug info the issue is:
“Error message: SyntaxError: JSON Parse error: Unexpected identifier “Posts””Any ideas how I can solve this?
wpsolrKeymaster3 years, 10 months ago #22458You can index with the “debug” checkbox on. At first error, restart with “batch size” 1: this will give you the ID of the post type in error. You can then edit the post type and try to see the problem, or even use the metabox “Do not search” to discard it from the index.
wowmattParticipant3 years, 10 months ago #22461Hey 🙂
So I tried this but it didn’t really make much sense to me.
Please see the error message I got below, any ideas?
Error code: parsererror Error message: SyntaxError: JSON Parse error: Unexpected identifier "Posts" Posts excluded from the index:<br><b></b><br><br>******** DEBUG ACTIVATED - Beginning of new loop (batch size) *******<br><br>******** DEBUG ACTIVATED - Query documents from last post date *******<br><br>Query:<br><b>SELECT ID, post_modified, post_parent, post_type FROM vt5D_posts AS A WHERE ((post_modified = '2020-10-26 10:42:43' AND ID > 39623) OR (post_modified > '2020-10-26 10:42:43')) AND ( post_status NOT IN ('auto-draft') AND ( post_type = 'offer' ) ) ORDER BY post_modified ASC, ID ASC LIMIT 1</b><br><br>Last post date:<br><b>2020-10-26 10:42:43</b><br><br>Last post ID:<br><b>39623</b><br><br>Post to be sent:<br><b>{ "id": 39624, "PID": 39624, "type": "offer", "meta_type_s": "post_type", "displaymodified": "2020-10-26T10:42:43Z", "title": "Offer Closed", "title_s": "Offer Closed", "permalink": "https:\/\/staging.REDACTED.com\/offer\/offer-closed\/", "post_status_s": "publish", "content": " ", "post_author_s": "1", "author": "Matt", "menu_order_i": 0, "PID_i": 39624, "author_s": "https:\/\/staging.REDACTED.com\/author\/matt\/", "displaydate": "2020-10-26T10:42:37Z", "displaydate_dt": "2020-10-26T10:42:37Z", "date": "2020-10-26T10:42:37Z", "displaymodified_dt": "2020-10-26T10:42:43Z", "modified": "2020-10-26T10:42:43Z", "displaymodified_dt_i": 1603708963, "displaymodified_dt_y_i": 2020, "displaymodified_dt_ym_i": 10, "displaymodified_dt_yw_i": 44, "displaymodified_dt_yd_i": 300, "displaymodified_dt_md_i": 26, "displaymodified_dt_wd_i": 2, "displaymodified_dt_dh_i": 10, "displaymodified_dt_dm_i": 42, "displaymodified_dt_ds_i": 43, "displaydate_dt_i": 1603708957, "displaydate_dt_y_i": 2020, "displaydate_dt_ym_i": 10, "displaydate_dt_yw_i": 44, "displaydate_dt_yd_i": 300, "displaydate_dt_md_i": 26, "displaydate_dt_wd_i": 2, "displaydate_dt_dh_i": 10, "displaydate_dt_dm_i": 42, "displaydate_dt_ds_i": 37, "date_i": 1603708957, "date_y_i": 2020, "date_ym_i": 10, "date_yw_i": 44, "date_yd_i": 300, "date_md_i": 26, "date_wd_i": 2, "date_dh_i": 10, "date_dm_i": 42, "date_ds_i": 37, "displaydate_i": 1603708957, "displaydate_y_i": 2020, "displaydate_ym_i": 10, "displaydate_yw_i": 44, "displaydate_yd_i": 300, "displaydate_md_i": 26, "displaydate_wd_i": 2, "displaydate_dh_i": 10, "displaydate_dm_i": 42, "displaydate_ds_i": 37, "modified_i": 1603708963, "modified_y_i": 2020, "modified_ym_i": 10, "modified_yw_i": 44, "modified_yd_i": 300, "modified_md_i": 26, "modified_wd_i": 2, "modified_dh_i": 10, "modified_dm_i": 42, "modified_ds_i": 43, "comments": [], "numcomments": 0, "categories_str": [], "categories": [ "$A", "2039-12-31T12:59:59Z", "992", "https:\/\/www.latestoffers.com.au\/network-offer-closed\/", "672 hours", "https" ], "flat_hierarchy_categories_str": [], "non_flat_hierarchy_categories_str": [], "tags": [], "wpcf-conversion-type_s": [], "wpcf-conversion-type_str": [], "wpcf-currency_s": [ "$A" ], "wpcf-currency_str": [ "$A" ], "wpcf-default-payout_i": [], "wpcf-default-payout_str": [], "wpcf-default-sale-percent-com_i": [], "wpcf-default-sale-percent-com_str": [], "wpcf-email-subjects_str": [], "wpcf-epc_i": [], "wpcf-epc_str": [], "wpcf-expiration-date_dt": [ "2039-12-31T12:59:59Z" ], "wpcf-expiration-date_str": [ "2039-12-31T12:59:59Z" ], "wpcf-expiration-date_dt_i": [ 2208949199 ], "wpcf-from-names_str": [], "wpcf-incentive_str": [], "wpcf-offer-id_i": [ 992 ], "wpcf-offer-id_str": [ 992 ], "wpcf-preview-url_str": [ "https:\/\/www.latestoffers.com.au\/network-offer-closed\/" ], "wpcf-session-lifespan_str": [ "672 hours" ], "wpcf-terms-conditions_str": [], "wpcf-tracking-protocol_str": [ "https" ], "wpcf-type_str": [] }</b><br><br>{"nb_results":0,"status":0,"message":"failed to parse [wpcf-expiration-date_dt_i]","indexing_complete":false}
wpsolrKeymaster3 years, 10 months ago #22463Your date wpcf-expiration-date “2039-12-31” is converted in 32 bits integer, but is so far in the future that it exceeds the integer limit of 2^31
It is a bug, but I have no ways of fixing it for now.
You can either edit your post and mark it as “not searcheable”, or change the date.
You must be logged in to reply to this topic.