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

PHP Warnings When Creating Product Attribute Values with Asian Characters #5314

Closed
BFTrick opened this issue Apr 11, 2014 · 2 comments
Closed
Labels
status: won't fix The issue won’t be fixed. type: bug The issue is a confirmed bug.

Comments

@BFTrick
Copy link
Contributor

BFTrick commented Apr 11, 2014

You get a bunch of PHP Warnings when you try to create new product attribute values when the value is made up of asian characters (ex. 資料庫版本, or 資料).

Notice: Trying to get property of non-object in /Users/patrick/Documents/woothemes/woocommerce/wp-includes/link-template.php on line 685

If you refresh the page the errors go away.

__woocommerce_github__wordpress

Related: https://woothemes.zendesk.com/agent/#/tickets/166248

@BFTrick BFTrick added the Bug label Apr 11, 2014
@mikejolley
Copy link
Member

@coenjacobs I've traced this back to the way these screens get the taxonomy being displayed.

This is the culprit: https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/screen.php#L413

  1. So we have a registered taxonomy which contains UTF-8 chars. pa_資料庫版本
  2. After adding any term, this sanitize key turns pa_資料庫版本 into just pa
  3. the taxonomy is not loaded because it doesn't 'exist'.

Removing the sanitize_key fixes the issue. Patch/raise issue on trac?

@mikejolley
Copy link
Member

I've logged this issue here: https://core.trac.wordpress.org/ticket/28058#ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: won't fix The issue won’t be fixed. type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

2 participants