#StackBounty: #api #xml #products #rest-api #json AEM connector and Magento 2.2.3 EE (magento rest api)

Bounty: 50

There is not much information out there regarding Adobe Experience Manager, Magento, and the connector built by infield digital. Which I believe the connector and everything is now owned by magento. Very limited documentation on Adobe’s website here: https://helpx.adobe.com/experience-manager/6-2/sites/deploying/using/magento.html

I’m attempting to import (magaento sample data) products from Magento EE into AEM through their import product wizard GUI.

enter image description here

  1. I add my server URL which may be the problem all along but I’m not sure. It generally looks like so: http://mymagentowebsite.com/index.php/rest/V1/integration/admin/token (I’m assuming they need the url to admin login. Perhaps they are looking for a direct link to download all products? Is there such a link?)
  2. I add my admin name: admin
  3. add my password: password
  4. I usually keep collection blank. Uncertain about this as well. Are they looking for a specific catalog collection? If so that makes sense, it would only export / import the specific collection you request. Anyways, I keep this blank because I want to export / Import all products from magento into AEM. (sample data)
  5. Last, I hit next and it starts to think.

enter image description here

It runs for about 20 seconds and then it errors out.

enter image description here

I’ll retrieve the AEM error log.

[1520532440737] GET /tmp/commerce/tickers/import_dbe931.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /tmp/commerce/tickers/import_dbe931.json not found
[1520532441787] GET /tmp/commerce/tickers/import_dbe931.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /tmp/commerce/tickers/import_dbe931.json not found
[1520532442837] GET /tmp/commerce/tickers/import_dbe931.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /tmp/commerce/tickers/import_dbe931.json not found
08.03.2018 18:07:23.002 *INFO* [sling-default-1216-com.adobe.granite.oauth.server.impl.AccessTokenCleanupTask.1027] com.adobe.granite.oauth.server.impl.AccessTokenCleanupTask AccessTokenCleanupTask: Removed 0 token(s) in 2ms (0 token(s) still active)
[1520532443882] GET /tmp/commerce/tickers/import_dbe931.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /tmp/commerce/tickers/import_dbe931.json not found
[1520532444935] GET /tmp/commerce/tickers/import_dbe931.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /tmp/commerce/tickers/import_dbe931.json not found
[1520532445988] GET /tmp/commerce/tickers/import_dbe931.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /tmp/commerce/tickers/import_dbe931.json not found
[1520532447036] GET /tmp/commerce/tickers/import_dbe931.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /tmp/commerce/tickers/import_dbe931.json not found

[1520532456468] GET /tmp/commerce/tickers/import_dbe931.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /tmp/commerce/tickers/import_dbe931.json not found
[1520532457506] GET /tmp/commerce/tickers/import_dbe931.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /tmp/commerce/tickers/import_dbe931.json not found
[1520532458544] GET /tmp/commerce/tickers/import_dbe931.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /tmp/commerce/tickers/import_dbe931.json not found
[1520532436595] POST /libs/commerce/products HTTP/1.1] com.infield.magento.catalog.connector.MagentoConnectorService Error getting Product List: ERROR: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')

It appears the system (magento) try’s to redirect me back to the admin login page based on the remaining output of the log below. It appears to be just the html,css,js of the admin login page.

