Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Arrow in Products of My Products list and Error on updating existing product #469

Closed
toniface opened this issue Oct 23, 2019 · 2 comments
Closed

Comments

@toniface
Copy link

Can you reproduce this issue on default Wordpress theme (eg Storefront)? I can't do this. I only have my theme

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

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

  • PHP: 7.1.32
  • WordPress: 5.2.3
  • WooCommerce: 3.7.1
  • Polylang: [state if using Polylang PRO] 2.6.5
  • Hyyan WooCommerce Polylang Integration: 1.4.3
  • Browser: Firefox 69.0.2

Steps to Reproduce

There are 2 problems:

1 - To Create 1 new product I duplicate one existing and modify
2 - When we try to edit one existing product

What I Expected

1 - I expect the new product was in the list normally

What Happened Instead

1 - The new product and almost all previous has an arrow with a link to My acount page (In the dashboard products list, not in the website)
2 - A message appears telling that are a problem and an e-mail is sended to admin e-mail. This is the text of the e-mail:

2019-10-09T15:57:01+00:00 CRITICAL Uncaught Error: Call to a member function get_id() on boolean in /usr/home/educatorium/www/wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Product/Variable.php:81
Stack trace:
#0 /usr/home/educatorium/www/wp-includes/class-wp-hook.php(286): Hyyan\WPI\Product\Variable->duplicateVariations(2903, Object(WP_Post), true)
#1 /usr/home/educatorium/www/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#2 /usr/home/educatorium/www/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#3 /usr/home/educatorium/www/wp-includes/post.php(3940): do_action('save_post_produ...', 2903, Object(WP_Post), true)
#4 /usr/home/educatorium/www/wp-includes/post.php(4028): wp_insert_post(Array, false)
#5 /usr/home/educatorium/www/wp-admin/includes/post.php(405): wp_update_post(Array)
#6 /usr/home/educatorium/www/wp-admin/post.php(218): edit_post()
#7 {main}
thrown en /usr/home/educatorium/www/wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Product/Variable.php en la línea 81

WordPress Environment

``` Copy and paste the system status report from **WooCommerce > System Status** in WordPress admin here.

`

WordPress Environment

WordPress address (URL): https://educatorium.es
Site address (URL): https://educatorium.es
WC Version: 3.7.1
REST API Version: ? 1.0.2
Log Directory Writable: ?
WP Version: 5.2.4
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ?
Language: es_ES
External object cache: –

Server Environment

Server Info: Apache
PHP Version: 7.1.32 - Recomendamos usar la versión 7.2 o superior de PHP para un mayor rendimiento y seguridad. Cómo actualizar tu versión de PHP
PHP Post Max Size: 20 MB
PHP Time Limit: 180
PHP Max Input Vars: 3000
cURL Version: 7.38.0
OpenSSL/1.0.1t

SUHOSIN Installed: –
MySQL Version: ? 5.5.62-0+deb8u1-log - Recomendamos como versión mínima de MySQL la 5.6. Ver: Requisitos de WordPress
Max Upload Size: 20 MB
Default Timezone is UTC: ?
fsockopen/cURL: ?
SoapClient: ?
DOMDocument: ?
GZip: ?
Multibyte String: ?
Remote Post: ?
Remote Get: ?

Database

