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

Coauthors with non-english characters are not assigned to posts #481

Closed
ituk opened this issue Feb 1, 2018 · 5 comments
Closed

Coauthors with non-english characters are not assigned to posts #481

ituk opened this issue Feb 1, 2018 · 5 comments

Comments

@ituk
Copy link

ituk commented Feb 1, 2018

Coauthors with non-english characters are not assigned to posts at all. I can create them, or use existing ones from the past, but cannot assign them to posts. in addition, non english display names are not encoded in the autocomplete ajax box.

Steps to reproduce:

  1. use an existing or add a new coauthor with non-english unique slug. e.g איתמר-מגד
  2. in post edit screen, find the coauthor and choose it.
  3. delete the original author.
  4. save post.
    => nothing changes.

Assigning non-english slug coauthors with 2.7-alpha1 version of the plugin works perfectly.

Thanks,
Itamar

@philipjohn
Copy link
Contributor

Hiya, thanks for the detailed steps to reproduce! Could you confirm that the exact steps steps with English characters has different behaviour? I want to be sure this is a character issue and not something wider.

Assigning non-english slug coauthors with 2.7-alpha1 version of the plugin works perfectly.

Can you confirm what this refers to please? I'm not aware of a 2.7-alpha1, and the latest verison is 3.2.2.

Thanks!

@ituk
Copy link
Author

ituk commented Mar 2, 2018

Hey and thanks for the reply,
first, - yes I've checked the plugin functionality with the same exact steps but with English characters, and it worked just fine.

About the plugin version, I somehow downloaded it a few years ago from another github repository, though I can't find the source right now. I see this fork here, although it doesnt have a 2.7 version. weird.
Anyhow, I've now creayed a new repository with this 2.7-alpha1 version. please find it here, and i should delete it after the fixes have been done.

@JayWood
Copy link

JayWood commented Sep 19, 2018

Following this, ran into it on a client project today with Japanese characters. Will provide further testing at a later point. But my version is 3.2.2 currently. Will do further testing with current version but from what I can tell is the following:

When saving a guest author with non-english characters, the display-name, and subsequent post name is passed through sanitize_title() which handles UTF8 encoding by WordPress' core sanitize_with_dashes() which looks and sees if seems_utf8() is true or not, and if so, it will utf8_uri_encode() the title.

However, in the dropdown, the $user->nicename is coming in as the URI encoded counterpart, at least for us. Resulting in double encoding, or improper encoding when saving the post, therefore the author is never found.

While I do have a workaround currently, I want to confirm this is still an issue with the core plugin itself, without our theme-based modifications.

@JayWood
Copy link

JayWood commented Sep 20, 2018

I was able to confirm this evening that this is no longer a valid issue on either master or the 3.3.0 tag.

@rebeccahum
Copy link
Contributor

Thanks for letting us know @JayWood. I'll close this for the time being then.

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