Ошибка дистанционного получения изображения woocommerce

В общем проблема такая, есть файл импорта товаров, при импорте высвечивается ошибка

Ошибка дистанционного получения изображения https://santech.ru/data/thumbs/w500h800Nfltr_wmi/c… Ошибка: cURL error 60: SSL certificate problem: unable to get local issuer certificate

Как такое лечить ? Из-за этой ошибки ни один товар не могу импортировать в woocommerce, может плагин какой есть для wp решающий проблему или в конфиг чего добавить, интернет пропокопал, по woo ничего дельного нет

Support » Plugin: WooCommerce » Error getting remote image, Error: Forbidden

  • Hi, I am trying to import bulk external products but getting “Error getting remote image, Error: Forbidden” error.

    I also contacted the hosting provider, as per them there is no issue at their end, they made some changes at hosting but still the same problem

    download product csv here.

Viewing 6 replies — 1 through 6 (of 6 total)

  • Plugin Support
    Rynald0s.a11n

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @mymobile!

    This error message indicates that the particular images are either not present on the server, or it’s not publicly accessible. If it’s the latter, then it might be caused by a conflict with your theme or another plugin, especially if you are following the correct steps as outlined in the documentation here:

    https://docs.woocommerce.com/document/product-csv-importer-exporter/#section-3

    With that said, my recommendation at this time would be to temporarily switch to a default WordPress theme, like Storefront, followed by disabling all your plugins except for WooCommerce core, and then running the import once again, to see if that resolves the issue.

    We have some documentation on the conflict testing procedure here:

    https://docs.woocommerce.com/document/how-to-test-for-conflicts/`

    Cheers!

    Hi @rynald0s,

    I did all you suggested but still the same problem, images are available on the remote server.
    It’s working using wp all import plugin, all images are being uploaded. Please advise what next I can do.

    Plugin Support
    Con a11n

    (@conschneider)

    Automattic Happiness Engineer

    Hi there,

    I did all you suggested but still the same problem, images are available on the remote server.

    Ok, thanks for trying. Let’s try together then. I just tried downloading your CSV to no avail: https://d.pr/i/NGHAPz

    Could you post it again? We ll try a quick test import.

    Kind regards,

    Hi,

    Thanks for reply,

    Sorry, that csv deleted accidentally from server, you can download here.

    Every time I try to import, it imports 5 – 10 new products in every try and skips all others.

    Plugin Support
    Mirko P.

    (@rainfallnixfig)

    Hi @mymobile,

    Thanks for sharing your csv file with us.

    I looked at the csv and the formatting follows the csv general guidelines, except this part:


    Link to image: https://i.imgur.com/SO3vo4z.png

    Title should be “Name” according to the CSV columns and formatting:

    https://github.com/woocommerce/woocommerce/wiki/Product-CSV-Import-Schema#csv-columns-and-formatting

    but it’s still giving an error getting the remote image.

    That error would be normally server-related or could be something on your site itself that is blocking the request.

    Could you please share a copy of your site’s System Status for further checks? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.

    Thanks!

    Plugin Support
    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 6 replies — 1 through 6 (of 6 total)

  • The topic ‘Error getting remote image, Error: Forbidden’ is closed to new replies.

Support » Plugin: WooCommerce » Error getting remote image, Error: Forbidden

  • Hi, I am trying to import bulk external products but getting “Error getting remote image, Error: Forbidden” error.

    I also contacted the hosting provider, as per them there is no issue at their end, they made some changes at hosting but still the same problem

    download product csv here.

Viewing 6 replies — 1 through 6 (of 6 total)

  • Plugin Support
    Rynald0s.a11n

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @mymobile!

    This error message indicates that the particular images are either not present on the server, or it’s not publicly accessible. If it’s the latter, then it might be caused by a conflict with your theme or another plugin, especially if you are following the correct steps as outlined in the documentation here:

    https://docs.woocommerce.com/document/product-csv-importer-exporter/#section-3

    With that said, my recommendation at this time would be to temporarily switch to a default WordPress theme, like Storefront, followed by disabling all your plugins except for WooCommerce core, and then running the import once again, to see if that resolves the issue.

    We have some documentation on the conflict testing procedure here:

    https://docs.woocommerce.com/document/how-to-test-for-conflicts/`

    Cheers!

    Hi @rynald0s,

    I did all you suggested but still the same problem, images are available on the remote server.
    It’s working using wp all import plugin, all images are being uploaded. Please advise what next I can do.

    Plugin Support
    Con a11n

    (@conschneider)

    Automattic Happiness Engineer

    Hi there,

    I did all you suggested but still the same problem, images are available on the remote server.

    Ok, thanks for trying. Let’s try together then. I just tried downloading your CSV to no avail: https://d.pr/i/NGHAPz

    Could you post it again? We ll try a quick test import.

    Kind regards,

    Hi,

    Thanks for reply,

    Sorry, that csv deleted accidentally from server, you can download here.

    Every time I try to import, it imports 5 – 10 new products in every try and skips all others.

    Plugin Support
    Mirko P.

    (@rainfallnixfig)

    Hi @mymobile,

    Thanks for sharing your csv file with us.

    I looked at the csv and the formatting follows the csv general guidelines, except this part:


    Link to image: https://i.imgur.com/SO3vo4z.png

    Title should be “Name” according to the CSV columns and formatting:

    https://github.com/woocommerce/woocommerce/wiki/Product-CSV-Import-Schema#csv-columns-and-formatting

    but it’s still giving an error getting the remote image.

    That error would be normally server-related or could be something on your site itself that is blocking the request.

    Could you please share a copy of your site’s System Status for further checks? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.

    Thanks!

    Plugin Support
    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 6 replies — 1 through 6 (of 6 total)

  • The topic ‘Error getting remote image, Error: Forbidden’ is closed to new replies.

