Product attachments will not download and show as failed download
-
Steps to reproduce:
browse to https://systemsenvironmental.com/product/100-gallon-pco-poly-tank/ , select the “Product Documents” tab, and click the “Download” button.
Or
Direct download link: https://systemsenvironmental.com/product/100-gallon-pco-poly-tank/?attachment_id=9779&download_file=5d9a63ca7b3cf
Error:
Hmmm… can’t reach this page looks like the webpage at https://systemsenvironmental.com/product/100-gallon-pco-poly-tank/?attachment_id=9779&download_file=5d9a63ca7b3cf might be having issues, or it may have moved permanently to a new web address.
ERR_HTTP2_PROTOCOL_ERRORThe page I need help with: [log in to see the link]
-
### WordPress Environment ### WordPress address (URL): https://systemsenvironmental.com Site address (URL): https://systemsenvironmental.com WC Version: 4.9.1 REST API Version: ? 4.9.1 WC Blocks Version: ? 4.0.0 Action Scheduler Version: ? 3.1.6 WC Admin Version: ? 1.8.3 Log Directory Writable: ? WP Version: 5.6 WP Multisite: – WP Memory Limit: 2 GB WP Debug Mode: – WP Cron: – Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.3.25 PHP Post Max Size: 2 GB PHP Time Limit: 300 PHP Max Input Vars: 16384 cURL Version: 7.29.0 NSS/3.53.1 SUHOSIN Installed: – MySQL Version: 5.5.5-10.2.35-MariaDB Max Upload Size: 2 GB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 4.9.1 WC Database Prefix: wp_ Total Database Size: 59.53MB Database Data Size: 47.45MB Database Index Size: 12.08MB wp_woocommerce_sessions: Data: 7.02MB + Index: 0.16MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.14MB + Index: 0.14MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 2.02MB + Index: 0.48MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 0.38MB + Index: 0.30MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.11MB + Index: 0.09MB + Engine InnoDB wp_failed_jobs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailchimp_carts: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_mailchimp_jobs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_options: Data: 4.50MB + Index: 0.17MB + Engine InnoDB wp_postmeta: Data: 20.55MB + Index: 7.00MB + Engine InnoDB wp_posts: Data: 6.52MB + Index: 0.70MB + Engine InnoDB wp_queue: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_redirection_404: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_revslider_css: Data: 0.13MB + Index: 0.00MB + Engine InnoDB wp_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_sliders: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_revslider_slides: Data: 0.28MB + Index: 0.00MB + Engine InnoDB wp_revslider_static_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_termmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.13MB + Index: 0.09MB + Engine InnoDB wp_term_taxonomy: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 0.25MB + Index: 0.19MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.13MB + Index: 0.17MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_per_product_shipping_rules: Data: 0.20MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_table_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wapo_groups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wapo_types: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wccl_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcwl: Data: 0.09MB + Index: 0.02MB + Engine InnoDB wp_yith_wcwl_lists: Data: 0.13MB + Index: 0.11MB + Engine InnoDB wp_yoast_indexable: Data: 3.52MB + Index: 1.11MB + Engine InnoDB wp_yoast_indexable_hierarchy: Data: 0.06MB + Index: 0.08MB + Engine InnoDB wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_yoast_seo_links: Data: 0.20MB + Index: 0.14MB + Engine InnoDB wp_yoast_seo_meta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### attachment: 2503 ct_template: 7 custom_css: 2 mc4wp-form: 1 nav_menu_item: 154 oembed_cache: 12 page: 25 post: 6 postman_sent_mail: 250 product: 908 revision: 567 shop_coupon: 1 shop_order: 54 static_block: 6 wc_conditional_fee: 1 wpcf7_contact_form: 5 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (24) ### Redux: by Redux.io + Dovy Paukstys – 4.1.24 Add From Server: by Dion Hulse – 3.4.5 Adminimize: by Frank Bültge – 1.11.7 Cache Enabler: by KeyCDN – 1.6.2 Contact Form 7: by Takayuki Miyoshi – 5.3.2 Electro Extensions: by MadrasThemes – 2.3.3 – Installed version not tested with active version of WooCommerce 4.0 Enable jQuery Migrate Helper: by The WordPress Team – 1.3.0 Flexible Shipping UPS: by WP Desk – 1.11.0 WPBakery Page Builder: by Michael M - WPBakery.com – 6.0.3 Mailchimp for WooCommerce: by Mailchimp – 2.5.0 MC4WP: Mailchimp for WordPress: by ibericode – 4.8.3 Post SMTP: by Yehuda Hassine – 2.0.19 Slider Revolution: by ThemePunch – 5.4.8.3 Search By SKU - for Woocommerce: by Unroll Digital – 0.7.1 Shipper Pro: by WPMU DEV – 1.2.4 Sucuri Security - Auditing, Malware Scanner and Hardening: by Sucuri Inc. – 1.8.25 WooCommerce Product Attachment: by theDotstore – 1.7 WooCommerce Stripe Gateway: by WooCommerce – 4.7.0 WooCommerce Price Based on Country (Basic): by Oscar Gare – 2.0.14 WooCommerce: by Automattic – 4.9.1 (update to version 4.9.2 is available) Yoast SEO: by Team Yoast – 15.6.2 WP Force SSL: by WebFactory Ltd – 1.56 WPMU DEV Dashboard: by WPMU DEV – 4.10.6 YITH WooCommerce Wishlist: by YITH – 3.0.18 ### Inactive Plugins (9) ### Automated FedEx Shipping: by HITShipo – 2.5.13 CDN Enabler: by KeyCDN – 1.0.9 Disable Comments: by WPDeveloper – 2.0.2 Disable Real MIME Check: by Sergey Biryukov – 1.0 FedEx WooCommerce Extension (BASIC): by PluginHive – 2.1.5 – Installed version not tested with active version of WooCommerce 4.0 Flexible Shipping For FedEx: by WP Desk – 1.5.3 Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.4 Thumbnail Cleaner: by Kolja Nolte – 1.4.2 WooCommerce Price Based on Country Pro Add-on: by Oscar Gare – 2.8.7 ### Dropin Plugins (2) ### advanced-cache.php: advanced-cache.php fatal-error-handler.php: fatal-error-handler.php ### Must Use Plugins (2) ### Disable Environment Indicator: by Nexcess – 1.0 Nexcess Managed Apps: by Nexcess – 1.15.1 ### Settings ### API Enabled: ? Force SSL: – Currency: CAD ($) Currency Position: left 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 ### Shop base: #3853 - /shop/ Cart: #3134 - /cart/ Checkout: #3135 - /checkout/ My account: #3854 - /my-account/ Terms and conditions: #2183 - /terms-and-conditions/ ### Theme ### Name: Electro Child Version: 2.3.3 Author URL: https://madrasthemes.com/ Child Theme: ? Parent Theme Name: Electro Parent Theme Version: 2.7.1 Parent Theme Author URL: https://madrasthemes.com/ WooCommerce Support: ? ### Templates ### Overrides: electro/woocommerce/archive-product.php electro-child/woocommerce/emails/customer-invoice.php electro/woocommerce/global/quantity-input.php ### Geolocation debug info ### Default customer location: geolocation MaxMind GeoIP database: ? MaxMind GeoIP license: ? MM_COUNTRY_CODE: ? GEOIP_COUNTRY_CODE: US HTTP_CF_IPCOUNTRY: ? HTTP_X_COUNTRY_CODE: ? HTTP_X_REAL_IP: ? HTTP_X_FORWARDED_FOR: 67.2.63.229 REMOTE_ADDR: 67.2.63.229 Real external IP: 67.2.63.229 WCPBC_USE_REMOTE_ADDR: – Geolocation Test: ? ### PBC Settings ### Version: 2.0.14 Base location: CA:ON Base currency: CAD Price Based On: shipping Shipping: – Test mode: – Test country: – Load products price in background: – Prices entered with tax: – Calculate tax based on: shipping Display prices in the shop: excl ### Zone Pricing Canada ### zone_id: canada name: Canada countries: CA currency: CAD exchange_rate: 1 auto_exchange_rate: yes disable_tax_adjustment: no exchange_rate_fee: 0 round_nearest: currency_format: [symbol][price] CAD price_thousand_sep: , price_decimal_sep: . price_num_decimals: 2 ### Zone Pricing United States ### zone_id: united-states name: United States countries: US currency: USD exchange_rate: 0.785087 auto_exchange_rate: yes disable_tax_adjustment: no exchange_rate_fee: 0 round_nearest: currency_format: [symbol][price] USD price_thousand_sep: , price_decimal_sep: . price_num_decimals: 2 ### Action Scheduler ### Complete: 1,659 Oldest: 2020-12-27 21:20:39 +0000 Newest: 2021-01-27 20:00:08 +0000 Pending: 2 Oldest: 2021-01-27 21:00:08 +0000 Newest: 2021-01-27 21:00:08 +0000
Hello there,
Thanks for contacting us.
I have reviewed your query that you are getting some issues while downloading the attachment files.
This is your site specific issue due to theme conflict or other plugin conflict or might due to attachment permission issue.
Can you please try the below mentioned step to check if there is any issue related to the permission or blocking by browser or not?
Click here to review the link to follow the steps.
Please also make sure that uploaded attachments have full permission to download.
Best Regards,
Hitendra & Dotstore teamHello, I am working on this issue as well. I have been able to replicate the website in a different environment, and the download functions properly without the need to disable the theme or plugins. You can see it in action at:
https://dev.thinkrmedia.com/systems/product/100-gallon-pco-poly-tank/I have tried going the route of disabling theme and plugins to troubleshoot, in the staging environment provided for the original website. It’s available at
https://3f9027e66e.nxcli.net/product/seaflo-diaphragm-pump-5-0-gpm-60-psi-4/Is there still a possibility it could be a theme/plugin conflict? It works fine with everything active at the first URL I posted, but with only the bare minimum activated on the second URL, it doesn’t work.
I’ve also tested this in Edge and Firefox with identical results.
Looks like the issue is related to.
Correctly close all nested output buffers before writing the file.
while (ob_get_level() > 0) { ob_end_clean(); }
- This reply was modified 3 years, 9 months ago by Luke Cavanagh. Reason: clarify wording
To expand on the above, the exact issue we have been seeing is related to KeyCDN’s cache-enabler plugin combined with any other plugin/theme that opens an output buffer (ob_start). In this situation cache-enabler creates a nested output buffer (ob_get_level() >= 2), with the cache-enabler output buffer using a callback.
While woo-product-attachments does call ob_flush while writing the file to the browser, this would only write to the browser if ob_get_level == 1. If there are two output buffers open the plugin may still work — but if one of the output buffers has a callback defined (eg, cache-enabler), then the ob_flush would only write to cache-enabler’s output buffer. At that point it’s up to the callback in the other plugin to determine if/how/when to write the file to the browser.
I believe a decent solution to solve this would be to close all output buffers prior to writing the file. eg, add this line above the headers() calls in woo-product-attachment/public/class-woocommerce-product-attachment-public.php:
while (ob_get_level() > 0) { ob_end_clean(); }
At the very least this resolves the compatibility issues with cache-enabler.
— alexis
Hello there,
Thank you for providing the details about the issue which is coming with appropriate solutions.
We will review and apply all above ways of solution and implement best which will work for us.
Thank you,
Hitendra & Dotstore Team
- The topic ‘Product attachments will not download and show as failed download’ is closed to new replies.