How to reproduce:

Installed Drupal 8 beta10.
Installed coffee via drush en -y coffee (also tried latest version from git)
Cleared caches (drush cr all)
Reloaded the page
Pressed Alt + d
-> Nothing happens. No JS errors

What the problem may be:

$('body').once('coffee', function () { ... } in coffee.js on line 36 is not being executed, even though jquery-once is loaded correctly (and works for other modules)

CommentFileSizeAuthor
#6 D8.0.gif20.3 KBsimone960
#4 coffee.png33.64 KBaxe312
#2 coffee-fix_once-2486843-2.patch790 bytesyannickoo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

axe312’s picture

Any progress here? I am really missing coffee in Drupal 8 :(

yannickoo’s picture

Title: [Drupal 8] Coffee does not work » Fix compatibility with jQuery Once
Status: Active » Needs review
FileSize
790 bytes

I have found the error in this case, we have to use .each() from now when using jQuery Once. After applying the patch you should be able to open and use Coffee.

Have fun with Coffee for D8 guys :)

yannickoo’s picture

Title: Fix compatibility with jQuery Once » Fix jQuery Once implementation
Related issues: +#2559347: Fix node type label

Sorry for renaming it again. FYI I have uploaded another patch which fixes the label of node types in the result list: #2559347: Fix node type label.

axe312’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
33.64 KB

Thx. Works like charm with Drupal 8 - beta 15 and applies on latest coffee dev version.

eloivaque’s picture

patch #2 it's works form me on drupal 8 rc1 thanks

simone960’s picture

FileSize
20.3 KB

I have applied the patch to D8.0, the search box come out but there's message inside the box

Could not load data, please refresh the page

But refreshing the page is the same, not working. Can someone try out and confirm ? Thanks !

yannickoo’s picture

Can you show us the message(s) in your browser's console?

simone960’s picture

Here is the one in my console:

GET http:// mydomain/admin/undefinedadmin/coffee/get-data 404 (Not Found)

jquery.js:8630

This jquery.js is linked to http:// mydomain/core/assets/vendor/jquery/jquery.js

yannickoo’s picture

Are you sure you are using the latest version? I guess this was fixed in #2425397: Fix property name for basePath.

simone960’s picture

I'm using the latest version (Date: 2015-Apr-20). The basePath's patch you mentioned was not committed yet to the latest I'm afraid. However, I have applied the patch to the latest and now the message in the console like this:

Drupal 8.0.0 on the remote hosting:

GET http:// mydomain/admin/coffee/get-data 500 (Internal Server Error) jquery.js:8630

Drupal 8.0.0 on the local computer :

Failed to load resource: the server responded with a status of 404 (Not Found)

http:// localhost/admin/coffee/get-data

Perhaps it's best that any of you try to install the latest coffee module on the Drupal 8.0.0 and see whether it is really work on the stable release.

  • willzyx committed 5f32fe5 on 8.x-1.x authored by yannickoo
    Issue #2486843 by yannickoo: Fix jQuery Once implementation
    
willzyx’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks all!

@simone960 try to install the latest DEV version of coffee.
If you think that the problem still exists please open another issue

simone960’s picture

Thanks ! @willzyx. It works perfectly now !

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

aiphes’s picture

See new issue furthermore.