at [Source: <!doctype html>
<html lang="en">
    <head >
        
    var BASE_URL = 'http://mymagentowebsite.com/index.php/admin/admin/index/index/key/7c2e967dfea8b1d01d3e4efc991feddede147744d5552a13154de48082e827b2/';
    var FORM_KEY = 'fcbb3X6XhuItWHsI';
    var require = {
        "baseUrl": "http://mymagentowebsite.com/pub/static/adminhtml/Magento/backend/en_US"
    };

        <meta charset="utf-8"/>
<meta name="keywords" content="Magento, Varien, E-commerce"/>
<meta name="robots" content="NOINDEX,NOFOLLOW"/>
<meta name="viewport" content="width=1024"/>
<meta name="format-detection" content="telephone=no"/>
<title>Magento Admin</title>
<link  rel="stylesheet" type="text/css"  media="all" href="http://mymagentowebsite.com/pub/static/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css" />
<link  rel="stylesheet" type="text/css"  media="all" href="http://mymagentowebsite.com/pub/static/adminhtml/Magento/backend/en_US/extjs/resources/css/ytheme-magento.css" />
<link  rel="stylesheet" type="text/css"  media="all" href="http://mymagentowebsite.com/pub/static/adminhtml/Magento/backend/en_US/jquery/jstree/themes/default/style.css" />
<link  rel="stylesheet" type="text/css"  media="all" href="http://mymagentowebsite.com/pub/static/adminhtml/Magento/backend/en_US/css/styles.css" />
<link  rel="icon" type="image/x-icon" href="http://mymagentowebsite.com/pub/static/adminhtml/Magento/backend/en_US/Magento_Theme/favicon.ico" />
<link  rel="shortcut icon" type="image/x-icon" href="http://mymagentowebsite.com/pub/static/adminhtml/Magento/backend/en_US/Magento_Theme/favicon.ico" />
http://mymagentowebsite.com/pub/static/adminhtml/Magento/backend/en_US/requirejs/require.js
http://mymagentowebsite.com/pub/static/adminhtml/Magento/backend/en_US/mage/requirejs/mixins.js
http://mymagentowebsite.com/pub/static/adminhtml/Magento/backend/en_US/requirejs-config.js
            </head>
    <body data-container="body" data-mage-init='{"loaderAjax": {}, "loader": { "icon": "http://mymagentowebsite.com/pub/static/adminhtml/Magento/backend/en_US/images/loader-2.gif"}}' id="html-body" class="adminhtml-auth-login page-layout-admin-login">
        <section class="page-wrapper">    
        require.config({
            deps: [
                'jquery',
                'mage/translate',
                'jquery/jquery-storageapi'
            ],
            callback: function ($) {
                'use strict';

                var dependencies = [],
                    versionObj;

                $.initNamespaceStorage('mage-translation-storage');
                $.initNamespaceStorage('mage-translation-file-version');
                versionObj = $.localStorage.get('mage-translation-file-version');


                if (versionObj.version !== 'f2cfb97596844cf98c4e4ef89e7b82afad89888b') {
                    dependencies.push(
                        'text!js-translation.json'
                    );

                }

                require.config({
                    deps: dependencies,
                    callback: function (string) {
                        if (typeof string === 'string') {
                            $.mage.translate.add(JSON.parse(string));
                            $.localStorage.set('mage-translation-storage', string);
                            $.localStorage.set(
                                'mage-translation-file-version',
                                {
                                    version: 'f2cfb97596844cf98c4e4ef89e7b82afad89888b'
                                }
                            );
                        } else {
                            $.mage.translate.add($.localStorage.get('mage-translation-storage'));
                        }
                    }
                });
            }
        });
    





require([
    "jquery",
    "jquery/ui"
], function($){

    $.extend(true, $, {
        calendarConfig: {
            dayNames: ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
            dayNamesMin: ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],
            monthNames: ["January","February","March","April","May","June","July","August","September","October","November","December"],
            monthNamesShort: ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],
            infoTitle: "About the calendar",
            firstDay: 0,
            closeText: "Close",
            currentText: "Go Today",
            prevText: "Previous",
            nextText: "Next",
            weekHeader: "WK",
            timeText: "Time",
            hourText: "Hour",
            minuteText: "Minute",
            dateFormat: $.datepicker.RFC_2822,
            showOn: "button",
            showAnim: "",
            changeMonth: true,
            changeYear: true,
            buttonImageOnly: null,
            buttonImage: null,
            showButtonPanel: true,
            showOtherMonths: true,
            showWeek: false,
            timeFormat: '',
            showTime: false,
            showHour: false,
            showMinute: false,
            serverTimezoneSeconds: 1520503663,
            serverTimezoneOffset: -28800,
            yearRange: '1918:2118'
        }
    });

enUS = {"m":{"wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}}; // en_US locale reference

});

<header class="login-header">                        <a
            href="http://mymagentowebsite.com/index.php/admin/admin/"
            data-edition="Enterprise"            class="logo">
            <img class="logo-img" src="http://mymagentowebsite.com/pub/static/adminhtml/Magento/backend/en_US/images/magento-logo.svg"
            alt="Magento Admin Panel"/>
        </a>
    </header>

Maybe it’s a problem with the magento API? /V1/integration/admin/token I try to add this onto the url but it still throws an error.

Based on the last line in the error log it looks to me like a JSON or XML error. Some type of de-serialization issue or it just can’t parse the JSON for whatever reason.

I’ve followed all the steps of the very limited documentation. Is there a direct link to download an entire product list or collection or catalog?

Is there anything on magento admin or server that would be blocking the export / import? Do I need to increase sessions or timeouts? Any help would be greatly appreciated. The more i look the more i see there is a lot of people having issues (some similar) with AEM and Magento. Thank you in advance.


Get this bounty!!!

Leave a Reply