WC Database Version: 3.7.1
WC Database Prefix: wp_
MaxMind GeoIP Database: ?
Tamaño total de la base de datos: 38.75MB
Tamaño de los datos de la base de datos: 32.20MB
Tamaño del índice de la base de datos: 6.55MB
wp_woocommerce_sessions: Datos: 1.52MB + Índice: 0.05MB + Motor InnoDB
wp_woocommerce_api_keys: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB
wp_woocommerce_attribute_taxonomies: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB
wp_woocommerce_downloadable_product_permissions: Datos: 0.02MB + Índice: 0.06MB + Motor InnoDB
wp_woocommerce_order_items: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB
wp_woocommerce_order_itemmeta: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB
wp_woocommerce_tax_rates: Datos: 0.02MB + Índice: 0.06MB + Motor InnoDB
wp_woocommerce_tax_rate_locations: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB
wp_woocommerce_shipping_zones: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB
wp_woocommerce_shipping_zone_locations: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB
wp_woocommerce_shipping_zone_methods: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB
wp_woocommerce_payment_tokens: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB
wp_woocommerce_payment_tokenmeta: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB
wp_woocommerce_log: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB
wp_404_to_301: Datos: 1.52MB + Índice: 0.00MB + Motor InnoDB
wp_aryo_activity_log: Datos: 1.02MB + Índice: 0.00MB + Motor InnoDB
wp_aws_cache: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB
wp_aws_index: Datos: 5.50MB + Índice: 0.00MB + Motor InnoDB
wp_commentmeta: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB
wp_comments: Datos: 0.17MB + Índice: 0.25MB + Motor InnoDB
wp_links: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB
wp_options: Datos: 4.19MB + Índice: 0.08MB + Motor InnoDB
wp_postmeta: Datos: 8.45MB + Índice: 3.81MB + Motor InnoDB
wp_posts: Datos: 6.48MB + Índice: 0.47MB + Motor InnoDB
wp_revslider_css: Datos: 0.13MB + Índice: 0.00MB + Motor InnoDB
wp_revslider_layer_animations: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB
wp_revslider_navigations: Datos: 0.03MB + Índice: 0.00MB + Motor InnoDB
wp_revslider_sliders: Datos: 0.05MB + Índice: 0.00MB + Motor InnoDB
wp_revslider_slides: Datos: 0.06MB + Índice: 0.00MB + Motor InnoDB
wp_revslider_static_slides: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB
wp_sgpb_subscribers: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB
wp_sgpb_subscription_error_log: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB
wp_smush_dir_images: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB
wp_termmeta: Datos: 0.09MB + Índice: 0.13MB + Motor InnoDB
wp_terms: Datos: 0.13MB + Índice: 0.16MB + Motor InnoDB
wp_term_relationships: Datos: 1.45MB + Índice: 0.38MB + Motor InnoDB
wp_term_taxonomy: Datos: 0.17MB + Índice: 0.16MB + Motor InnoDB
wp_usermeta: Datos: 0.05MB + Índice: 0.03MB + Motor InnoDB
wp_users: Datos: 0.02MB + Índice: 0.05MB + Motor InnoDB
wp_wcpdf_invoice_number: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB
wp_wc_admin_notes: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB
wp_wc_admin_note_actions: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB
wp_wc_category_lookup: Datos: 0.02MB + Índice: 0.00MB + Motor InnoDB
wp_wc_customer_lookup: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB
wp_wc_download_log: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB
wp_wc_order_coupon_lookup: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB
wp_wc_order_product_lookup: Datos: 0.02MB + Índice: 0.06MB + Motor InnoDB
wp_wc_order_stats: Datos: 0.02MB + Índice: 0.05MB + Motor InnoDB
wp_wc_order_tax_lookup: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB
wp_wc_product_meta_lookup: Datos: 0.11MB + Índice: 0.19MB + Motor InnoDB
wp_wc_tax_rate_classes: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB
wp_wc_webhooks: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB
wp_yith_wcwl: Datos: 0.02MB + Índice: 0.02MB + Motor InnoDB
wp_yith_wcwl_lists: Datos: 0.02MB + Índice: 0.03MB + Motor InnoDB
wp_yoast_seo_links: Datos: 0.06MB + Índice: 0.02MB + Motor InnoDB
wp_yoast_seo_meta: Datos: 0.30MB + Índice: 0.00MB + Motor InnoDB

Security

Secure connection (HTTPS): ?
Hide errors from visitors: ?

Active Plugins (36)

Polylang: por WP SYNTEX – 2.6.5
404 to 301 - Redirect, Log and Notify 404 Errors: por Joel James – 3.0.5
AddToAny Share Buttons: por AddToAny – 1.7.39
Advanced Woo Search: por ILLID – 1.83
Akismet Anti-Spam: por Automattic – 4.1.2
Registro de actividad: por Activity Log Team – 2.5.2
Editor clásico: por Colaboradores de WordPress – 1.5
Cocco CORE: por Mikado Themes – 1.2
Cocco Instagram Feed: por Mikado Themes – 1.0
Cocco Twitter Feed: por Mikado Themes – 1.0
Contact Form 7: por Takayuki Miyoshi – 5.1.4
Cookie Notice: por dFactory – 1.2.46
Duplicate Post: por Enrico Battocchi – 3.2.3
Envato Market: por Envato – 2.0.3
GA Google Analytics: por Jeff Starr – 20190902
WPBakery Page Builder: por Michael M - WPBakery.com – 5.7
Kadence WooCommerce Email Designer: por Kadence Themes – 1.3.4
Loco Translate: por Tim Whitlock – 2.3.1
Popup Builder: por Sygnoos – 3.50
Product Enquiry for WooCommerce: por WisdmLabs – 2.6.3
Really Simple CAPTCHA: por Takayuki Miyoshi – 2.0.2
Really Simple SSL: por Rogier Lankhorst
Mark Wolters – 3.2.6

