master
branch of WooCommerce on GithubRefer to _"You can define the filename if the image already exists in the media library."_ on https://github.com/woocommerce/woocommerce/wiki/Product-CSV-Import-Schema#csv-columns-and-formatting
Upload this image to media library (filename : 01-cat-wants-to-tell-you-laptop.jpg)
Import a product by this csv
dummy-data.csv.zip
Error show
When I follow those steps, I see...
The importer doesn't look up images in medial library by filename specified in csv. Instead, it tried to download from _"http://01-cat-wants-to-tell-you-laptop.jpg"_
I was expecting to see...
The importer must map existing image (by filename specified) with the product imported
`
### WordPress Environment ###
Home URL: http://localhost
Site URL: http://localhost
WC Version: 3.2.0
Log Directory Writable: โ
WP Version: 4.8
WP Multisite: โ
WP Memory Limit: 256 MB
WP Debug Mode: โ
WP Cron: โ
Language: en_US
### Server Environment ###
Server Info: Apache/2.2.29 (Unix) mod_wsgi/3.4 Python/2.7.8 PHP/5.6.10 mod_ssl/2.2.29 OpenSSL/0.9.8zh DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.8 Perl/v5.20.0
PHP Version: 5.6.10
PHP Post Max Size: 32 MB
PHP Time Limit: 30
PHP Max Input Vars: 1000
cURL Version: 7.41.0
OpenSSL/0.9.8zd
SUHOSIN Installed: โ
MySQL Version: โ 5.5.42 - We recommend a minimum MySQL version of 5.6. See: WordPress requirements
Max Upload Size: 32 MB
Default Timezone is UTC: โ
fsockopen/cURL: โ
SoapClient: โ
DOMDocument: โ
GZip: โ
Multibyte String: โ
Remote Post: โ wp_remote_post() failed. Contact your hosting provider. cURL error 35: Unsupported SSL protocol version
Remote Get: โ wp_remote_get() failed. Contact your hosting provider. 200
### Database ###
WC Database Version: 3.2.0
WC Database Prefix: test_
woocommerce_sessions: โ
woocommerce_api_keys: โ
woocommerce_attribute_taxonomies: โ
woocommerce_downloadable_product_permissions: โ
woocommerce_order_items: โ
woocommerce_order_itemmeta: โ
woocommerce_tax_rates: โ
woocommerce_tax_rate_locations: โ
woocommerce_shipping_zones: โ
woocommerce_shipping_zone_locations: โ
woocommerce_shipping_zone_methods: โ
woocommerce_payment_tokens: โ
woocommerce_payment_tokenmeta: โ
MaxMind GeoIP Database: โ
### Security ###
Secure connection (HTTPS): โYour store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
Hide errors from visitors: โ
### Active Plugins (12) ###
Contact Form 7: by Takayuki Miyoshi โ 4.8.1
EpicoMedia core: by EpicoMedia โ 1.0.0
Vitrine Shortcodes: by EpicoMedia โ 1.0.0
Jetpack by WordPress.com: by Automattic โ 5.1
WPBakery Visual Composer: by Michael M - WPBakery.com โ 5.2
Slider Revolution: by ThemePunch โ 5.4.3.1
MNKY | Visual Composer Pricing Boxes: by MNKY โ 1.0.1
WooCommerce Custom Product Data Fields: by Kharis Sulistiyono โ 1.2.4
WooCommerce: by Automattic โ 3.2.0-dev
WP Migrate DB: by Delicious Brains โ 0.9.2
MailPoet Newsletters: by MailPoet โ 2.7.11.3
YITH WooCommerce Wishlist: by YITHEMES โ 2.1.2
### Settings ###
API Enabled: โ
Force SSL: โ
Currency: GBP (ยฃ)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)
variable (variable-2)
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)
### WC Pages ###
Shop base: #11912 - /shop/
Cart: #11913 - /cart/
Checkout: #11914 - /checkout/
My account: #14 - /my-account/
Terms and conditions: โ Page not set
### Theme ###
Name: Twenty Seventeen
Version: 1.3
Author URL: https://wordpress.org/
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: โ
`
Digging into the code the method WC_Product_Importer::get_attachment_id_from_url
requires the full URL to the image, even if it's already been uploaded to the media library. All images are also run through the esc_url_raw
function that will always append a protocol to the string.
01-cat-wants-to-tell-you-laptop.jpg
should be a fully qualified URL and not just the filename and _will_ be converted to a URL on upload.
https://example.com/2017/08/01-cat-wants-to-tell-you-laptop.jpg
would work in this case.
I don't know what the devs were planning here, but I reckon this might be just a lack of proper documentation?
hi
am having same problem
although the images link is working but am getting this error " Error getting remote image "
Most helpful comment
hi
am having same problem
although the images link is working but am getting this error " Error getting remote image "