craftcms / feed-me

Craft CMS plugin for importing entry data from XML, RSS or ATOM feeds—routine task or on-demand.
Other
288 stars 139 forks source link

Cannot read property 'item_' of undefined TypeError: Cannot read property 'item_' of undefined at HTMLSelectElement. #535

Closed terryupton closed 3 years ago

terryupton commented 5 years ago

Description

Created a feed me via a CSV file. First one worked ok but the second one, I keep hitting the following error. No fields will be mapped, when I choose them in the dropdown nothing happens and the save/save & continue buttons don't function.

Very simple CSV file with about 13 entries and several fields. Mostly text.

Getting the following error on the field mapping page.

jquery.js:3841 jQuery.Deferred exception: Cannot read property 'item_' of undefined TypeError: Cannot read property 'item_' of undefined
    at HTMLSelectElement.<anonymous> (https://romanrangersfc.loc/cpresources/9bb12296/js/feed-me.min.js?v=1557680088:1:43865)
    at HTMLSelectElement.dispatch (https://romanrangersfc.loc/cpresources/ea97b087/jquery.js?v=1557680086:1:42344)
    at HTMLSelectElement.v.handle (https://romanrangersfc.loc/cpresources/ea97b087/jquery.js?v=1557680086:1:40356)
    at Object.trigger (https://romanrangersfc.loc/cpresources/ea97b087/jquery.js?v=1557680086:1:70447)
    at HTMLSelectElement.<anonymous> (https://romanrangersfc.loc/cpresources/ea97b087/jquery.js?v=1557680086:1:71042)
    at Function.each (https://romanrangersfc.loc/cpresources/ea97b087/jquery.js?v=1557680086:1:2769)
    at k.fn.init.each (https://romanrangersfc.loc/cpresources/ea97b087/jquery.js?v=1557680086:1:1418)
    at k.fn.init.trigger (https://romanrangersfc.loc/cpresources/ea97b087/jquery.js?v=1557680086:1:71018)
    at HTMLDocument.<anonymous> (https://romanrangersfc.loc/cpresources/9bb12296/js/feed-me.min.js?v=1557680088:1:44050)
    at e (https://romanrangersfc.loc/cpresources/ea97b087/jquery.js?v=1557680086:1:29297) undefined
k.Deferred.exceptionHook @ jquery.js:3841
t @ jquery.js:3629
setTimeout (async)
(anonymous) @ jquery.js:3663
n @ jquery.js:3291
fireWith @ jquery.js:3421
fire @ jquery.js:3429
n @ jquery.js:3291
fireWith @ jquery.js:3421
ready @ jquery.js:3901
B @ jquery.js:3911
jquery.js:3850 Uncaught TypeError: Cannot read property 'item_' of undefined
    at HTMLSelectElement.<anonymous> (feed-me.js:3795)
    at HTMLSelectElement.dispatch (jquery.js:5233)
    at HTMLSelectElement.v.handle (jquery.js:5040)
    at Object.trigger (jquery.js:8461)
    at HTMLSelectElement.<anonymous> (jquery.js:8539)
    at Function.each (jquery.js:367)
    at k.fn.init.each (jquery.js:202)
    at k.fn.init.trigger (jquery.js:8538)
    at HTMLDocument.<anonymous> (feed-me.js:3811)
    at e (jquery.js:3557)
(anonymous) @ feed-me.js:3795
dispatch @ jquery.js:5233
v.handle @ jquery.js:5040
trigger @ jquery.js:8461
(anonymous) @ jquery.js:8539
each @ jquery.js:367
each @ jquery.js:202
trigger @ jquery.js:8538
(anonymous) @ feed-me.js:3811
e @ jquery.js:3557
t @ jquery.js:3625
setTimeout (async)
k.readyException @ jquery.js:3849
(anonymous) @ jquery.js:3869
e @ jquery.js:3557
t @ jquery.js:3625
setTimeout (async)
(anonymous) @ jquery.js:3663
n @ jquery.js:3291
fireWith @ jquery.js:3421
fire @ jquery.js:3429
n @ jquery.js:3291
fireWith @ jquery.js:3421
t @ jquery.js:3645
setTimeout (async)
(anonymous) @ jquery.js:3663
n @ jquery.js:3291
fireWith @ jquery.js:3421
fire @ jquery.js:3429
n @ jquery.js:3291
fireWith @ jquery.js:3421
ready @ jquery.js:3901
B @ jquery.js:3911

Steps to reproduce

  1. Created a CSV and added to a folder within the project.
  2. Referenced the file via an @alias address (e.g) @assetPath/teams.csv

Additional info

bryantAXS commented 5 years ago

I'm also having this issue.

rolfkokkeler commented 5 years ago

same here using json endpoint with absolute address

rolfkokkeler commented 5 years ago

solved the issue:

we moved a site from craft2 to craft3. I imported most field definitions using the plugin fieldmanager. However this does create the field not completely. For example:

I completed the field definitions and now the feed runs fine.

JorgeAnzola commented 5 years ago

I had the same issue. Indeed re-saving one of the fields I made from Field Manager (Took me a while to find) via the native Craft fields settings solved the problem.

juddlyon commented 5 years ago

I ran into the same issue - thanks for the heads up @JorgeAnzola!

In case anyone else runs into this, the Entries field that I created with Field Manager did not have the Section selected. Once checked, the jQuery error went away and I could map fields.

angrybrad commented 3 years ago

Going to close this out as ultimately a Field Manager issue.