- 🇮🇳India prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan
Re-roll The patch For 10.1 because Patch is Faild To apply.
I created a view with context filters and several fields. So, I expected to see them within Replacement Patterns but there were only patterns from Context Filter.
That was a disappointment, however when I tried to test Replacement Patterns which were not in the list - they worked.
The problem is within generating Replacement Pattern list:
core\modules\views\src\Plugin\views\area\TokenizeAreaPluginBase.php:81
This:
foreach (array_keys($options) as $type) {
if (!empty($options[$type])) {
$items = array();
foreach ($options[$type] as $key => $value) {
$items[] = $key . ' == ' . $value;
}
$form['tokens']['tokens'] = array(
'#theme' => 'item_list',
'#items' => $items,
);
}
}
Should be changed to this:
$items = array();
foreach (array_keys($options) as $type) {
if (!empty($options[$type])) {
foreach ($options[$type] as $key => $value) {
$items[] = $key . ' == ' . $value;
}
}
}
$form['tokens']['tokens'] = array(
'#theme' => 'item_list',
'#items' => $items,
);
$options has 2 keys: 'fields' and 'context'. And $form['tokens']['tokens'] rewrites the first 'fields' values with 'context' ones.
Problem persists for 8.1.x dev.
Please add a fix to this issue to the new version :)
Needs work
10.1 ✨
Last updated
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Re-roll The patch For 10.1 because Patch is Faild To apply.