Здравствуйте, друзья !

Столкнулся с такой проблемой. Два совершенно разных проекта, но очень похожая картинка. Все нижеописанные сайты живут на BrainyCP на своем сервере и в общем то поддаются настройкам. Все проекты на wordpress+woocommerce. Все «живут» в рамках одного хост-аккаунта BrainyCP.

Ситуация один — имеется плагин WooCommerce to WooCommerce Product Synchronization Via API — который, соответственно, способен достаточно в комфортном виде синхронизировать товары с одного магазина на другой/другие. И прекрасно он работал, но в какой то момент (подробности что обновлялось/менялось на программном уровне, к сожалению упущен), но в данный момент при попытке синхронизации выдает следующее:
[29/Sep/2021:12:25:28] (edit) Array
[29/Sep/2021:12:25:28] (edit) Error: Ошибка дистанционного получения изображения https://eco-d-eco.ru/wp-content/uploads … 100_56.jpg. Ошибка: Предоставлен неверный URL. [woocommerce_product_image_upload_error]{«code»:»woocommerce_product_image_upload_error»,»message»:»u041eu0448u0438u0431u043au0430 u0434u0438u0441u0442u0430u043du0446u0438u043eu043du043du043eu0433u043e u043fu043eu043bu0443u0447u0435u043du0438u044f u0438u0437u043eu0431u0440u0430u0436u0435u043du0438u044f https://eco-d-eco.ru/wp-content/uploads/2021/08/cashpo_100_100_56.jpg. u041eu0448u0438u0431u043au0430: u041fu0440u0435u0434u043eu0441u0442u0430u0432u043bu0435u043d u043du0435u0432u0435u0440u043du044bu0439 URL.»,»data»:{«status»:400}}
[29/Sep/2021:12:25:39] (edit) Array
[29/Sep/2021:12:25:39] (edit) Error: Ошибка дистанционного получения изображения https://eco-d-eco.ru/wp-content/uploads … 115_28.jpg. Ошибка: Предоставлен неверный URL. [woocommerce_product_image_upload_error]{«code»:»woocommerce_product_image_upload_error»,»message»:»u041eu0448u0438u0431u043au0430 u0434u0438u0441u0442u0430u043du0446u0438u043eu043du043du043eu0433u043e u043fu043eu043bu0443u0447u0435u043du0438u044f u0438u0437u043eu0431u0440u0430u0436u0435u043du0438u044f https://eco-d-eco.ru/wp-content/uploads/2021/08/cashpo_100_115_28.jpg. u041eu0448u0438u0431u043au0430: u041fu0440u0435u0434u043eu0441u0442u0430u0432u043bu0435u043d u043du0435u0432u0435u0440u043du044bu0439 URL.»,»data»:{«status»:400}}

В итоге — на дочернем сайте обновляется инфа/цена, фото не обновляется. Новые товары не переносятся совсем…

Аналогичная картина на второй связке. Там все попроще. CSV импорт. с одного сайта экспорт товара, на другой — импорт, расписываем какие поля куда. Нажимаем импорт — и получаем очень похожую картину:

Ошибка дистанционного получения изображения https://biolan-eco.ru/wp-content/upload … arette.jpg. Ошибка: Предоставлен неверный URL.
Ошибка дистанционного получения изображения https://biolan-eco.ru/wp-content/upload … et_eco.jpg. Ошибка: Предоставлен неверный URL.

Ну и так далее… В общем импорт не работает. Если вычитаем из уравнения ссылки на картинки товаров на другом сайте — всё работает…

Вот такая вот проблема…

И еще, внимание, тож не смог мирным путем победить. Если сайт работает на php7.4 — то при импорте во второй ситуации выскакивает — «Извините, этот тип файла недопустим по соображениям безопасности.»… Всяческие unfiltered upload в wp-config никак не помогают. Помогло только переключение на php8. Вот еще проблема ! :(

Спасите — помогите, братцы ! Всем — Добра и хорошего дня !

Describe the bug
Error getting remote image https://dz.jumia.is/F4MMY1ypiCMQ6VJ-zx1Y9T7NDzs=/fit-in/500x500/filters:fill(white):sharpen(1. Error: cURL error 28: Operation timed out after 10001 milliseconds with 0 out of 0 bytes received

example URL https://dz.jumia.is/F4MMY1ypiCMQ6VJ-zx1Y9T7NDzs=/fit-in/500x500/filters:fill(white):sharpen(1,0,false):quality(100)/product/19/892/1.jpg?5327

without =/fit-in/500x500/filters:fill(white):sharpen(1,0,false):quality(100)
Import complete! 2 products imported

«`
`
### WordPress Environment ###

WordPress address (URL): http://localhost/wordpress
Site address (URL): http://localhost/wordpress
WC Version: 3.6.5
Log Directory Writable: ✔
WP Version: 5.2.2
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
External object cache: –

Server Environment

Server Info: Apache/2.4.29 (Ubuntu)
PHP Version: 7.1.31-1+ubuntu18.04.1+deb.sury.org+1 — We recommend using PHP version 7.2 or above for greater performance and security. How to update your PHP version
PHP Post Max Size: 8 MB
PHP Time Limit: 30
PHP Max Input Vars: 1000
cURL Version: 7.58.0
OpenSSL/1.1.1c

SUHOSIN Installed: –
MySQL Version: 5.5.5-10.1.40-MariaDB-0ubuntu0.18.04.1
Max Upload Size: 2 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ❌ Your server does not have the SoapClient class enabled — some gateway plugins which use SOAP may not work as expected.
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Database

WC Database Version: 3.6.5
WC Database Prefix: wp_
MaxMind GeoIP Database: ✔
Total Database Size: 228.79MB
Database Data Size: 221.13MB
Database Index Size: 7.66MB
wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB
wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB
wp_comments: Data: 0.02MB + Index: 0.09MB
wp_ip_geo_block_cache: Data: 0.02MB + Index: 0.02MB
wp_ip_geo_block_logs: Data: 0.02MB + Index: 0.03MB
wp_ip_geo_block_stat: Data: 0.02MB + Index: 0.00MB
wp_links: Data: 0.02MB + Index: 0.02MB
wp_options: Data: 1.02MB + Index: 0.02MB
wp_postmeta: Data: 0.05MB + Index: 0.03MB
wp_posts: Data: 219.48MB + Index: 6.72MB
wp_termmeta: Data: 0.02MB + Index: 0.03MB
wp_terms: Data: 0.02MB + Index: 0.03MB
wp_term_relationships: Data: 0.02MB + Index: 0.02MB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB
wp_usermeta: Data: 0.02MB + Index: 0.03MB
wp_users: Data: 0.02MB + Index: 0.05MB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB
wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB

Post Type Counts

attachment: 11
manga: 26989
post: 1
product: 2
revision: 12
scheduled-action: 1

Security

Secure connection (HTTPS): ❌
Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
Hide errors from visitors: ✔

Active Plugins (4)

WooCommerce: by Automattic – 3.6.5 – 3.7.0 is available
WordPress Importer: by wordpressdotorg – 0.6.4

Inactive Plugins (4)

Akismet Anti-Spam: by Automattic – 4.1.2
Hello Dolly: by Matt Mullenweg – 1.7.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)

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
Cart: ❌ Page not set
Checkout: ❌ Page not set
My account: ❌ Page not set
Terms and conditions: ❌ Page not set

Theme

Name: mnanauk
Version: 1.0.1
Author URL: https://www.sa3i9a.com/License
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: ❌ Not declared

Templates

Overrides: –

Action Scheduler

Complete: 1
Oldest: 2019-08-16 20:32:11 +0000
Newest: 2019-08-16 20:32:11 +0000

Pending: 0
Oldest: –
Newest: –

Canceled: 0
Oldest: –
Newest: –

In-progress: 0
Oldest: –
Newest: –

Failed: 0
Oldest: –
Newest: –

