Slugs with underscores not being updated via Feed Me
Description
Recently tested on version 3.2.10 and latest version 3.3.2, when updating Entries using Feed Me and the slug is different, the slug doesn't get updated.
Old slug: entry-item-1 New slug: entry_item_1
The Old Slug remains and doesn't get updated. This wasn't an issue on a recent import/update on a Craft site version 3.1.33 as the slugs updated with the underscores.
I am importing using Feed Me and feed type is XML. My unique identifier is the entry id.
Steps to reproduce
Additional info
- Craft version: 3.2.10 and 3.3.2
- PHP version: 7.1.12
- Database driver & version: MySQL 5.6.38
- Plugins & versions: Feed Me 4.1.2
Same problem. @tadward Did you figure this out?
Same problem here, very annoying since we can save the slug manually with underscores, but not if we use feed me for some reason...
Hi all, thanks for reporting and apologies for the late response.
I raised a PR to adjust the slug-importing behaviour. If the slug in the feed is considered valid, it will be used; otherwise, it will do what it does now - run it through the _createSlug() method, which will turn it into a kebab-cased string.
It’s also worth noting that there’s a slugWordSeparator config, which allows you to change the character(s) that should be used to separate words in slugs.
Resolved in https://github.com/craftcms/feed-me/pull/1342 for the next v4 and v5 releases.