Redsys WooCommerce: por Redsys – 3.0.1 – No probado con la versión activa de WooCommerce
Slider Revolution: por ThemePunch – 5.4.8.3
Video Tab For WooCommerce: por Promenade Themes – 1.0.1 – No probado con la versión activa de WooCommerce
WC - APG Campo NIF/CIF/NIE: por Art Project Group – 1.4.0.1 – No probado con la versión activa de WooCommerce
Hyyan WooCommerce Polylang Integration: por Hyyan Abo Fakher – 1.4.3 – No probado con la versión activa de WooCommerce
Variation Swatches for WooCommerce: por Emran Ahmed – 1.0.63
WooCommerce Admin: por WooCommerce – 0.20.1
WooCommerce PDF Invoices & Packing Slips: por Ewout Fernhout – 2.3.4
WooCommerce: por Automattic – 3.7.1
Yoast SEO: por Equipo Yoast – 12.3
Smush: por WPMU DEV – 3.3.0
WPS Hide Login: por WPServeur
NicolasKulka
tabrisrp – 1.5.4.2

YITH WooCommerce Quick View: por YITH – 1.3.13
YITH WooCommerce Wishlist: por YITH – 2.2.13

Inactive Plugins (1)

WooCommerce Polylang Integration: por Darko Gjorgjijoski – 1.0.3 – No probado con la versión activa de WooCommerce

Settings

API Enabled: ?
Force SSL: –
Currency: EUR (€)
Currency Position: right
Thousand Separator: .
Decimal Separator: ,
Number of Decimals: 2
Taxonomies: Product Types: 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

Base de la tienda: #6983 - /tienda/
Carrito: #3034 - /ca/cart-cat/
Finalizar compra: #3036 - /ca/checkout-cat/
Mi cuenta: #3038 - /ca/my-account-cat/
Términos y condiciones: #3323 - /ca/politica-de-devolucio/

Theme

Name: Cocco Child
Version: 1.0.0
Author URL: http://themeforest.net/user/mikado-themes
Child Theme: ?
Parent Theme Name: Cocco
Parent Theme Version: 1.4
Parent Theme Author URL: http://themeforest.net/user/mikado-themes
WooCommerce Support: ?

Templates

Archive Template: Tu tema tiene un archivo woocommerce.php
no podrás sobreescribir la plantilla personalizada woocommerce/archive-product.php ya que woocommerce.php tiene prioridad sobre archive-product.php. Esto es intencionado para prevenir problemas de visualización.

Overrides: cocco/woocommerce/content-product.php
cocco-child/woocommerce/content-single-product.php
cocco/woocommerce/global/quantity-input.php
cocco/woocommerce/product-searchform.php

Action Scheduler

Complete: 322
Oldest: 2019-09-25 17:49:59 +0200
Newest: 2019-10-23 18:18:29 +0200

Pending: 3
Oldest: 2019-10-23 19:18:29 +0200
Newest: 2019-10-30 17:18:29 +0100

Canceled: 0
Oldest: –
Newest: –

In-progress: 0
Oldest: –
Newest: –

Failed: 0
Oldest: –
Newest: –

`

</details>
@Jon007
Copy link
Contributor

Jon007 commented Oct 24, 2019

  1. this plugin does not add anything to the products dashboard so you must have an issue with a different plugin (the language columns and links are added directly by Polylang as they are the same as post and page translation, so this plugin didn't need to do anything to this screen)

try turning off some other plugins like YITH WooCommerce Quick View which might be affecting this screen

  1. this error does not happen in a normal installation.
    What product type does this occur on?

https://github.com/hyyan/woo-poly-integration/blob/master/src/Hyyan/WPI/Product/Variable.php#L81
$product->get_id() is called only after getting a product from wc_get_product

I can see the product object is not retested after:
if ($product->get_parent_id()) {
$product = wc_get_product($product->get_parent_id());
}
so perhaps wc_get_product is returning false here.
but it should also be impossible (and normally is) that the code would be called for a variation that doesn't have a valid variable product parent.
Indeed that certainly would be an error situation.

Does this happen with one particular product / product type?

Try turning off plugins which could interfere with the variation handling like Variation Swatches for WooCommerce

@Jon007
Copy link
Contributor

Jon007 commented Jun 28, 2020

closing as no further feedback received and appeared compatibility issue with other plugins

@Jon007 Jon007 closed this as completed Jun 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants