I'm getting the same message in the search box when I try to use Coffee as in #2139475: Could not load data, please refresh the page:

"Could not load data, please refresh the page"

Every time when I try to run coffee it generates a long PHP error message in the log (see attached txt file – personal info was removed).

Drupal 8.2.1, PHP5.6.10, MySQL 5.5.42 (allowed memory is 256MB)

This is a Hungarian / English bilingual site, default language is Hungarian.

Of course I tried to flush the cache but it did not help. In some cases when I switched the site from Hungarian to English it worked but than it went wrong again in English too.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thamas created an issue. See original summary.

willzyx’s picture

Status: Active » Closed (duplicate)

@thamas thanks for reporting.
Please can you try the dev version and see if the problem is still reproducible?
Closing this issue as duplicate of #2762487: Conflicts with core "Configuration translation" module

deveshkumar’s picture

diff --git a/coffee.module b/coffee.module
index 72e5761..182e01b 100644
--- a/coffee.module
+++ b/coffee.module
@@ -41,7 +41,7 @@ function coffee_page_attachments(array &$attachments) {
$cache_tags = isset($attachments['#cache']['tags']) ? $attachments['#cache']['tags'] : [];
$attachments['#cache']['tags'] = Cache::mergeTags($cache_tags, $config->getCacheTags());

- $data_path = Url::fromRoute('coffee.get_data')->toString();
+ $data_path = Url::fromRoute('coffee.get_data')->getInternalPath();

$attachments['#attached']['library'][] = 'coffee/drupal.coffee';
$attachments['#attached']['drupalSettings']['coffee'] = [

deveshkumar’s picture

Musa.thomas’s picture

Musa.thomas’s picture

FileSize
630 bytes

wrong patch

sitewits’s picture

Still happening on D9, running version 1.x-dev with the patch, rebuilt caches and routing/links in particular. What's the quickest way to debug it? I'll send fixes