On the node/%/translate tab, you get a "Node title mismatch: Please check your selection" if one or more of the referenced translations contain a special character in it's title.
See the image.
Source of the problem: the title being displayed in the autocomplete textfields are run through check_plain().
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | node_title_mismatch-1920216-1.patch | 503 bytes | mbopp |
| #1 | node_title_mismatch-1920216-1.patch | 503 bytes | rp7 |
| i18n_title_mismatch.JPG | 47.11 KB | rp7 |
Comments
Comment #1
rp7 commentedPatch attached. Removed the run through check_plain().
Don't see this being done in other modules, eg. References, either.
Comment #2
ykyuen commentedI have a similar problem but the patch in #1 could not solve it.
i want to map a simplified chinese node to traditional chinese node. after i submit the translation set, it throws "Node title mismatch: Please check your selection".
so i looked into the i18n_node.pages.inc and find the problem is on the validation.
i write the $title and $node->title to watch dog. the string is exactly the same. and i check them with mb_detect_encoding and both of them are utf8.
any idea?
Comment #3
ykyuen commentedI finally find a solution to solve the problem. that is wrap the strings by trim() before comparison.
Comment #4
mbopp commentedI can confirm that the issue (in my case, having apostrophes in the title) is resolved using the patch RaF provided in #1. It's hard to determine if this is the best workaround or not as the check_plain may be needed in some instances. In any case, testing this some more and rolling it into the project would be worth while. Changing status to "needs review" and re-attaching .patch file to get this process started.
Thanks RaF
Comment #5
jose reyero commentedRight, we don't need the check_plain() there that causes a double 'check_plain' when the form element attributes are processed.
Thanks.
@ykyuen,
If this doesn't fix your issue, which may be a different one, please create a new issue.