`

Дистанционное получение изображения

  • Здравствуйте. Хочу заняться доставкой товаров, каталог себе добавить нужно, но при импорте товара с Икеи пишет «Ошибка дистанционного получения изображения»

    Страница, с которой нужна помощь: [войдите, чтобы увидеть ссылку]

Просмотр 2 ответов — с 1 по 2 (всего 2)

  • при импорте товара с Икеи пишет «Ошибка дистанционного получения изображения»

    Мы можем только пожелать вам удачно разобраться самостоятельно, т.к. причин этой ошибки дофига, как и путей решения.

    А Икея разрешает импортировать их каталог?
    Так же проблема может возникать из-за расширения картинки, у них формат webp.

Просмотр 2 ответов — с 1 по 2 (всего 2)

  • Тема «Дистанционное получение изображения» закрыта для новых ответов.
  • Форум: Плагины
  • 2 ответа
  • 3 участника
  • Последний ответ: zgd41
  • Последняя активность: 1 год, 6 месяцев назад
  • Статус: нерешённая

  • #1

Добрый день!
Помогите и мне, пожалуйста. Я создаю интернет-магазин woocommerce. Я новичок.
Мне нужно загрузить товар на сайт я скачал wp all import, у меня получается загрузить все, что мне нужно кроме картинок!

Я загрузил их в «Медиафайлы». Способ загрузки выбираю «Use images currently in Media Library». в поле с изображением перетаскиваю ID рисунка, нажимаю на «превью и тест» все видно, все хорошо.
НО после окончательной загрузки csv картинки не подтягиваются на сайт. Статус изображения «не прикреплён».

С помощью этого варианта «Use images currently uploaded in wp-content/uploadswpallimportfiles» ничего не получается вообще.
Я просмотрел кучу видео уроков, но все равно не получается!
Пожалуйста, помогите

  • #2

забыл добавить, что картинки у меня просто в папке, в csv не указанна никакая инфа по изображениям, кроме id картинки

  • #3

Может поможет: только я другим плагином импорта пользуюсь: попробуйте не id картинки , а урл прописать, т.е полный путь до папки с картинкой? А вообще : wp-content/uploadswpallimportfiles не правильный путь, т.к. при загрузке через медиафайлы вордпресc всегда!!! сохраняет их в папке wp-content/uploads/2016/03 ну понятно что последние соответствуют году и месяцу))) Чтобы использовать этот путь: wp-content/uploads/wpallimport/files/ надо картинки загрузить именно в эту папку wpallimport/files через фтп!

  • #4

Спасибо.
Но я не совсем понятно выразился. Если я прописываю юрл, у меня одна картинка подтягивается ко всем товарам-это при указании имени, если имя не указывать, а просто путь к папке, то не находит ни одну картинку.
Я пробовал и в папку /2016/3 загружать и в wpallimport/file. Не находит изображения. Вернее, в первом варианте находит, отображает в примере картинку. Но на сайт к товару не подтягивает вообще никак(((.
Сервер у меня локальный, open server, это ведь роли не играет??

  • #5

Может попробовать другой плагин импорта? По идее к каждому товару нужно прописывать свою картинку , т.е для каждого товара должен быть свой урл картинки. Например: к товару №1 — /2016/3/img1.jpg к товару №2 — /2016/3/img2.jpg , и так далее. Если стоит всего один урл на все товары, он и будет показывать одну картинку!

  • #6

если перетаскивать {id[1]} (он же название изображения) из csv так и получается — у каждого товара свой рисунок, вручную я не могу указывать свой url каждой картинке (у меня 1500 изображений/товаров)
{id[1]}
сможете подсказать какой можно еще плагин попробовать (бесплатный)? чтобы можно было указать описание, атрибуты….

  • #7

Этот способ «Use images currently in Media Library» видит картинки в предпросмотре, но не подтягивает их на сайт.
картинки лежат тут: W:domainsshket.dp.uawp-contentuploads20163

Этот способ «Use images currently uploaded in wp-content/uploadswpallimportfiles» не видит картинки даже в предпросмотре и соответсвенно не подтягивает их к сайту
картинки лежат тут: W:domainsshket.dp.uawp-contentuploadswpallimportfiles

  • #8

content/uploadswpallimportfiles скажите а слэши специально так стоят? Может Вы просто адрес неправильно пишите по идее ведь вот так: content/uploads/wpallimport/files/

  • #9

вот я тоже на это внимание обратил…мой путь с верными «слешами», а в примере на wp слеш наоборот.. посмотрите, пожал, я правильно указываю путь ?? (фото лежат 100% ) или может и ID фото в конце нужно поставить?

upload_2016-3-28_19-45-32.png

  • #10

Вообще обычно так и прописывают урл картинки руками, но это упрощается в экселевской таблице. Ещё лучше в опен офис, т.к. эксель не формирует годный цсв файл. Если надо я объясню как сделать в таблице.

  • #11

На скрине вообще ничего не видно мне)))

  • #12

вот немного лучше фото

  • #13

вот вырезал

  • Безымянный.jpg

    Безымянный.jpg

    71.9 KB · Просмотры: 26

  • #14

Слушайте туплю не по детски, а разве к WP All Import расширение специальное под Woocommerce не надо устанавливать?

  • #15

у меня стоит

  • #16

Я вижу по крайней мере одну ошибку — это сепаратор, он должен быть не запятая , а точка с запятой, иначе csv файл не читается.

  • #17

что такое сепаратор?)

  • #18

Вот этот адрес плагин прописывает или Вы: W:domainsshket.dp.uawp-contentuploadswpallimportfiles ? Если Вы то у Вас все слэши в другую сторону.

  • #19

Разделитель: Там строчка есть enter image filename on per line … и там окошечко в нем стоит запятая поменяйте на точку с запятой и попробуйте ещё раз выставив использовать файлы из библиотеки! Когда формируется цсв файл, там все в одну строку, вордпресс не воспринимает разделитель как запятую, поэтому у Вас все изображения могут сливаться одной строкой, и из-за этого мучения)))

  • #20

я копирую путь к изображениям… вверху папки :
upload_2016-3-28_20-0-4.png

Я использую v2 REST API. Этот код отлично работал на более старых версиях WordPress и WooCommerce. Я не могу загрузить изображение к продукту.

Первая ошибка после обновления, которую я получил, была:

array (
  'code' => 'woocommerce_product_image_upload_error',
  'message' => 'Invalid image: Sorry, this file type is not permitted for security reasons.',
  'data' => 
  array (
    'status' => 400,
  ),

Решено добавлением следующего в wp-config.php в конец файла:

define('ALLOW_UNFILTERED_UPLOADS', true);

2-ю ошибку не могу понять. Изображение не загружается и остается фантомным изображением там, где оно было загружено.

Код

<?php
require __DIR__ . '/vendor/autoload.php';

use AutomatticWooCommerceClient;

$woocommerce = new Client(
    'http://localhost/wordpress', 
    'ck_44b92c00ea35e6cc59c89c29051bf67c22e0df3a', 
    'cs_dd833592a1ef7a00a82c1711fd455db2e4c5bd15',
    [
        'wp_api' => true,
        'version' => 'wc/v2',
    ]
);

$data['create'][] = array(
    'name' => 'TEST',
    'regular_price' => '4.50',
    'description' => 'TEST DESC',
    'type' => 'simple',
    'images' => array(
        array(
            'alt' => '',
            'name' => '',
            'src' => 'http://demo2.phppointofsale.com/PHP-Point-Of-Sale-Prev/index.php/app_files/view/1',
            'position' => 0,
        ),
    )
);


$response = $woocommerce->post('products/batch',$data);
$headers = $woocommerce->http->getResponse()->getHeaders();
var_dump($headers);
var_dump($response);

Данные ответа

array(13) {
  ["Date"]=>
  string(29) "Thu, 24 Jan 2019 18:22:16 GMT"
  ["Server"]=>
  string(6) "Apache"
  ["X-Powered-By"]=>
  string(9) "PHP/7.2.1"
  ["X-Robots-Tag"]=>
  string(7) "noindex"
  ["Link"]=>
  string(63) "<http://localhost/wordpress/wp-json/>; rel = "https://api.w.org/""
  ["X-Content-Type-Options"]=>
  string(7) "nosniff"
  ["Access-Control-Expose-Headers"]=>
  string(27) "X-WP-Total, X-WP-TotalPages"
  ["Access-Control-Allow-Headers"]=>
  string(27) "Authorization, Content-Type"
  ["Expires"]=>
  string(29) "Wed, 11 Jan 1984 05:00:00 GMT"
  ["Cache-Control"]=>
  string(36) "no-cache, must-revalidate, max-age=0"
  ["Allow"]=>
  string(16) "POST, PUT, PATCH"
  ["Content-Length"]=>
  string(3) "139"
  ["Content-Type"]=>
  string(31) "application/json; charset=UTF-8"
}
array(1) {
  ["create"]=>
  array(1) {
    [0]=>
    array(2) {
      ["id"]=>
      int(0)
      ["error"]=>
      array(3) {
        ["code"]=>
        string(36) "woocommerce_product_invalid_image_id"
        ["message"]=>
        string(27) "#82 is an invalid image ID."
        ["data"]=>
        array(1) {
          ["status"]=>
          int(400)
        }
      }
    }
  }
}

Доказательство https://via.placeholder.com/350×150 является изображением

cmuench@cmuench:~$ curl -I "https://via.placeholder.com/350x150";
HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Mon, 28 Jan 2019 14:07:22 GMT
Content-Type: image/png
Content-Length: 1253
Last-Modified: Sun, 06 Jan 2019 22:00:10 GMT
Connection: keep-alive
ETag: "5c327a6a-4e5"
Expires: Mon, 04 Feb 2019 14:07:22 GMT
Cache-Control: max-age=604800
X-Cache: L1
Accept-Ranges: bytes

Http://demo2.phppointofsale.com/PHP-Point-Of-Sale-Prev/index.php/app_files/view/1

Заголовки из реальных файлов (не демонстрационный пример). Та же ошибка, что и в демонстрационном примере

    header("Cache-Control: max-age=2592000");
    header('Expires: '.gmdate('D, d M Y H:i:s', strtotime('+1 month')).' GMT');
    header('Pragma: cache');
    header('Content-Disposition: inline; filename = "'.$file_name.'"');
    header("Content-type: ".get_mime_by_extension($file->file_name));

Я отправляю почтовый запрос в REST API woocommerce для создания продукта с изображением на нем ( https://cdn.beymen.com/productimages/opfgmmmg.0cz_IMG_01_2110085666379.jpg) (расширение файла в URL-адресе jpg, но при загрузке вы можете увидеть, что на самом деле это webP файл).

Когда я загружаю другие изображения webP, которые на самом деле заканчиваются на webp, они работают. но когда я загружаю URL-адрес выше, я получаю эту ошибку.

{'code': 'woocommerce_product_image_upload_error', 'message': 'Ошибка дистанционного получения изображения https://cdn.beymen.com/productimages/opfgmmmg.0cz_IMG_01_2110085666379.jpg. Ошибка: The checksum of the file (4572785d201f809bcdc2a9b7bf82e305) does not match the expected checksum value (feb886e9d82201b5189e121da761451d).', 'data': {'status': 400}}

1 ответ

Вы можете исправить это, используя следующий фрагмент

add_filter('wp_handle_sideload_prefilter', 'real_image_ext');

function real_image_ext($file){
    $real_mime = wp_get_image_mime( $file['tmp_name'] );
    $mime_to_ext = apply_filters(
        'getimagesize_mimes_to_exts',
        array(
            'image/jpeg' => 'jpg',
            'image/png'  => 'png',
            'image/gif'  => 'gif',
            'image/bmp'  => 'bmp',
            'image/tiff' => 'tif',
            'image/webp' => 'webp',
        )
    );
    if ( ! empty( $mime_to_ext[ $real_mime ] ) ) {
        $file['name'] = pathinfo($file['name'], PATHINFO_FILENAME) . '.' . $mime_to_ext[ $real_mime ];
    }
    return $file;
}


0

Moshe Gross
4 Июл 2022 в 23:30

Viewing the log file, you can learn what prevents you from successfull import. Below are the most common errors and how to correct them.

“Error getting a remote image. Forbidden”

This error may occur when you are importing images from URLs.

WooCommerce Import Error Forbidden

WooCommerce Import Error – Forbidden

Change User-Agent

When WordPress is trying to download an image from another website, it is using the default User-Agent, e.g. “WordPress/5.7; http://example.com/”. Some websites might block the requests that have a User-Agent header other than web-browser’s. A workaround for this is to make WordPress User-Agent header look like web-browser’s. You can do this by installing a third-party plugin or editing a line of code in one of the source files of your store.

The change should be made in the file: wp-includes/class-http.php

Locate the following line:

'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $url ),

Replace that line with the following:

'user-agent' => apply_filters( 'http_headers_useragent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36' ),

Change dynamic links to static ones

One of the reasons for getting this error is using links to images with dynamic parameters. Dynamic parameters appear after the question mark (?):

Image Dynamic URL Example

Example of image with dynamic URL

To import images using the default WooCommerce importer, make sure that your image links are static and end with /imgagename.jpg or /imagename.png, the supported WooCommerce formats. The link should not contain any question marks because dynamic links with parameters cannot be imported with the default Woocommerce import tool.

Save images from links and upload them from a local disk/FTP

Download all images using some third-party tool or request image scraping with eScraper to get them uploaded to your server. After that, upload image files to the WooCommerce import directory. Then import products with the default WooCommerce import tool with image names specified in the CSV (no link should be in the file). Images will be assigned automatically.

You can request image files after scraping. We will download all image files for you. This option will cost additionally (depending on the volume of images and their size).

Use some external solution that supports import from dynamic links

To import images from links, you can try using external applications like Store Manager for WooCommerce. Store Manager import tool emulates browser download and uploads image files itself into WooCommerce. Store Manager can also read dynamic image links. There is a free 14-days trial version that allows you to upload any number of scraped products smoothly.

“Sorry, this file type is not permitted for security reasons”

This error may occur if the description field in the import file contains HTML tags. On some servers, such file can be mis-detected by WordPress. A solution is to add a line of code to your wp-config.php file: define( 'ALLOW_UNFILTERED_UPLOADS', true );

Here is how you do this:

  1. Connect to your WordPress site via FTP/SFTP.
  2. Your site’s wp-config.php file is located in the root folder, which is the same folder that has the wp-admin and wp-includes folders. Right-click to edit the file:

    WooCommerce Config File Editing

    Open the wp-config file

  3. Find the row /* That's all, stop editing! Happy publishing. */ and abive it paste the code
    define('ALLOW_UNFILTERED_UPLOADS', true);
  4. WooCommerce Config Adding Allow Unfiltered Uploads Code

    Paste the line of code to allow unfiltered uploads

  5. Save changes to the file.

For the security reasons, this should be enabled temporarily to perform the import, and then removed from the configuration file. Before editing the config file, it is recommended to make a backup of your store database to ensure you can roll back.

Please write in the comments if the methods offered above helped. If the issue persists, describe your case in the comments below. We’ll investigate it and try to offer a solution.

Describe the bug
Error getting remote image https://dz.jumia.is/F4MMY1ypiCMQ6VJ-zx1Y9T7NDzs=/fit-in/500x500/filters:fill(white):sharpen(1. Error: cURL error 28: Operation timed out after 10001 milliseconds with 0 out of 0 bytes received

example URL https://dz.jumia.is/F4MMY1ypiCMQ6VJ-zx1Y9T7NDzs=/fit-in/500x500/filters:fill(white):sharpen(1,0,false):quality(100)/product/19/892/1.jpg?5327

without =/fit-in/500x500/filters:fill(white):sharpen(1,0,false):quality(100)
Import complete! 2 products imported

«`
`
### WordPress Environment ###

WordPress address (URL): http://localhost/wordpress
Site address (URL): http://localhost/wordpress
WC Version: 3.6.5
Log Directory Writable: ✔
WP Version: 5.2.2
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
External object cache: –

Server Environment

Server Info: Apache/2.4.29 (Ubuntu)
PHP Version: 7.1.31-1+ubuntu18.04.1+deb.sury.org+1 — We recommend using PHP version 7.2 or above for greater performance and security. How to update your PHP version
PHP Post Max Size: 8 MB
PHP Time Limit: 30
PHP Max Input Vars: 1000
cURL Version: 7.58.0
OpenSSL/1.1.1c

SUHOSIN Installed: –
MySQL Version: 5.5.5-10.1.40-MariaDB-0ubuntu0.18.04.1
Max Upload Size: 2 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ❌ Your server does not have the SoapClient class enabled — some gateway plugins which use SOAP may not work as expected.
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Database

WC Database Version: 3.6.5
WC Database Prefix: wp_
MaxMind GeoIP Database: ✔
Total Database Size: 228.79MB
Database Data Size: 221.13MB
Database Index Size: 7.66MB
wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB
wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB
wp_comments: Data: 0.02MB + Index: 0.09MB
wp_ip_geo_block_cache: Data: 0.02MB + Index: 0.02MB
wp_ip_geo_block_logs: Data: 0.02MB + Index: 0.03MB
wp_ip_geo_block_stat: Data: 0.02MB + Index: 0.00MB
wp_links: Data: 0.02MB + Index: 0.02MB
wp_options: Data: 1.02MB + Index: 0.02MB
wp_postmeta: Data: 0.05MB + Index: 0.03MB
wp_posts: Data: 219.48MB + Index: 6.72MB
wp_termmeta: Data: 0.02MB + Index: 0.03MB
wp_terms: Data: 0.02MB + Index: 0.03MB
wp_term_relationships: Data: 0.02MB + Index: 0.02MB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB
wp_usermeta: Data: 0.02MB + Index: 0.03MB
wp_users: Data: 0.02MB + Index: 0.05MB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB
wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB

Post Type Counts

attachment: 11
manga: 26989
post: 1
product: 2
revision: 12
scheduled-action: 1

Security

Secure connection (HTTPS): ❌
Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
Hide errors from visitors: ✔

Active Plugins (4)

WooCommerce: by Automattic – 3.6.5 – 3.7.0 is available
WordPress Importer: by wordpressdotorg – 0.6.4

Inactive Plugins (4)

Akismet Anti-Spam: by Automattic – 4.1.2
Hello Dolly: by Matt Mullenweg – 1.7.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)

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
Cart: ❌ Page not set
Checkout: ❌ Page not set
My account: ❌ Page not set
Terms and conditions: ❌ Page not set

Theme

Name: mnanauk
Version: 1.0.1
Author URL: https://www.sa3i9a.com/License
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: ❌ Not declared

Templates

Overrides: –

Action Scheduler

Complete: 1
Oldest: 2019-08-16 20:32:11 +0000
Newest: 2019-08-16 20:32:11 +0000

Pending: 0
Oldest: –
Newest: –

Canceled: 0
Oldest: –
Newest: –

In-progress: 0
Oldest: –
Newest: –

Failed: 0
Oldest: –
Newest: –

`

  • #1

