Forum Replies Created

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

    (@laurentangeli)

    Thanks for your work. Every thing is fine now with 32.0.12.

    Thread Starter LaurentAngeli

    (@laurentangeli)

    Hi @patchh

    Didn’t found a solution…

    Yes, Yoast SEO is installed and as you said, when disabled, saving is working.

    Laurent

    Thread Starter LaurentAngeli

    (@laurentangeli)

    Well, there was another error on pricing selector.
    Add brackets [] around ‘pricing’.
    here is the final code which work.

    o={
    "price-from":i.querySelector("[name*='price-from']").value,
    "price-to":i.querySelector("[name*='price-to']").value,
    "weight-from":i.querySelector("[name*='weight-from']").value,
    "weight-to":i.querySelector("[name*='weight-to']").value,
    "shipping-class":Array.apply(null,i.querySelector("[name*='shipping-class']").options).filter(function(e){return e.selected}).map(function(e){return e.value}),
    "parcel-point-network":Array.apply(null,i.querySelector("[name*='parcel-point-network']").options).filter(function(e){return e.selected}).map(function(e){return e.value}),
    pricing:i.querySelector("[name*='[\"pricing\"]']").value,
    "flat-rate":i.querySelector("[name*='flat-rate']").value
    };
    Thread Starter LaurentAngeli

    (@laurentangeli)

    EDIT : Humm, my code don’t work… Flat-rate is not recorded anymore !

    Be careful, i have missed 2 bracket in the previous code…
    Here is the good one :

                o = {
                  "price-from": i.querySelector("[name*='price-from']").value,
                  "price-to": i.querySelector("[name*='price-to']").value,
                  "weight-from": i.querySelector("[name*='weight-from']").value,
                  "weight-to": i.querySelector("[name*='weight-to']").value,
                  "shipping-class": Array.apply(null, i.querySelector("[name*='shipping-class']").options).filter(function(e) {
                    return e.selected
                  }).map(function(e) {
                    return e.value
                  }),
                  "parcel-point-network": Array.apply(null, i.querySelector("[name*='parcel-point-network']").options).filter(function(e) {
                    return e.selected
                  }).map(function(e) {
                    return e.value
                  }),
                  pricing: i.querySelector("[name*='pricing']").value,
                  "flat-rate": i.querySelector("[name*='flat-rate']").value
                };
    • This reply was modified 5 years, 8 months ago by LaurentAngeli.
    Thread Starter LaurentAngeli

    (@laurentangeli)

    Well, Boxtal doesn’t seem interested by this bug…
    Looking at js code (thx @yohanndev) i can tell that those selector are more complicated than necessary.
    There is no need to access td with complete name, taking just td which contains price-from or price-to… is enough to get the value.

    So in instruction beginning in line 57, i have replaced every selector from
    querySelector("[name='pricing-items[" + r + ']["price-from"]\']')
    to
    querySelector("[name*='price-from']")
    Like that we don’t care if row have number 0 or 1 or 2 inside its name.

    I give you the whole line 57 to replace :

    o = {
                  "price-from": i.querySelector("[name*='price-from']").value,
                  "price-to": i.querySelector("[name*='price-to']").value,
                  "weight-from": i.querySelector("[name*='weight-from']").value,
                  "weight-to": i.querySelector("[name*='weight-to']").value,
                  "shipping-class": Array.apply(null, i.querySelector("[name*='shipping-class']").options).filter(function(e) {
                    return e.selected
                  }).map(function(e) {
                    return e.value
                  }),
                  "parcel-point-network": Array.apply(null, i.querySelector("[name*='parcel-point-network']").options).filter(function(e) {
                    return e.selected
                  }).map(function(e) {
                    return e.value
                  }),
                  pricing: i.querySelector("[name*='pricing'").value,
                  "flat-rate": i.querySelector("[name*='flat-rate'").value
                };

    Replacing just this line is enough to make re-ordering recorded again.

    I hope that Boxtal will update the plugin fast with this code because i don’t like changes in plugin core files.

    Thread Starter LaurentAngeli

    (@laurentangeli)

    It works well !

    Backups are deleted from original folder and are not in trashcan anymore with ‘Keeps Deleted Backups in Trash’ disabled.

    Thanks again for this fast fix.
    I mark this subject resolved.

    Thread Starter LaurentAngeli

    (@laurentangeli)

    Liuta,
    Thanks for this quick reply !

    This works fine for me as i am using Google drive account only to put my Xcloner backup in it…
    This new version does the job well. I could check that trashcan is cleaned on verify connection.

    Thanks for this update.

    However, my use of Google Drive account is certainly not the use case of everyone.

    So I think that cleaning only backup files would please a lot more of users.

    I have checked Google drive library used in Xcloner Google Drive plugin and found out that GoogleDriveAdapter->delete() function is only updating setTrashed to true to delete file :
    File: xcloner-google-drive\vendor\nao-pon\flysystem-google-drive\src\GoogleDriveAdapter.php
    278: $file->setTrashed(true);
    280: if ($this->service->files->update($id, $file, $opts)) {

    Solution should be to add a new method (deleteNoTrash) using $this->service->files->delete() which delete file without trashing it.
    This new method should be called only if option ‘Really delete backups (no trashing)’ is checked…

    I hope that makes sens…

    Anyway, thanks for this new version which avoid me to delete trashcans manually.

    Kind regards

    Laurent

    My workaround wasn’t enough…
    No more php errors but can’t select HTML view when editing page or post.
    After some trys and researches, it was simpler for me to migrate to mqtranslate.
    Thanks to marinae.
    As said in this thread, migration is a feature of this fork, so nothing to do except click on a button.

    @globecore:
    I had this error when using get_the_date() function.
    In WP3.9.1, definition of get_the_date have been changed.
    return apply_filters( 'get_the_date', $the_date, $d, $post );
    instead of
    return apply_filters( 'get_the_date', $the_date, $d );

    Because of that function qtrans_dateFromPostForCurrentLanguage in qtranslate-core.php (line 459) need to be changed with adding a parameter in third position ($given_post just before $before)

    function qtrans_dateFromPostForCurrentLanguage($old_date, $format ='', $given_post = null, $before = '', $after = '') {
    	global $post;
    	return qtrans_strftime(qtrans_convertDateFormat($format), mysql2date('U',$post->post_date), $old_date, $before, $after);
    }

    This works for me.

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