Custom field filters

  • Piteus
    Participant
    2 years, 12 months ago #26311

    without “AND ((custom_data_dt_i:1594951816137 TO 1609545600000))” it found results but with it no result

    wpsolr
    Keymaster
    2 years, 12 months ago #26312

    Investigating…

    • This reply was modified 2 years, 12 months ago by wpsolr.
    Piteus
    Participant
    2 years, 12 months ago #26314

    I await news

    Piteus
    Participant
    2 years, 12 months ago #26315

    I think i’ve found problem, in algolia custom_data_dt_i is 1589846400 when i search in the query is 1589846400000
    So it has 3 digit more then how is indexed

    wpsolr
    Keymaster
    2 years, 12 months ago #26316

    Please replace your WPSOLR with this fix: https://trello.com/c/mthuQZN6/158-fix-algolia-date-filter

    It should solve your date filtering with Algolia.

    Piteus
    Participant
    2 years, 12 months ago #26317

    Now i’ve a new problem, it seems to filter by date, but the slider is blocked from 19 january 1970 to 19 january 1970, but if i move slide the query in the url bar change correctly(at least apparently not seeing the date), another problem is that after i filter by Date the filter by product_cat disappear

    wpsolr
    Keymaster
    2 years, 12 months ago #26319

    Please replace your WPSOLR with this fix: https://trello.com/c/mthuQZN6/158-fix-algolia-date-filter
    You’ll need to re-index all your data.

    Piteus
    Participant
    2 years, 12 months ago #26321

    I’ve replaced with that fix but and re-indexed all data but it showed me 19 january 1970, i solved editing code in javascript option(2.4 Filter -> custom_data), using code in this page i had this problem
    https://www.wpsolr.com/guide/configuration-step-by-step-schematic/activate-extensions/extension-theme/theme-facets-layouts/theme-range-slider-layout/
    I solved using this

    
    wpsolr_ion_range_slider_options = {
    	type: "double",
        grid: false,
        prettify: function tsToDate(ts) {
        	var lang = "it-IT"
        	var d = new Date(Date.UTC(1970, 0, 1)); 
        	d.setUTCSeconds(ts);
        	return d.toLocaleDateString(lang, { year: 'numeric', month: 'long', day: 'numeric' });
        }
    };
    

    Thanks for the support

    Piteus
    Participant
    2 years, 12 months ago #26322

    Hello, I found a new problem, after i filter by Date or product_cat in the sidebar all other filters disappear and the only one that stays is “All results”

    Piteus
    Participant
    2 years, 12 months ago #26323

    I also noticed that this happens only in shop page, if I search an item by search bar and only after i’m going to filter they don’t disappear

    wpsolr
    Keymaster
    2 years, 12 months ago #26324

    Can you see errors in your WP debug.log ?

    Piteus
    Participant
    2 years, 11 months ago #26325

    No error in debug.log

    Piteus
    Participant
    2 years, 11 months ago #26326

    Filters disappear for each filter i select, not only if i filter by Date, this in shop page

    wpsolr
    Keymaster
    2 years, 11 months ago #26329

    If filters disappear while results are still present, this means an error occurred and WPSOLR reverted the search back to the standard WP search.

    You should see both an error in the javascript console, and an error in debug.log.

    Piteus
    Participant
    2 years, 11 months ago #26335

    I have set

    
    define('WP_DEBUG', true);
    define('WP_DEBUG_log', true);
    

    But no files were created, i’ve not error in javascript console and i’ve not error in Query Monitor

Viewing 15 posts - 16 through 30 (of 32 total)

You must be logged in to reply to this topic.