Добрый день!
Помогите и мне, пожалуйста. Я создаю интернет-магазин woocommerce. Я новичок.
Мне нужно загрузить товар на сайт я скачал wp all import, у меня получается загрузить все, что мне нужно кроме картинок!

Я загрузил их в «Медиафайлы». Способ загрузки выбираю «Use images currently in Media Library». в поле с изображением перетаскиваю ID рисунка, нажимаю на «превью и тест» все видно, все хорошо.
НО после окончательной загрузки csv картинки не подтягиваются на сайт. Статус изображения «не прикреплён».

С помощью этого варианта «Use images currently uploaded in wp-content/uploadswpallimportfiles» ничего не получается вообще.
Я просмотрел кучу видео уроков, но все равно не получается!
Пожалуйста, помогите

  • #2

забыл добавить, что картинки у меня просто в папке, в csv не указанна никакая инфа по изображениям, кроме id картинки

  • #3

Может поможет: только я другим плагином импорта пользуюсь: попробуйте не id картинки , а урл прописать, т.е полный путь до папки с картинкой? А вообще : wp-content/uploadswpallimportfiles не правильный путь, т.к. при загрузке через медиафайлы вордпресc всегда!!! сохраняет их в папке wp-content/uploads/2016/03 ну понятно что последние соответствуют году и месяцу))) Чтобы использовать этот путь: wp-content/uploads/wpallimport/files/ надо картинки загрузить именно в эту папку wpallimport/files через фтп!

  • #4

Спасибо.
Но я не совсем понятно выразился. Если я прописываю юрл, у меня одна картинка подтягивается ко всем товарам-это при указании имени, если имя не указывать, а просто путь к папке, то не находит ни одну картинку.
Я пробовал и в папку /2016/3 загружать и в wpallimport/file. Не находит изображения. Вернее, в первом варианте находит, отображает в примере картинку. Но на сайт к товару не подтягивает вообще никак(((.
Сервер у меня локальный, open server, это ведь роли не играет??

  • #5

Может попробовать другой плагин импорта? По идее к каждому товару нужно прописывать свою картинку , т.е для каждого товара должен быть свой урл картинки. Например: к товару №1 — /2016/3/img1.jpg к товару №2 — /2016/3/img2.jpg , и так далее. Если стоит всего один урл на все товары, он и будет показывать одну картинку!

  • #6

если перетаскивать {id[1]} (он же название изображения) из csv так и получается — у каждого товара свой рисунок, вручную я не могу указывать свой url каждой картинке (у меня 1500 изображений/товаров)
{id[1]}
сможете подсказать какой можно еще плагин попробовать (бесплатный)? чтобы можно было указать описание, атрибуты….

  • #7

Этот способ «Use images currently in Media Library» видит картинки в предпросмотре, но не подтягивает их на сайт.
картинки лежат тут: W:domainsshket.dp.uawp-contentuploads20163

Этот способ «Use images currently uploaded in wp-content/uploadswpallimportfiles» не видит картинки даже в предпросмотре и соответсвенно не подтягивает их к сайту
картинки лежат тут: W:domainsshket.dp.uawp-contentuploadswpallimportfiles

  • #8

content/uploadswpallimportfiles скажите а слэши специально так стоят? Может Вы просто адрес неправильно пишите по идее ведь вот так: content/uploads/wpallimport/files/

  • #9

вот я тоже на это внимание обратил…мой путь с верными «слешами», а в примере на wp слеш наоборот.. посмотрите, пожал, я правильно указываю путь ?? (фото лежат 100% ) или может и ID фото в конце нужно поставить?

upload_2016-3-28_19-45-32.png

  • #10

Вообще обычно так и прописывают урл картинки руками, но это упрощается в экселевской таблице. Ещё лучше в опен офис, т.к. эксель не формирует годный цсв файл. Если надо я объясню как сделать в таблице.

  • #11

На скрине вообще ничего не видно мне)))

  • #12

