Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The following warning is thrown when running tests that visit search pages with facets.
User warning: Attempting to perform token replacement for token type facetapi_results without required data in token_tokens() line 912 of contrib/token/token.tokens.inc.
To replicate this error on an actual site, comment out the lines that check whether you're running a test in token.tokens.inc of the token module:
// if (!empty($GLOBALS['drupal_test_info']['test_run_id'])) {
// Only check when tests are running.
$type_info = token_get_info($type);
if (!empty($type_info['needs-data']) && !isset($data[$type_info['needs-data']])) {
trigger_error(t('Attempting to perform token replacement for token type %type without required data', array('%type' => $type)), E_USER_WARNING);
}
// }
And navigate to a search page with facet.
Comment | File | Size | Author |
---|---|---|---|
#1 | facetapi-fix_missing_data_warnings_during_tests-2419817-1.patch | 468 bytes | Joanna_Kisaakye |
Comments
Comment #1
Joanna_Kisaakye CreditAttribution: Joanna_Kisaakye commentedThis small patch fixes the issue.