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

Error after setting import info #26

Closed
1stevengrant opened this issue Jan 14, 2016 · 2 comments
Closed

Error after setting import info #26

1stevengrant opened this issue Jan 14, 2016 · 2 comments

Comments

@1stevengrant
Copy link

Trying an import on the latest Craft version and running into this:

PHP notice

Undefined offset: 0

/var/www/craft/plugins/feedme/services/FeedMe_FeedService.php(23)

11         $url = craft()->config->parseEnvironmentString($url);
12 
13         if ($type == FeedMe_FeedType::JSON) {
14             return craft()->feedMe_feedJSON->getFeed($url, $element);
15         } else {
16             return craft()->feedMe_feedXML->getFeed($url, $element, $returnAttr);
17         }
18     }
19 
20     public function getFeedMapping($type, $url, $element) {
21         $array = $this->getFeed($type, $url, $element);
22 
23         $array = $this->getFormattedMapping($array[0]);
24 
25         return $array;
26     }
27 
28     function findPrimaryElement($element, $parsed) {
29         if (empty($parsed)) {
30             return false;
31         }
32 
33         // If no primary element, return root
34         if (!$element) {

Just a simple XML file. Known issue?

@1stevengrant
Copy link
Author

helps if you set the primary item

@joepagan
Copy link

joepagan commented Feb 4, 2016

Just to clarify as I was scratching my head a bit:

By primary item, @stevieg83 means "Primary Element" (the top-level JSON object), you set this on the screen before clicking save+continue.
image

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

2 participants