feed-me icon indicating copy to clipboard operation
feed-me copied to clipboard

Can't import a complete url into an url field

Open elodiegrondin opened this issue 6 years ago • 2 comments

Description

I have a JSON feed which contains an external URL like "https://example.com" (entries/external_link/url). There is no error in feed-me logs when I run it, all the text data and assets are imported without any problems. Except for my URL field. I get "[ ]" instead of "https://example.com".

Any help on this ?

JSON exemple

{
	"entries": [
		{
			"id": "140",
			"type": "regular",
			"title": "Banner import title (fr)",
			"subtitle": "Banner import subtitle (fr)",
			"body": "<p>Banner import body&nbsp;(fr)</p>",
			"internal_link": [{
				"type": "node",
				"title": "test",
				"id": "6",
				"cta": "Banner import link text (fr)"
			}],
			"external_link": {
				"cta": "Banner import link text (fr)",
				"url": "https://example.com"
			},
			"images": [{
				"url": "",
				"caption": ""
			}],
			"placements": [],
			"postdate": "2019/12/10",
			"status": "1"
		},
	],
	"nextPage": "",
	"length": 20,
	"totallength": 23
}

Additional info

  • Plugin version: 4.1.2
  • Craft version: 3.3.17

elodiegrondin avatar Dec 10 '19 14:12 elodiegrondin

@elodiegrondin you say:

Except for my URL field

Is this a custom field/plugin?

olivierbon avatar Dec 11 '19 18:12 olivierbon

@olivierbon it's a craftcms URL field inside a craftcms matrix. All imported urls start with http:// or https// so it should be valid. The problem may be related to the matrix. I haven't try to import in a URL field outside the matrix yet.

elodiegrondin avatar Dec 12 '19 11:12 elodiegrondin

I just tested importing into a built-in URL-type field inside a Matrix field, and it works as expected in version 4.4.0 and 5.0.4, so I’ll go ahead and close this.

i-just avatar Dec 06 '23 15:12 i-just