hyyan / woo-poly-integration

Looking for maintainers! - Wordpress WooCommerce Polylang Integration
https://wordpress.org/plugins-wp/woo-poly-integration/
MIT License
183 stars 66 forks source link

Polylang caused woocommerce products switching back to simple #516

Closed basecamp-online closed 3 years ago

basecamp-online commented 4 years ago

Can you reproduce this issue on default Wordpress theme (eg Storefront)?

Can you reproduce this issue when all other plugins are disabled except WooCommerce, Polylang and Hyyan WooCommerce Polylang Integration?

What product versions and settings are you using when this issue occurs?

Steps to Reproduce

  1. Open a product in the admin

What I Expected

What Happened Instead

We have a lot of Woocommerce products with variants. When we are editing them they are switching back to simple products. By trial and error we figured ou that Polylang is causing this problem.

Does someboby knows how to fix this?

WordPress Environment

` ### WordPress Environment ### WordPress address (URL): https://dehoutdraaierij.nl Site address (URL): https://dehoutdraaierij.nl WC Version: 4.5.2 REST API Version: ✔ 4.5.2 WC Blocks Version: ✔ 3.1.0 Action Scheduler Version: ✔ 3.1.6 WC Admin Version: ✔ 1.5.0 Log Directory Writable: ✔ WP Version: 5.5.1 WP Multisite: – WP Memory Limit: 2 GB WP Debug Mode: – WP Cron: ✔ Language: en_GB External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.3.22 PHP Post Max Size: 512 MB PHP Time Limit: 600 PHP Max Input Vars: 9000 cURL Version: 7.64.0 OpenSSL/1.1.1d SUHOSIN Installed: – MySQL Version: 5.5.5-10.3.23-MariaDB-0+deb10u1 Max Upload Size: 512 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 4.5.2 WC Database Prefix: 1hZySxp4_ Total Database Size: 297.21MB Database Data Size: 200.71MB Database Index Size: 96.50MB 1hZySxp4_woocommerce_sessions: Data: 5.02MB + Index: 0.08MB + Engine InnoDB 1hZySxp4_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 1hZySxp4_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB 1hZySxp4_woocommerce_order_items: Data: 1.52MB + Index: 0.52MB + Engine InnoDB 1hZySxp4_woocommerce_order_itemmeta: Data: 8.52MB + Index: 9.03MB + Engine InnoDB 1hZySxp4_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB 1hZySxp4_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 1hZySxp4_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 1hZySxp4_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 1hZySxp4_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_actionscheduler_actions: Data: 0.14MB + Index: 0.11MB + Engine InnoDB 1hZySxp4_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_actionscheduler_logs: Data: 0.13MB + Index: 0.11MB + Engine InnoDB 1hZySxp4_aelia_dismissed_messages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_aelia_exchange_rates_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_akeeba_common: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_ak_params: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_ak_profiles: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_ak_stats: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 1hZySxp4_ak_storage: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_ak_users: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 1hZySxp4_comments: Data: 5.52MB + Index: 8.05MB + Engine InnoDB 1hZySxp4_comments_fbseo: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_ewwwio_images: Data: 4.52MB + Index: 3.17MB + Engine InnoDB 1hZySxp4_ewwwio_queue: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_lrgawidget_global_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_mollie_pending_payment: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_options: Data: 10.39MB + Index: 1.42MB + Engine InnoDB 1hZySxp4_postmeta: Data: 74.41MB + Index: 44.09MB + Engine InnoDB 1hZySxp4_posts: Data: 17.20MB + Index: 3.53MB + Engine InnoDB 1hZySxp4_redirection_404: Data: 5.02MB + Index: 5.30MB + Engine InnoDB 1hZySxp4_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 1hZySxp4_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB 1hZySxp4_redirection_logs: Data: 0.05MB + Index: 0.08MB + Engine InnoDB 1hZySxp4_say_what_strings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_shiptimize: Data: 1.52MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_spbc_auth_logs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_spbc_backuped_files: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_spbc_backups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_spbc_firewall_data: Data: 2.52MB + Index: 3.03MB + Engine InnoDB 1hZySxp4_spbc_firewall_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_spbc_scan_frontend: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_spbc_scan_links_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 1hZySxp4_spbc_scan_results: Data: 6.42MB + Index: 1.52MB + Engine InnoDB 1hZySxp4_spbc_scan_signatures: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_spbc_traffic_control_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_termmeta: Data: 0.30MB + Index: 0.34MB + Engine InnoDB 1hZySxp4_terms: Data: 0.39MB + Index: 0.53MB + Engine InnoDB 1hZySxp4_term_relationships: Data: 2.45MB + Index: 1.47MB + Engine InnoDB 1hZySxp4_term_taxonomy: Data: 1.52MB + Index: 0.48MB + Engine InnoDB 1hZySxp4_tinvwl_analytics: Data: 0.19MB + Index: 0.09MB + Engine InnoDB 1hZySxp4_tinvwl_items: Data: 0.13MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_tinvwl_lists: Data: 0.11MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 1hZySxp4_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_usermeta: Data: 4.52MB + Index: 5.98MB + Engine InnoDB 1hZySxp4_users: Data: 0.23MB + Index: 0.23MB + Engine InnoDB 1hZySxp4_wcpdf_credit_note_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wcpdf_invoice_number: Data: 0.14MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wcpdf_proforma_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_wc_bookings_availability: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_wc_bookings_availabilitymeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 1hZySxp4_wc_booking_relationships: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 1hZySxp4_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wc_customer_lookup: Data: 0.34MB + Index: 0.28MB + Engine InnoDB 1hZySxp4_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 1hZySxp4_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 1hZySxp4_wc_order_product_lookup: Data: 1.52MB + Index: 1.30MB + Engine InnoDB 1hZySxp4_wc_order_stats: Data: 0.47MB + Index: 0.41MB + Engine InnoDB 1hZySxp4_wc_order_tax_lookup: Data: 0.30MB + Index: 0.27MB + Engine InnoDB 1hZySxp4_wc_product_meta_lookup: Data: 1.48MB + Index: 0.83MB + Engine InnoDB 1hZySxp4_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_wfblockediplog: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 1hZySxp4_wfconfig: Data: 1.42MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wfcrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wffilemods: Data: 26.58MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wfhits: Data: 0.48MB + Index: 0.19MB + Engine InnoDB 1hZySxp4_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_wfissues: Data: 0.23MB + Index: 0.06MB + Engine InnoDB 1hZySxp4_wfknownfilelist: Data: 8.52MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wflogins: Data: 0.05MB + Index: 0.03MB + Engine InnoDB 1hZySxp4_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wfnotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB 1hZySxp4_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 1hZySxp4_wfstatus: Data: 1.02MB + Index: 0.11MB + Engine InnoDB 1hZySxp4_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 1hZySxp4_yoast_indexable: Data: 3.52MB + Index: 2.47MB + Engine InnoDB 1hZySxp4_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 1hZySxp4_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 1hZySxp4_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 1hZySxp4_yoast_seo_links: Data: 0.23MB + Index: 0.13MB + Engine InnoDB 1hZySxp4_yoast_seo_meta: Data: 0.27MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### attachment: 1137 avia_framework_post: 12 custom_css: 1 customize_changeset: 3 ecwd_calendar: 3 ecwd_event: 5 ecwd_venue: 1 elementor_library: 1 mc4wp-form: 2 mep_events: 1 mts_notification_bar: 2 nav_menu_item: 100 oembed_cache: 72 option-tree: 1 page: 28 polylang_mo: 3 post: 8 product: 1440 product_variation: 3133 pronamic_gateway: 1 pronamic_payment: 1781 revision: 311 shop_coupon: 16 shop_order: 4677 shop_order_refund: 61 was: 75 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (32) ### Polylang: by WP SYNTEX – 2.8.2 Akeeba Backup Professional for WordPress: by Akeeba Ltd – 7.3.1 PublishPress Capabilities: by PublishPress – 1.9.12 Classic Editor: by WordPress Contributors – 1.6 Elementor Pro: by Elementor.com – 3.0.4 Elementor: by Elementor.com – 3.0.9 EWWW Image Optimizer: by Exactly WWW – 5.7.1 Invisible reCaptcha: by Mihai Chelaru – 1.2.3 Jetpack by WordPress.com: by Automattic – 8.9.1 Loco Translate: by Tim Whitlock – 2.4.3 Mollie Payments for WooCommerce: by Mollie – 5.9.0 My Custom Functions: by Space X-Chimp – 4.43 PixelYourSite: by PixelYourSite – 7.1.13 Redirection: by John Godley – 4.8 Shiptimize for WooCommerce: by Shiptimize – 3.1.2 – Installed version not tested with active version of WooCommerce 4.5.2 Shop as Client for WooCommerce: by Webdados – 1.6.4 – Installed version not tested with active version of WooCommerce 4.5.2 Simple Share Buttons Adder: by Simple Share Buttons – 8.0.1 Sucuri Security - Auditing, Malware Scanner and Hardening: by Sucuri Inc. – 1.8.24 TI WooCommerce Wishlist: by TemplateInvaders – 1.21.7 Ultimate Addons for Elementor: by Brainstorm Force – 1.27.0 Advanced Order Export For WooCommerce: by AlgolPlus – 3.1.6 Hyyan WooCommerce Polylang Integration: by Hyyan Abo Fakher – 1.4.3 – Installed version not tested with active version of WooCommerce 4.5.2 WooCommerce Advanced Shipping: by Jeroen Sormani – 1.0.14 – Installed version not tested with active version of WooCommerce 4.5.2 WooCommerce Customizer: by SkyVerge – 2.7.4 – Installed version not tested with active version of WooCommerce 4.5.2 WooCommerce EU VAT Assistant: by Aelia – 1.14.7.200904 WooCommerce PDF Invoices & Packing Slips: by Ewout Fernhout – 2.6.1 WooCommerce PDF Invoices & Packing Slips Professional: by Ewout Fernhout – 2.1.1 – Installed version not tested with active version of WooCommerce 4.5.2 WooCommerce: by Automattic – 4.5.2 Wordfence Security: by Wordfence – 7.4.11 WordPress Notification Bar: by SeedProd – 1.3.10 Yoast SEO: by Team Yoast – 14.9 – Installed version not tested with active version of WooCommerce 4.5.2 WP Notification Bars: by MyThemeShop – 1.0.5 ### Inactive Plugins (10) ### Akismet Anti-Spam: by Automattic – 4.1.6 Lara's Google Analytics: by Amr M. Ibrahim – 3.3.2 MC4WP: Mailchimp for WordPress: by ibericode – 4.8.1 Pronamic Pay: by Pronamic – 6.3.2 SEO Facebook Comments: by Fabio Zaffani – 1.5.2 WooCommerce Helper: by WooCommerce – 1.7.2 – Installed version not tested with active version of WooCommerce 4.5.2 – Network enabled WooCommerce PDF Invoices & Packing Slips to Dropbox: by Ewout Fernhout – 2.0.2 – Installed version not tested with active version of WooCommerce 4.5.2 WordPress Users & WooCommerce Customers Import Export(BASIC): by WebToffee – 1.4.4 WP Fastest Cache: by Emre Vona – 0.9.1.0 WP Fastest Cache Premium: by Emre Vona – 1.5.9 ### Dropin Plugins (1) ### maintenance.php: maintenance.php ### Must Use Plugins (1) ### akeeba-backup-coreupdate.php: by – ### Settings ### API Enabled: ✔ Force SSL: – Currency: EUR (€) Currency Position: left_space Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: booking (booking) external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – ### WC Pages ### Shop base: ❌ Page not set Basket: #90 - /winkelmand/ Checkout: #91 - /afrekenen/ My account: #92 - /mijn-account/ Terms and conditions: ❌ Page not set ### Theme ### Name: Enfold Version: 4.7.4 Author URL: https://kriesi.at Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔ ### Templates ### Overrides: – ### TI WooCommerce Wishlist Templates ### Overrides: – ### Action Scheduler ### Complete: 433 Oldest: 2020-08-28 20:30:58 +0200 Newest: 2020-09-28 13:16:40 +0200 `
Odeezl commented 4 years ago

I have the exactly the same issue.

cavalihno commented 4 years ago

Hi, me too. Have tha same issue. Every plugins are up to date and products switching back to simple without variations.

janvankuijk commented 4 years ago

For us this was the solution: https://github.com/hyyan/woo-poly-integration/issues/510#issuecomment-687156776

Sly-d commented 4 years ago

Had the same problem. I think it's caused by Hyyan WooCommerce Polylang Integration: 1.4.3.

After some digging, I found entries with meta_key set to _translation_porduct_type (instead of _translation_product_type). I corrected this typo with UPDATE wp_postmeta SET meta_key='_translation_product_type' WHERE meta_key='_translation_porduct_type';

BTW the string _translation_porduct_type can be found in wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Plugin.php I didn't dare to replace it but I guess it could definitely solve the problem.

chere-gnst commented 4 years ago

Any news on the issue? My client worked long hours to put all the variants and the inventory up to date before I've installed Hyyan WooCommerce Polylang... She's devastated...

basduchambre commented 4 years ago

@chere-gnst this has been resolved if you take the the update from 11 days ago, this commit:

https://github.com/basduchambre/woo-poly-integration/commit/5adddf24b5a3b9b680d7fa7eb1d8fcc44e8534bd#diff-7a549b7c24487b433a92ee4305b6dd33fb22ed127480df82a67a9fc1dda7f20c

edgarmirandasilva commented 4 years ago

@basecamp-online This solved your issue?

Jon007 commented 3 years ago

duplicates #512 : the switching to simple product appeared to be javascript issue on the setup of the product type selector box and does not appear to happen with latest wp and plugin versions - please advise if it does.

_translation_porduct_type is not an error, it is a setting specific to this plugin which has always been spelt that way, the change to this setting was reversed by Hyyan as breaks existing sites unless a general sql update is done. if anyone corrected that way it should definitely be reversed back using eg: UPDATE wp_postmeta SET meta_key='_translation_porduct_type' WHERE meta_key='_translation_product_type';