• Above link is the production site but I can reproduced it with all of these conditions:

    • accessed with Chrome or Safari (any other?). Firefox works.
    • switched to English with TranslatePress. Default language Spanish works.
    • WP, WC, TranslatePress, Product Attachment for WooCommerce with 2021 theme

    To not discriminate between plug-ins and point the blaming finger I will post this also as an issue for TranslatePress in the hope it it will facilitate collaboration.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Hitendra Chopda

    (@hitendra-chopda)

    Hello Erniecom,

    Thanks for reaching out to us and apologies for the inconvenience.

    Okay, we are looking for the plugin compatibility with TranslatePress and update it in the feature release.

    Best Regards,
    Hitendra & Dotstore Team

    Thread Starter erniecom

    (@erniecom)

    Was this already fixed in ver. 2.0.0 ? I ask because I did not see it yet listed in the changelog.

    Thread Starter erniecom

    (@erniecom)

    An update that this issue seems still unfixed for version 2.1.1 and TranslatePress 2.1.9

    A work around is to use Javascript to change the link to always be the default language URL. In my case that is Spanish. The script changes /en/ to /es/ and it then will work correctly.

    jQuery(function($){
      // still needed for incompatibility between TranslatePress 2.1.9 and WooCommerce Product Attachment 2.1.1
      $("a.wcpoa_attachmentbtn").each(function(){
         var newUrl = $(this).attr('href').replace('/en/', '/es/');
         $(this).attr('href', newUrl);
      });
    });
    Thread Starter erniecom

    (@erniecom)

    The above work around is still valid but will not avoid certain error messages when search engine crawlers visit the site and try to follow the attachments links. Now Translate Press protests about this links because when accessed from the translated product (in my case English from original language Spanish) then at /wp-admin/admin.php?page=trp_error_manager you find a list of the last 5 errors this incompatibility bug is causing. Since they are all the same I give you just one example:

    last_error 	WordPress database error: Could not perform query because it contains invalid data.
    disable_automatic_translations 	Yes
    url 	https://foto-r3.com/en/product/kodak-gold-200-35mm-36-expo-c-41-x3-triple-pack/?attachment_id=21866&download_file=weyou8sugw96q
    details 	Error running get_untranslated_strings()
    date_time 	2022-02-06 22:33:36
    timestamp 	1644186816

    Please note that we now have a clue where this error might be taking place.

    Thread Starter erniecom

    (@erniecom)

    I think version 2.0.0 was a feature release (I see “new” in changelog). The issue is still there and I provided some extra information including a work around for others that might experience the same problem. Shop owner is however worried when error message keep showing up (see previous post). I therefore felt free to set it to “not resolved” again.

    Thread Starter erniecom

    (@erniecom)

    Just checked that version 2.2.1 in combination with WooCommerce Product Attachment version 2.1.2 still show the same issue here described. My JS work around is still valid.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Corrupted PDF with Safari/Chrome and TranslatePress non-default language’ is closed to new replies.