Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File cannot be reached #647

Closed
BSBjorn opened this issue Jan 8, 2020 · 5 comments
Closed

File cannot be reached #647

BSBjorn opened this issue Jan 8, 2020 · 5 comments

Comments

@BSBjorn
Copy link

BSBjorn commented Jan 8, 2020

Description

I had a working feed, but after last update I no longer can process the JSON file provided getting this error: **

"Unable to reach /Users/bjornkamfjord/Sites/******/imports/hybris/fpaks.json. Message: cURL error 3: (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) "

**

I have validatet the json file, and also checked if the path provided is reachable from the browser (it is). I have tried moving the file to different location, tried different files, different path formats (http://.... , @web, @webroot etc) all resulting in the same error.

Is there something I'm missing? Has there been a change to how Feed Me works? Anything else I should try to solve?

Steps to reproduce

  1. Run feed

Additional info

  • Plugin version: 4.2.0
  • Craft version: Craft Pro 3.3.19
@BSBjorn
Copy link
Author

BSBjorn commented Jan 8, 2020

Curl error 3 says "URL not properly formatted", but I can't see anything wrong with the parh? I have it locally and running on a staging server, same issue both places....

@stphnmartin
Copy link

I have the same issue. After the update all previously working feeds are inaccessible to FeedMe.

@stphnmartin
Copy link

I fixed this temporarily by reverting these lines near 134 in /vendor/craftcms/feed-me/src/services/ DataTypes.php

134        // Check for local or relative URL
135        if (!UrlHelper::isAbsoluteUrl($url)) {
136        // if (strpos($url, '://') === false && !UrlHelper::isProtocolRelativeUrl($url) && !UrlHelper::isRootRelativeUrl($url)) {
137            error_clear_last();

olivierbon added a commit that referenced this issue Jan 15, 2020
angrybrad added a commit that referenced this issue Jan 15, 2020
@angrybrad
Copy link
Member

Just released 4.2.0.1 with a fix for this: https://github.com/craftcms/feed-me/releases/tag/4.2.0.1

@andersaloof
Copy link

I'm still having this issue.

It works in production (running on Linux), but on local dev on Windows 10, Feed Me will not import entries from my local JSON file and logs the same error as above.

This if check (https://github.com/craftcms/feed-me/blob/develop/src/services/DataTypes.php#L135) returns false for a windows path (in my case, the path returned from https://github.com/craftcms/feed-me/blob/develop/src/services/DataTypes.php#L132 is C:\WEB\project-name\storage/runtime/products_no.json).

Looking at previous revisions of DataTypes.php, the if test also failed here, but worked in the revision from november.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants