Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webservices issue with alias creation #38472

Open
MayaSima opened this issue Aug 16, 2022 · 3 comments
Open

Webservices issue with alias creation #38472

MayaSima opened this issue Aug 16, 2022 · 3 comments

Comments

@MayaSima
Copy link

MayaSima commented Aug 16, 2022

Steps to reproduce the issue

Send a POST request to create a new article with a title that contains an em dash

Expected result

"data": {
"type": "articles",
"id": "409",
"attributes": {
"typeAlias": "com_content.article",
"id": 409,
"asset_id": 944,
"title": "We Need Moratorium on Gun Sales — ‘Time to Repeal the 2nd Amendment’",
"alias": "we-need-moratorium-on-gun-sales-time-to-repeal-the-2nd-amendment",
...
}
}

Actual result

"data": {
"type": "articles",
"id": "409",
"attributes": {
"typeAlias": "com_content.article",
"id": 409,
"asset_id": 944,
"title": "We Need Moratorium on Gun Sales — ‘Time to Repeal the 2nd Amendment’",
"alias": "we-need-moratorium-on-gun-sales---time-to-repeal-the-2nd-amendment",
...
}
}

System information (as much as possible)

Joomla! 4.1.5 Stable [ Kuamini ] 21-June-2022 14:00 GMT
MySQL 8.0.30
PHP 8.0.22

Additional comments

When sending a POST request to create a new article (end point {{base_path}}/api/index.php/v1/content/articles), the alias doesn't get generated correctly if the article title contains an em dash.
It gets fixed after you open an article in the editor and save and close it.

@brianteeman
Copy link
Contributor

The character you have posted in your example is not a hyphen. It looks like an em-dash —

@MayaSima
Copy link
Author

Yes I meant an em dash. It happened a while ago and I was testing a lot with hyphens and first thought it was an issue with hyphens, but it is not.

@MayaSima
Copy link
Author

I fixed the issue description

@Hackwar Hackwar added the bug label Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants