Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter shopro

    (@shopro)

    @ihereira, looks like the table gets deleted at some point, most likely during the “Regenerate the product attributes lookup table” process.

    The error due to there being no primary key for the table in question comes when trying to create the table manually. Again this is due to the fact that Digitalocean’s Managed Databases have this on by default.

    Taking a quick look at the database dump from our staging site I see that every table except the wp_wc_product_attributes_lookup has a primary key defined.

    Thread Starter shopro

    (@shopro)

    Thank you for the hint.

    I was successfully able to create the missing table by using the table from our staging site.

    We are using Digitalocean Managed Databases and at first I couldn’t create the table due to the table not having a primary key defined and I had to use the code below to disable it for the session.

    SET SESSION sql_require_primary_key = 0;

    This got me thinking if the problem was due to the missing primary key in the table structure? Our staging site does not have this on by default. There were no errors on the WordPress side of things so I can’t check.

    Create Table

    
    CREATE TABLE<code>wp_wc_product_attributes_lookup</code> (
      <code>product_id</code> bigint(20) NOT NULL,
      <code>product_or_parent_id</code> bigint(20) NOT NULL,
      <code>taxonomy</code> varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
      <code>term_id</code> bigint(20) NOT NULL,
      <code>is_variation_attribute</code> tinyint(1) NOT NULL,
      <code>in_stock</code> tinyint(1) NOT NULL,
      KEY <code>product_or_parent_id_term_id</code> (<code>product_or_parent_id</code>,<code>term_id</code>),
      KEY <code>is_variation_attribute_term_id</code> (<code>is_variation_attribute</code>,<code>term_id</code>)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    

    Edit:
    Looks like after running “Regenerate the product attributes lookup table” the table is deleted.

    • This reply was modified 2 years, 11 months ago by shopro.
    • This reply was modified 2 years, 11 months ago by shopro.
    Thread Starter shopro

    (@shopro)

    Thank you for your reply.

    “Update database” made no difference or give any errors. Also there are no logs.

    I also noticed that our staging site (exact copy) which is working fine, under Status -> Tools has “Regenerate the product attributes lookup table” which our live site (the problem one) does not have. Maybe the migration didn’t run correctly when updating from 6.2 to 6.3? Is there a way to manually trigger the migration?

    Thread Starter shopro

    (@shopro)

    Hi,

    No errors while it ran or after that I could see relating to it not being successful. I do however see the following error below on the Status -> Tools page. Not a new error but I just clicked Dismiss before and forgot. Also tried running “Verify base database tables” and it made no difference.

    
     Database tables missing
    
    One or more tables required for WooCommerce to function are missing, some features may not work as expected. Missing tables: wp_wc_product_attributes_lookup.
    
    Thread Starter shopro

    (@shopro)

    I understand, was just hoping that basic WordPress + Woocommerce date sorting would have been easy. Thanks for your help.

    Thread Starter shopro

    (@shopro)

    Yea, that’s what I kinda figured that it isn’t firing at all.

    The date ordering isn’t working (Flatsome theme) at least for me out of the box. When I selected sort by newest in the search results it returns the default sorting of Woocommerce. Date sorting however works normally within Woocommerce categories.

    Is there a way to fix this dilemma? Thank you for all the help.

    Thread Starter shopro

    (@shopro)

    I think it’s empty, or at least nothing gets printed out anywhere after adding that.

    I however think that the date ordering in general is working, at least when using one of your examples.

    add_filter('relevanssi_modify_wp_query', 'rlv_asc_date');
    function rlv_asc_date($query) {
        $query->set('orderby', 'post_date');
        $query->set('order', 'ASC');
        return $query;
    }

    With that I can get the results from oldest -> newest but with that it’s also the default search overriding the Woocommerce default ordering.

    Thread Starter shopro

    (@shopro)

    This is the only code I’ve added regarding dates.

    // Sort by Date
        if (isset($date_sort)) {
    		$dates = array();
    	    	foreach ($hits[0] as $hit) {
            		$date = get_post_meta($hit->ID, 'date', true);
    	       		if (!isset($dates[$date])) $dates[$date] = array();
    			array_push($dates[$date], $hit);
    	       	}
     
                    krsort($dates);
    		
     
    	   	$sorted_hits = array();
    		foreach ($dates as $date => $year_hits) {
       	   		$sorted_hits = array_merge($sorted_hits, $year_hits);
    	    	}
    		$hits[0] = $sorted_hits;
    	}
    Thread Starter shopro

    (@shopro)

    I just took the code from one of your examples (WooCommerce popularity and price sorting) and tried adding a date ordering using the same method.

    The whole code is included on the original post and I tried changing it to the code you provided but it doesn’t seem to work.

    Thanks.

    I ran into an issue when updating to the latest that my Woocommerce products page (admin side) loads to a blank page. Disabling WP Category Permalink fixes the issue. Other stuff works good. ??

    Thread Starter shopro

    (@shopro)

    Thank you for the reply.

    I already tested the div with same dimension and it works kinda, the problem I have with that method is that when the page is loading the div and the slider are both shown until (at least when using the slider callbacks) beforeStart : function() {$(".testholder").hide()}, it gets hidden.

    Glad you have added this question to your to-do. Out of curiosity, is there any ETA when this might be released? Just thinking if I should focus energy on this or simply wait for the proper release?

    Is there a way to turn this feature off? I mean to hide the icon + link?

    Thread Starter shopro

    (@shopro)

    Sent info, thanks.

    Thread Starter shopro

    (@shopro)

    Yes that is possible. What’s the best way to send the login information?

    I could be wrong but try turning on the Don’t cache pages with GET parameters. (?x=y at the end of a url) under Advanced section, this should prevent the cart being cached.

Viewing 15 replies - 1 through 15 (of 22 total)