вот немного лучше фото

  • #13

вот вырезал

  • Безымянный.jpg

    Безымянный.jpg

    71.9 KB · Просмотры: 27

  • #14

Слушайте туплю не по детски, а разве к WP All Import расширение специальное под Woocommerce не надо устанавливать?

  • #15

у меня стоит

  • #16

Я вижу по крайней мере одну ошибку — это сепаратор, он должен быть не запятая , а точка с запятой, иначе csv файл не читается.

  • #17

что такое сепаратор?)

  • #18

Вот этот адрес плагин прописывает или Вы: W:domainsshket.dp.uawp-contentuploadswpallimportfiles ? Если Вы то у Вас все слэши в другую сторону.

  • #19

Разделитель: Там строчка есть enter image filename on per line … и там окошечко в нем стоит запятая поменяйте на точку с запятой и попробуйте ещё раз выставив использовать файлы из библиотеки! Когда формируется цсв файл, там все в одну строку, вордпресс не воспринимает разделитель как запятую, поэтому у Вас все изображения могут сливаться одной строкой, и из-за этого мучения)))

  • #20

я копирую путь к изображениям… вверху папки :
upload_2016-3-28_20-0-4.png

  • Ошибка директ икс фифа 19
  • Ошибка дисплея айфон 11
  • Ошибка директ икс самп
  • Ошибка дисплея civilization 6 пожалуйста убедитесь что драйвер дисплея обновлен
  • Ошибка директ икс вар зон