Import json file from v.2.34.0 to v.3.0.3 ignores my subscribers

I just wanted to setup a 3.0.3 instance and take the new version for a ride.
I exported all my data (json-file) from my existing site (version 2.34.0) and imported it on my new site.
But none of the subscribers where converted to members.
I also tried to export the subscribers as csv and import them as members but that failed.

Reading other threads it seems that they should be converted.

I’m not using the CLI (and don’t want to) I spin up a new clean installation from the release zip and import my data onto that instance.

Best regards,
Olle

Subscribers are converted to members if you upgrade, but not on import. If you want to import, you’d need to use the CSV file and import them as members. Can you let us know what happened when you tried that?

I tried to export my subscribers as csv and then import them as members but that failed with:

“The file type you uploaded is not supported.”

Filename: subscribers.2019-11-18.csv

Interesting, what OS and Browser are you working with?

Chrome x64 Version 78.0.3904.97
Windows 10 x64 Enterprise 1903
Node x64 10.16.3
Webserver IIS 10.0.18362.1

  • IIS Node 0.2.21 x64

The webserver has the csv mime/filetype extension added.

OK, can you open network tools in chrome and retry the upload, and then show us what the content type is on the upload request / share a HAR file?

I suspect windows (client OS) is using a different mime type to the one we expect (text/csv). If you can share what it is, we can fix the uploader to accept the additional mime type.

Sure.

Request
Content-Type : multipart/form-data; boundary=----WebKitFormBoundaryH5YvVtRrahApOO9a

{
  "log": {
    "version": "1.2",
    "creator": {
      "name": "WebInspector",
      "version": "537.36"
    },
    "pages": [],
    "entries": [
      {
        "startedDateTime": "2019-11-18T21:14:54.534Z",
        "time": 21.468999999342486,
        "request": {
          "method": "POST",
          "url": "http://site.local/ghost/api/v3/admin/members/csv/",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Host",
              "value": "site.local"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Content-Length",
              "value": "13393"
            },
            {
              "name": "Pragma",
              "value": "no-cache"
            },
            {
              "name": "Cache-Control",
              "value": "no-cache"
            },
            {
              "name": "Origin",
              "value": "http://site.local"
            },
            {
              "name": "App-Pragma",
              "value": "no-cache"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
            },
            {
              "name": "Content-Type",
              "value": "multipart/form-data; boundary=----WebKitFormBoundaryH5YvVtRrahApOO9a"
            },
            {
              "name": "Accept",
              "value": "text/plain, */*; q=0.01"
            },
            {
              "name": "X-Requested-With",
              "value": "XMLHttpRequest"
            },
            {
              "name": "X-Ghost-Version",
              "value": "3.0"
            },
            {
              "name": "Referer",
              "value": "http://site.local/ghost/"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.9,sv;q=0.8,da;q=0.7"
            },
            {
              "name": "Cookie",
              "value": "ghost-admin-api-session=s%3A6mcAy1Kb6cREGUMryxzhFLOx4D2jQMTN.OPl01UiPjNsY%2B8S9jftd7oRmiMDJnaxJcPgMHAzHOjQ; _ga=GA1.2.1318021375.1572593711; __stripe_mid=0c306adc-2054-4dc5-a6a3-2e6258041cbb; ghost-members-ssr=someone+local@gmail.com; ghost-members-ssr.sig=H_hfoui60lGC6gsDxTR9TygUekY; __stripe_sid=8bdba364-585f-452c-bb8a-fdf9efba6e1a"
            }
          ],
          "queryString": [],
          "cookies": [
            {
              "name": "ghost-admin-api-session",
              "value": "s%3A6mcAy1Kb6cREGUMryxzhFLOx4D2jQMTN.OPl01UiPjNsY%2B8S9jftd7oRmiMDJnaxJcPgMHAzHOjQ",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "_ga",
              "value": "GA1.2.1318021375.1572593711",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "__stripe_mid",
              "value": "0c306adc-2054-4dc5-a6a3-2e6258041cbb",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "ghost-members-ssr",
              "value": "someone+local@gmail.com",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "ghost-members-ssr.sig",
              "value": "H_hfoui60lGC6gsDxTR9TygUekY",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "__stripe_sid",
              "value": "8bdba364-585f-452c-bb8a-fdf9efba6e1a",
              "expires": null,
              "httpOnly": false,
              "secure": false
            }
          ],
          "headersSize": 995,
          "bodySize": 221,
          "postData": {
            "mimeType": "multipart/form-data; boundary=----WebKitFormBoundaryH5YvVtRrahApOO9a",
            "text": "------WebKitFormBoundaryH5YvVtRrahApOO9a\r\nContent-Disposition: form-data; name=\"membersfile\"; filename=\"subscribers.2019-11-18.csv\"\r\nContent-Type: application/vnd.ms-excel\r\n\r\n\r\n------WebKitFormBoundaryH5YvVtRrahApOO9a--\r\n",
            "params": [
              {
                "name": "membersfile",
                "value": "(binary)"
              }
            ]
          }
        },
        "response": {
          "status": 415,
          "statusText": "Unsupported Media Type",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Cache-Control",
              "value": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0"
            },
            {
              "name": "Content-Type",
              "value": "application/json; charset=utf-8"
            },
            {
              "name": "ETag",
              "value": "W/\"c1-+spDcJ7AZKvfnAXfE9rrqxkVlFU\""
            },
            {
              "name": "Vary",
              "value": "Origin, Accept-Encoding"
            },
            {
              "name": "Server",
              "value": "Microsoft-IIS/10.0"
            },
            {
              "name": "X-Powered-By",
              "value": "Express"
            },
            {
              "name": "X-Powered-By",
              "value": "ASP.NET"
            },
            {
              "name": "Access-Control-Allow-Origin",
              "value": "http://site.local"
            },
            {
              "name": "Date",
              "value": "Mon, 18 Nov 2019 21:14:54 GMT"
            },
            {
              "name": "Content-Length",
              "value": "193"
            }
          ],
          "cookies": [],
          "content": {
            "size": 193,
            "mimeType": "application/json",
            "compression": 0,
            "text": "{\"errors\":[{\"message\":\"An error occurred\",\"context\":null,\"type\":\"UnsupportedMediaTypeError\",\"details\":null,\"property\":null,\"help\":null,\"code\":null,\"id\":\"77693c90-0a48-11ea-b1cb-5d06c6113a74\"}]}"
          },
          "redirectURL": "",
          "headersSize": 447,
          "bodySize": 193,
          "_transferSize": 640
        },
        "cache": {},
        "timings": {
          "blocked": 5.6870000081062315,
          "dns": -1,
          "ssl": -1,
          "connect": -1,
          "send": 0.2589999999999999,
          "wait": 13.629000004885718,
          "receive": 1.8939999863505363,
          "_blocked_queueing": 4.129000008106232
        },
        "serverIPAddress": "127.0.0.1",
        "_initiator": {
          "type": "script",
          "stack": {
            "callFrames": [
              {
                "functionName": "send",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 875,
                "columnNumber": 6
              },
              {
                "functionName": "ajax",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 852,
                "columnNumber": 11
              },
              {
                "functionName": "_makeRequest",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 9134,
                "columnNumber": 21
              },
              {
                "functionName": "_makeRequest",
                "scriptId": "15",
                "url": "http://site.local/ghost/assets/ghost.min-3dfdb15f8aa66f72dabc9f3a70d2f875.js",
                "lineNumber": 1410,
                "columnNumber": 160
              },
              {
                "functionName": "n",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 2660,
                "columnNumber": 8
              },
              {
                "functionName": "request",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 9128,
                "columnNumber": 199
              },
              {
                "functionName": "post",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 9143,
                "columnNumber": 40
              },
              {
                "functionName": "generateRequest",
                "scriptId": "15",
                "url": "http://site.local/ghost/assets/ghost.min-3dfdb15f8aa66f72dabc9f3a70d2f875.js",
                "lineNumber": 131,
                "columnNumber": 23
              },
              {
                "functionName": "",
                "scriptId": "15",
                "url": "http://site.local/ghost/assets/ghost.min-3dfdb15f8aa66f72dabc9f3a70d2f875.js",
                "lineNumber": 129,
                "columnNumber": 98
              },
              {
                "functionName": "t.invoke",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 4249,
                "columnNumber": 152
              },
              {
                "functionName": "t.flush",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 4241,
                "columnNumber": 73
              },
              {
                "functionName": "t.flush",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 4254,
                "columnNumber": 357
              },
              {
                "functionName": "n._end",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 4317,
                "columnNumber": 8
              },
              {
                "functionName": "n.end",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 4273,
                "columnNumber": 229
              },
              {
                "functionName": "n._run",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 4319,
                "columnNumber": 117
              },
              {
                "functionName": "n._join",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 4318,
                "columnNumber": 245
              },
              {
                "functionName": "n.join",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 4284,
                "columnNumber": 12
              },
              {
                "functionName": "h",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 3134,
                "columnNumber": 27
              },
              {
                "functionName": "",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 2821,
                "columnNumber": 251
              },
              {
                "functionName": "a",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 3043,
                "columnNumber": 138
              },
              {
                "functionName": "handleEvent",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 2821,
                "columnNumber": 188
              },
              {
                "functionName": "handleEvent",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 2734,
                "columnNumber": 568
              },
              {
                "functionName": "",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 2759,
                "columnNumber": 15
              },
              {
                "functionName": "dispatch",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 666,
                "columnNumber": 403
              },
              {
                "functionName": "g.handle",
                "scriptId": "14",
                "url": "http://site.local/ghost/assets/vendor.min-6bed2c0a747d3a5f97977266dc8fc874.js",
                "lineNumber": 661,
                "columnNumber": 240
              }
            ]
          }
        },
        "_priority": "High",
        "_resourceType": "xhr",
        "connection": "619527"
      }
    ]
  }
}

This is the issue - Windows with Excel installed changes the mime type to something we don’t recognise :woman_shrugging:

I’ve pushed a patch that should fix this issue, it will be available in the next release.