processwire-issues icon indicating copy to clipboard operation
processwire-issues copied to clipboard

Creating pages via API with only the title can result in double dashes in name

Open adrianbj opened this issue 4 years ago • 1 comments

Short description of the issue

If you create a page titled: Test: me via the API, it gets named: test--me

Expected behavior

Double dashes should be removed, just like they are when creating a page via the admin GUI.

adrianbj avatar Mar 08 '21 05:03 adrianbj

@ryancramerdesign - I am also seeing --- when entering a title like: "National Academy of Science and Technology - The Philippines" on some servers when creating pages via the "Allow new pages to be created from field?" option for Page references fields with the Page Auto Complete inputfield.

The seems to result from a pageName instead of pageNameTranslate sanitizer, although I am not certain if that is the cause here or not.

image

I know this is not via the API, but perhaps because of the way pages are created from a Page reference field, it results in this issue as well?

adrianbj avatar May 12 '21 22:05 adrianbj