Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter teamcoltra

    (@teamcoltra)

    The reason the forum best practices say that is because the person might not have exactly the same issue. This is an identical issue and I’m glad they wrote in this thread because it really highlights the importance of this being fixed. Regardless of the intention, it is a bug.

    Thread Starter teamcoltra

    (@teamcoltra)

    I finally got a chance to sit down and look at this. I don’t think the reference you made contains the part that actually deletes the variations. Unless I’m mistaken.

    I believe it takes place here: https://github.com/woocommerce/woocommerce/blob/a32e1a3922660c28e9048241f27e68649f5b2926/plugins/woocommerce/includes/class-wc-post-data.php#L137

    I believe I can actually fix this with the code:

    add_filter( 'woocommerce_delete_variations_on_product_type_change', '__return_false' );

    and that should fix my problem. I’ll update this post if I had to make other changes or get stuck.

    Here is my contention: This doesn’t feel like it should be the default behavior. Deleting content without the user knowingly expecting to delete content feels bad to me. If a person fills in a bunch of details on hundreds of different variations, then goes to test to see what the product would look like in “Simple Product” there is no indication or warning or anything that would make the user expect that they shouldn’t do that and all their variations will be deleted.

    With as much random junk gets added to a database in a wordpress installation (spam, etc) the small number of variable products that get changed to single products on purpose feels like such a small niche that wouldn’t create that much junk vs the risk of something bad happening to someone’s data if they make a mistake.

    I’m empathetic to the desire to have a clean database though and perhaps this should be fixed in Javascript with a “would you like to delete your variations?” on change.

    Thread Starter teamcoltra

    (@teamcoltra)

    Thanks for replying, now I am the one not getting notifications but thought I would check in on this anyway. Glad to have caught you.

    I’m hoping to have some time to sit down with the code and help with the changes. However, my suggestion with a cursory glance is:

    in the display_location_post function starting on line 414 in geolocation.php

    $latitude = get_post_meta( $post->ID, ‘geo_latitude’, true );
    $longitude = get_post_meta( $post->ID, ‘geo_longitude’, true );

    TRUE could be changed to false.

    Then just update_post_meta or add_post_meta with all the locations. A few loops to do each geo_latitude and geo_longitude and you should be good. The keys will always match up.

    Again, I don’t expect you to do this for me if I’m the only one wanting it and I’ll have to look at the code myself at some point perhaps it’s more complicated than I was expecting.

    None the less I appreciate your attention.

    Thread Starter teamcoltra

    (@teamcoltra)

    For the record I setup a free shipping where it should give free shipping if the total cart amount is greater than 0 and the cart amount is greater than zero so I figured this is a pretty basic test

    Thread Starter teamcoltra

    (@teamcoltra)

    Sorry I have your pro plugin, but I cannot find the zendesk that is referred to nor the chatbox

    Thread Starter teamcoltra

    (@teamcoltra)

    Nevermind while Romantica caused the last one… this seems to not have any special characters at all but still triggering.

    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 wp_posts AS posts WHERE ((post_modified = %s AND ID > %d) OR (post_modified > %s)) AND ( post_status IN (‘publish’) AND ( post_type = ‘book’ ) ) ORDER BY post_modified ASC, ID ASC LIMIT 1</b><br><br>Last post date:<br><b>2018-01-20 14:08:43</b><br><br>Last post ID:<br><b>84360</b><br><br>Post to be sent:<br><b>{ “id”: 84361, “PID”: 84361, “title”: “White is the coldest colour: A dark psychological suspense thriller”, “post_status_s”: “publish”, “content”: ” John Nicholl. 3261513177. . english. 4800-02-01T14:30:43Z”, “author”: “teamcoltra”, “author_s”: “http:\/\/wordpress.ebook.bike\/author\/teamcoltra\/”, “type”: “book”, “date”: “2018-01-20T14:08:43Z”, “modified”: “2018-01-20T14:08:43Z”, “displaydate”: “2018-01-20T14:08:43Z”, “displaydate_dt”: “2018-01-20T14:08:43Z”, “displaymodified”: “2018-01-20T14:08:43Z”, “displaymodified_dt”: “2018-01-20T14:08:43Z”, “permalink”: “http:\/\/wordpress.ebook.bike\/book\/white-is-the-coldest-colour-a-dark-psychological-suspense-thriller\/”, “comments”: [], “numcomments”: 0, “categories_str”: [], “categories”: [ “John Nicholl”, “3261513177”, “”, “english”, “4800-02-01T14:30:43Z” ], “flat_hierarchy_categories_str”: [], “non_flat_hierarchy_categories_str”: [], “tags”: [], “book_author_str”: [ “John Nicholl” ], “flat_hierarchy_book_author_str”: [ “John Nicholl” ], “non_flat_hierarchy_book_author_str”: [ “John Nicholl” ], “book_id_str”: [ “3261513177” ], “flat_hierarchy_book_id_str”: [ “3261513177” ], “non_flat_hierarchy_book_id_str”: [ “3261513177” ], “book_tag_str”: [ “” ], “flat_hierarchy_book_tag_str”: [ “” ], “non_flat_hierarchy_book_tag_str”: [ “” ], “book_language_str”: [ “english” ], “book_publish_date_dt”: [ “4800-02-01T14:30:43Z” ], “book_publish_date_str”: [ “4800-02-01T14:30:43Z” ], “book_series_str”: [] }</b><br><br>{“nb_results”:0,”status”:0,”message”:”Error in one or more bulk request actions:\n\nindex: \/ebookbike\/wpsolr_types\/84361 caused failed to parse\n”,”indexing_complete”:false}

    Thread Starter teamcoltra

    (@teamcoltra)

    It appears non-english characters might be the problem I removed tag “Romántica” and it worked.

    I am super excited about this plugin, I think you will have found that a lot of people will be using your plugin.

    Do you have a file called “.maintenance” in your root web folder?
    (eg /public_html/.maintenance )

    Delete this file. This isn’t a cloudflare bug, this is wordpress when it fails to install a plugin properly.

Viewing 9 replies - 1 through 9 (of 9 total)