diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7a45e1013668a7859fa1849d0ba8ee9ab7d8f575..816f5290887f6119c50ca1d08a07560da36a5555 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -31,6 +31,7 @@ Add a couple of support functions for ctools_set_page_token that are meant to be #424548: Add a warning about overridng pager settings with Views AJAX. #555802: Add an administrative title to custom content panes to make them easier to manage. #556870: Node edit settings form context autocomplete was not working correctly. +#491884 by ayalon: Provide blank substitutions for optional contexts that do not appear. ctools 6.x-1.0 ============== diff --git a/includes/context.inc b/includes/context.inc index c1ff54861f1b970259dbd5385d443f6f388e5b09..ac450ec33a959a20ce7134eb029e4d99fd7a26f8 100644 --- a/includes/context.inc +++ b/includes/context.inc @@ -613,6 +613,9 @@ function ctools_context_keyword_substitute($string, $keywords, $contexts) { if (isset($context_keywords[$context])) { $keywords['%' . $keyword] = ctools_context_convert_context($context_keywords[$context], $converter); } + else { + $keywords['%' . $keyword] = ''; + } } else { if (isset($context_keywords[$keyword])) {