Needs review
Project:
CKEditor Link
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2015 at 10:43 UTC
Updated:
5 Oct 2015 at 13:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jurgenhaasComment #2
anrikun commentedHi Jurgen! Can you provide a concrete example in order to reproduce the possible bug you describe?
Comment #3
jurgenhaas@anrikun, here is our scenario:
In a body field we have a link to /taxonomy/term/955 as an example. The filter gets processed and we end up in _ckeditor_link_filter_process($matches, $langcode = NULL) with a
$langcode='de'in our case.The following lines of code are now demonstrating the problem:
$types contains a few items and two of them are "taxonomy" and "i18n_taxonomy" in this order. That's why "taxonomy" gets tested first and there
$url = $func($path, $langcode);returns a $url which points to the English version of the term although $langcode is German. This is no surprise, because "taxonomy" is not multilingual. But as it returns a value for $url, no further loops are taken, that result gets used and it is the wrong one.If "i18n_taxonomy" were tested first, then this wouldn't have happened, because that returns the correct url for the given $langcode.
Comment #4
jurgenhaasRe-rolled for drush make.