shlink: YOURLS Import: SQL errors 'Invalid datetime format'

Hi there again,

just tried to re-setup shlink (latest version) and finally get my old YOURLS installation imported. I had already successfully test-imported another YOURLS instance some weeks ago with your plugin enabled, which didn’t produce those errors. Unfortunately the import now seems to go through, but at the end of importing there are three error messages thrown by the importer concerning datetime format:

In ExceptionConverter.php line 119:

An exception occurred while executing a query: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string valu e: ‘\xF0\x9F\xA6\x94’ for column shlink.short_urls.title at row 1

In Exception.php line 26:

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9F\xA6\x94’ for column shlink.shor t_urls.title at row 1

In Statement.php line 95:

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9F\xA6\x94’ for column shlink.shor t_urls.title at row 1

Here is what I do:

  1. Install shlink and set my future shlink main domain, e.g. myshorts.com (currently pointed to a YOURLS instance), as the default domain. No errors.
  2. Point a different domain to the shlink installation and add it to your web interface, e.g. tempdomain.com. Adds successfully.
  3. Starting the import. Import seems to get and import all URLs, only to stop with above error messages. Database as well as the web interface show that none of the URLs and visits have been imported.

Did I do something wrong along the way?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

Hmm. I thought I had that covered, but obviously, I didn’t 😅

The titles cannot be longer than 512 characters.