Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter danyloliptuha

    (@danyloliptuha)

    Please answer my questions and let me know when this issue is fixed.

    Thread Starter danyloliptuha

    (@danyloliptuha)

    @doublezed2 @carolm29 @anastas10s That is what I received in from support:

    Hey there!

    This support channel is for the paid extensions sold on WooCommerce.com. I see your question is regarding the free WooCommerce plugin.

    Our paid Premium Support offer gives you peace of mind through priority access to our personalized, dedicated support. This includes the free WooCommerce plugin and gives you monthly access to a 30-minute video call.

    Premium Support:?https://woocommerce.com/products/woocommerce-premium-support/

    If you need help with a plugin you purchased from us, or if you’ve purchased Premium Support, please let us know so we can help you further. In your response, please share the email address used for the purchase so we can connect with the correct account.

    Otherwise, you can find solutions for issues related to the core WooCommerce plugin in our core documentation?and self-service guide. We work hard to make sure that common support scenarios are covered in our documentation so that you can find the answers you need exactly when you need them, rather than waiting for a reply from us.

    Core documentation:?https://woocommerce.com/documentation/woocommerce/getting-started/
    Self-service guide:?https://woocommerce.com/document/woocommerce-self-service-guide/

    If you aren’t able to find your answers there, support for the core plugin is handled in our community forums. This allows you to get help from the WooCommerce and WordPress community in addition to our Happiness Engineers, who also monitor forum questions. WooCommerce is open-source software: asking your question there allows the community to benefit from the answers to everyone’s questions.

    Here are the links to popular forums:

    WooCommerce:?https://www.ads-software.com/support/plugin/woocommerce/?;
    WooCommerce Stripe:?https://www.ads-software.com/support/plugin/woocommerce-gateway-stripe/?;
    WooCommerce Square:?https://www.ads-software.com/support/plugin/woocommerce-square/?;
    Facebook for WooCommerce:?https://www.ads-software.com/support/plugin/facebook-for-woocommerce/

    If you haven’t created a www.ads-software.com account to use the forums, here’s how:?https://make.www.ads-software.com/contribute/join/

    So you say that I should create a ticket and they say I need to use the support forum for core WooCommerce plugin. It’s kind of confusing.

    Please, if you’ve already used your test sites to replicate the issue, then you can answer my questions above. Here I can repeat them for you:

    1. Have you opened the “Inspect tab” in your browser? Do you see the empty div element of the deleted image?
    2. Did you try to var_dump product gallery directly after image deletion using $product->get_gallery_image_ids() WITHOUT entering product edit page to find out that the deleted image id is still there?
    3. Also, you still didn’t provide the file path where you perform clearing image id from all related products after deletion as I asked you.

    And here I can repeat what my problem is:

    I’ve come even further and installed totally clean WordPress, installed WooCommerce and added couple of products. I uploaded new images in media library and then attached it to a few products. Then I deleted image and I can still see the extra image on the product page inside FlexSlider and in the thumbnails. Please see the screenshot below.

    View post on imgur.com

    Standard WordPress and Woocommerce themes just do not display these empty <img/> and <a> because they will not have any width and height in CSS, but if you open the Inspect tab you will clearly see the empty <a> tag inside flex slider and empty <img> tag inside product thumbs. The only difference that my theme has some css styles that applies some width and height to those elements. But it`s clearly the bug of WooCommerce.</p> <p>The problem is absolutely not theme-related. It`s a global bug in WooCommerce. I installed the absolutely new, clean version of WordPress and the absolutely new, clean Woocommerce, created a few products, and could still replicate the issue. Have you seen the screenshot I attached? Could you tell me exactly where WooCommerce clears deleted attachments from the product gallery? If you create a product on the standard WP Twenty-Twenty-four theme, delete it, and look in the inspect tab. You will clearly see empty tags as WooCommerce tries to render attachments by ID and fails to retrieve them as they were deleted. So it just displays the empty string inside the a and img tags. Still, the ids of deleted attachments remain inside the product gallery; they’re present in the database. WooCommerce tries to render those attachments and creates separate tags and blocks for them. That block just has zero width and height only because of CSS styles in those themes, so that bug is just hard to notice visually. But you can still look inside the source code, like I showed in my screenshot. You can still var_dump the actual product gallery attachment IDs using $product->get_gallery_image_ids() to find out that the product gallery contains attachment IDs that do not exist anymore. You can even place some CSS code to add some width and height explicitly to the product thumbnail, and you will see that there are some empty image tags in there. WooCommerce does not clear the deleted attachment IDs from products or category galleries. Please let me know when you will fix this issue that can be replicated even on a standard WP theme with clean WooCommerce installed.

    Thread Starter danyloliptuha

    (@danyloliptuha)

    @carolm29 @anastas10s I would like to keep it in here. Please assist with my issue and provide the details I asked for.

    Thread Starter danyloliptuha

    (@danyloliptuha)

    Just let me know if you can replicate the described issue and what exact steps you do for that.

    1. Have you opened the “Inspect tab” in your browser? Do you see the empty div element of the deleted image?
    2. Did you try to var_dump product gallery directly after image deletion using $product->get_gallery_image_ids() WITHOUT entering product edit page to find out that the deleted image id is still there?
    3. Also, you still didn’t provide the file path where you perform clearing image id from all related products after deletion as I asked you.
    Thread Starter danyloliptuha

    (@danyloliptuha)

    Hey, @carolm29 @anastas10s.

    I’ve already contacted WooCommerce support using this forum. Please let me know when this issue will be fixed as its global issue that can be replicated by anyone, not just me. I don`t want to create a new ticket where I must describe the exact same things I already said here. Could you please help me here on the support forum?

    Thread Starter danyloliptuha

    (@danyloliptuha)

    Please let me know when the described issue will be fixed. Thanks in advance!

    Kind regards, Danylo

    Thread Starter danyloliptuha

    (@danyloliptuha)

    Please see the screenshot attached in my previous message and read again my instructions. I do not have any plugins installed on my site except WooCommerce, I have the standard WordPress theme and I can replicate that issue any time in any environment. Please admit that it`s a bug in WooCommerce and please let me know when this will be fixed.

    Kind regards,

    Thread Starter danyloliptuha

    (@danyloliptuha)

    The problem is absolutely not theme-related. It`s a global bug in WooCommerce. I installed the absolutely new, clean version of WordPress and the absolutely new, clean Woocommerce, created a few products, and could still replicate the issue. Have you seen the screenshot I attached? Could you tell me exactly where WooCommerce clears deleted attachments from the product gallery? If you create a product on the standard WP Twenty-Twenty-four theme, delete it, and look in the inspect tab. You will clearly see empty tags as WooCommerce tries to render attachments by ID and fails to retrieve them as they were deleted. So it just displays the empty string inside the a and img tags. Still, the ids of deleted attachments remain inside the product gallery; they’re present in the database. WooCommerce tries to render those attachments and creates separate tags and blocks for them. That block just has zero width and height only because of CSS styles in those themes, so that bug is just hard to notice visually. But you can still look inside the source code, like I showed in my screenshot. You can still var_dump the actual product gallery attachment IDs using $product->get_gallery_image_ids() to find out that the product gallery contains attachment IDs that do not exist anymore. You can even place some CSS code to add some width and height explicitly to the product thumbnail, and you will see that there are some empty image tags in there. WooCommerce does not clear the deleted attachment IDs from products or category galleries. Please let me know when you will fix this issue that can be replicated even on a standard WP theme with clean WooCommerce installed.

    Thread Starter danyloliptuha

    (@danyloliptuha)

    WordPress Environment<br><br>WordPress address (URL): https://wordpress<br>Site address (URL): https://wordpress<br>WC Version: 9.1.2<br>Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.<br>Action Scheduler Version: ? 3.7.4<br>Log Directory Writable: ?<br>WP Version: 6.6<br>WP Multisite: –<br>WP Memory Limit: 2 GB<br>WP Debug Mode: –<br>WP Cron: ?<br>Language: en_US<br>External object cache: – Server Environment<br><br>Server Info: Apache<br>PHP Version: 7.4.27<br>PHP Post Max Size: 1 GB<br>PHP Time Limit: 60<br>PHP Max Input Vars: 1000<br>cURL Version: 7.70.0<br>OpenSSL/1.1.1m<br><br>SUHOSIN Installed: –<br>MySQL Version: 5.5.5-10.5.11-MariaDB-log<br>Max Upload Size: 1 GB<br>Default Timezone is UTC: ?<br>fsockopen/cURL: ?<br>SoapClient: ?<br>DOMDocument: ?<br>GZip: ?<br>Multibyte String: ?<br>Remote Post: ?<br>Remote Get: ? Database<br><br>WC Database Version: 9.1.2<br>WC Database Prefix: wp_<br>Total Database Size: 12.88MB<br>Database Data Size: 8.37MB<br>Database Index Size: 4.51MB<br>wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_actionscheduler_actions: Data: 0.17MB + Index: 0.20MB + Engine InnoDB<br>wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_actionscheduler_logs: Data: 0.14MB + Index: 0.13MB + Engine InnoDB<br>wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB<br>wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_options: Data: 5.47MB + Index: 0.06MB + Engine InnoDB<br>wp_postmeta: Data: 1.25MB + Index: 2.63MB + Engine InnoDB<br>wp_posts: Data: 0.11MB + Index: 0.06MB + Engine InnoDB<br>wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_term_relationships: Data: 0.05MB + Index: 0.02MB + Engine InnoDB<br>wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_usermeta: Data: 0.22MB + Index: 0.03MB + Engine InnoDB<br>wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB<br>wp_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_product_meta_lookup: Data: 0.08MB + Index: 0.11MB + Engine InnoDB<br>wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB Post Type Counts<br><br>attachment: 4<br>page: 7<br>post: 2<br>product: 103<br>revision: 1<br>wp_font_face: 33<br>wp_font_family: 12<br>wp_global_styles: 1<br>wp_navigation: 1 Security<br><br>Secure connection (HTTPS): ?<br>Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.<br>Hide errors from visitors: ? Active Plugins (2)<br><br>WooCommerce Shipping & Tax: by WooCommerce – 2.6.2<br>WooCommerce: by Automattic – 9.1.2 Inactive Plugins (2)<br><br>Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3.3<br>Hello Dolly: by Matt Mullenweg – 1.7.2 Settings<br><br>API Enabled: –<br>Force SSL: –<br>Currency: GBP (£)<br>Currency Position: left<br>Thousand Separator: ,<br>Decimal Separator: .<br>Number of Decimals: 2<br>Taxonomies: Product Types: external (external)<br>grouped (grouped)<br>simple (simple)<br>variable (variable)<br><br>Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)<br>exclude-from-search (exclude-from-search)<br>featured (featured)<br>outofstock (outofstock)<br>rated-1 (rated-1)<br>rated-2 (rated-2)<br>rated-3 (rated-3)<br>rated-4 (rated-4)<br>rated-5 (rated-5)<br><br>Connected to WooCommerce.com: –<br>Enforce Approved Product Download Directories: ?<br>HPOS feature enabled: ?<br>Order datastore: Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore<br>HPOS data sync enabled: – Logging<br><br>Enabled: ?<br>Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2<br>Retention period: 30 days<br>Level threshold: –<br>Log directory size: 13 B WC Pages<br><br>Shop base: #7 - /shop/<br>Cart: #8 - /cart/ - Contains the woocommerce/cart block<br>Checkout: #9 - /checkout/ - Contains the woocommerce/checkout block<br>My account: #10 - /my-account/<br>Terms and conditions: ? Page not set Theme<br><br>Name: Twenty Twenty-Four<br>Version: 1.2<br>Author URL: https://www.ads-software.com<br>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<br>WooCommerce Support: ? Not declared Templates<br><br>Overrides: – Admin<br><br>Enabled Features: activity-panels<br>analytics<br>product-block-editor<br>coupons<br>core-profiler<br>customize-store<br>customer-effort-score-tracks<br>import-products-task<br>experimental-fashion-sample-products<br>shipping-smart-defaults<br>shipping-setting-tour<br>homescreen<br>marketing<br>mobile-app-banner<br>navigation<br>onboarding<br>onboarding-tasks<br>product-custom-fields<br>remote-inbox-notifications<br>remote-free-extensions<br>payment-gateway-suggestions<br>shipping-label-banner<br>subscriptions<br>store-alerts<br>transient-notices<br>woo-mobile-welcome<br>wc-pay-promotion<br>wc-pay-welcome-page<br>launch-your-store<br><br>Disabled Features: experimental-blocks<br>minified-js<br>pattern-toolkit-full-composability<br>product-pre-publish-modal<br>printful<br>settings<br>async-product-editor-category-field<br>product-editor-template-system<br><br>Daily Cron: ? Next scheduled: 2024-07-20 08:35:55 +00:00<br>Options: ?<br>Notes: 58<br>Onboarding: completed Action Scheduler<br><br>Complete: 492<br>Oldest: 2024-07-19 08:37:16 +0000<br>Newest: 2024-07-19 08:58:00 +0000<br><br>Failed: 2<br>Oldest: 2024-07-19 08:47:13 +0000<br>Newest: 2024-07-19 08:49:32 +0000<br><br>Pending: 1<br>Oldest: 2024-07-20 08:37:16 +0000<br>Newest: 2024-07-20 08:37:16 +0000 Status report information<br><br>Generated at: 2024-07-19 09:01:08 +00:00<br>

    I’ve come even further and installed totally clean WordPress, installed WooCommerce and added couple of products. I uploaded new images in media library and then attached it to a few products. Then I deleted image and I can still see the extra image on the product page inside FlexSlider and in the thumbnails. Please see the screenshot below.

    View post on imgur.com

    Standard WordPress and Woocommerce themes just do not display these empty <img/> and <a> because they will not have any width and height in CSS, but if you open the Inspect tab you will clearly see the empty <a> tag inside flex slider and empty <img> tag inside product thumbs. The only difference that my theme has some css styles that applies some width and height to those elements. But it`s clearly the bug of WooCommerce.

    Thread Starter danyloliptuha

    (@danyloliptuha)

    Hello!

    To confirm, this is happening with different image files, correct?

    Yes

    Are they all in the same format? Which one?

    jpeg or png files

    When you added the image, did you add it on the library and then attached it to several products, or did you add it from a product edit page and then added it to other products

    I added it on the media library page.

    Please note that I’ve already tested it on the Storefront theme and with all plugins disabled, and I could still reproduce the problem.

    Best regards

    Thread Starter danyloliptuha

    (@danyloliptuha)

    Well, I can reproduce it everytime I delete the image attached to product on the 9.1.2 version. Please provide the exact file path where WooCommerce implements the sync of product images values and media library. Cause the only place I found with such a logic is in meta-box display function inside wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-product-images.php

    Thread Starter danyloliptuha

    (@danyloliptuha)

    If you enter the edit product screens like you said, then you will fire the code inside the wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-product-images.php file. It will loop through all images, check if the attachment returns an empty result, and clear those attachments. But if we only delete the image and do not enter any other pages, the attachment ID still remains inside the product gallery on $product->get_gallery_image_ids(). And I didn’t find any other places in the source code where Woocommerce clears empty attachments from the product gallery. Maybe you could share the exact file path where WooCommerce attaches some callback to the media deletion action and clears its ID from all its fields.

    Thread Starter danyloliptuha

    (@danyloliptuha)

    Also, please note that the problem persists until we enter the product edit page. As WooCommerce checks and removes empty attachments while displaying product gallery meta-boxes. But if we do not enter the single product edit page, the problem remains.

    Thread Starter danyloliptuha

    (@danyloliptuha)

    You are referring to the local pickup in the shipping zone, which is not what I want. Local pickup in block-based checkout is editable from one place and does not need to be duplicated in every shipping zone. Also, it provides the ability to choose local pickup at the top of the page without needing to provide a shipping address; local pickup in shipping zones requires a shipping address, which is absurd. So we need to have local pickup settings in our shortcode-based checkout so we can use them as we can on block-based checkout (buttons on top of the page, no need to provide a shipping address, editable from one place).

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