feed-me icon indicating copy to clipboard operation
feed-me copied to clipboard

Slugs with underscores not being updated via Feed Me

Open tadward opened this issue 6 years ago • 2 comments

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

tadward avatar Sep 11 '19 18:09 tadward

Same problem. @tadward Did you figure this out?

seamusmh avatar Aug 13 '20 17:08 seamusmh

Same problem here, very annoying since we can save the slug manually with underscores, but not if we use feed me for some reason...

desaulniers13 avatar Mar 11 '22 14:03 desaulniers13

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.

i-just avatar Jun 30 '23 10:06 i-just

Resolved in https://github.com/craftcms/feed-me/pull/1342 for the next v4 and v5 releases.

angrybrad avatar Jul 04 '23 02:07 angrybrad