wordpress-to-statamic-exporter icon indicating copy to clipboard operation
wordpress-to-statamic-exporter copied to clipboard

Emoji in URLs cause chaos

Open rosswintle opened this issue 6 years ago • 0 comments

This is an edge case. Not sure how hard to fix. COULD be a Statamic issue rather than an export-plugin issue.

Looks like at some point I tried putting an emoji in a WP post's URL/slug: https://rosswintle.uk/2017/07/sorry-robin-%f0%9f%99%81/

This ends up encoded as "%f0%9f%99%81"

Which imports OK but end up as a file in Statamic named 2017-07-16.sorry-robin-%f0%9f%99%81.md

Which causes Statamic to error:

[2019-05-02 15:57:41] dev.ERROR: Statamic\Exceptions\InvalidEntryTypeException: Entry date not present in a date-based entry: [collections/post/sorry-robin-%f0%9f%99%81.md] in /Users/rosswintle/projects/
statamic-test/statamic/core/Data/Entries/Entry.php:201

Not urgent. But thought I'd log it. Let me know if you want to try and fix:

  • Statamic - to pick this up on import or to read a file with this name
  • The export plugin: to export this with a sensible slug/name that Statamic will be OK with
  • Me: for putting an emoji in a slug in the first place!

rosswintle avatar May 02 '19 15:05 rosswintle