Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers’s picture

Status: Active » Needs work
FileSize
6.18 KB
  • Rebuilt our minimal build of Create.js from HEAD of Create.js' master branch.
  • Made superficial changes to stay compatible with Create.js (some namespace changes).
  • Still broken :(
Wim Leers’s picture

Wim Leers’s picture

Status: Needs work » Needs review
FileSize
2.86 KB
7.51 KB

Got everything working again based on feedback from bergie.

Wim Leers’s picture

A straight backport of #3 to D7 Edit was confirmed working: #1962274-4: jQuery UI 1.10 compatibility.

Can we please get this reviewed & committed ASAP, so that Edit works again in D8? Thanks.

jessebeach’s picture

FileSize
257.18 KB

I get a JS error when quick editing a node (simple Article from the front page view listing)

Screenshot of a JavaScript thrown after clicking the Quick edit link from a nodes contextual links.

jessebeach’s picture

Going through the stack, we're finding the predicate element (the body field) correctly.

Screen_Shot_2013-04-05_at_11.48.02_AM.png

jessebeach’s picture

FileSize
115.51 KB

The call to this function

this._params(predicate)

seems to be failing. It's in file create-editonly.js around line 600.

Screenshot_4_5_13_11_53_AM.png

jessebeach’s picture

Hmmm, and now it appears to be working. Maybe I just had a cached version of the JS file. Sigh.

jessebeach’s picture

I'm getting an AJAX error when attempting to save a body field from Quick edit.

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /index.php/edit/form/node/1/body/und/full
StatusText: OK
ResponseText: Recoverable fatal error: Argument 1 passed to Drupal\file\FileUsage\DatabaseFileUsageBackend::add() must be an instance of Drupal\file\Plugin\Core\Entity\File, boolean given, called in /Users/jbeach/code/drupal/core/d8/core/modules/file/file.field.inc on line 267 and defined in Drupal\file\FileUsage\DatabaseFileUsageBackend->add() (line 51 of /Users/jbeach/code/drupal/core/d8/core/modules/file/lib/Drupal/file/FileUsage/DatabaseFileUsageBackend.php).
Wim Leers’s picture

I'm working with Jesse on figuring out #9, but I can't reproduce it locally, nor on simplytest.me, nor can she on a fresh install. It looks like it was something on her system.

jessebeach’s picture

Status: Needs review » Reviewed & tested by the community

So, Wim and I verified that the AJAX error I'm seeing is not present on simplytest.me. I'm investigating my local setup further, but it seems that the errors I'm getting have to do with my local setup and not this patch.

jessebeach’s picture

Status: Reviewed & tested by the community » Needs work

Nah nah nah, not so fast. I looked into my local error further and found that when the language module is enabled, I get the error in #9 when saving an in-place edited field.

The trigger for this error may be something we stumbled upon with this patch instead of introduced. The ultimate cause is still unknown. From my attempts to debug, I can't get a breakpoint to catch in the functions mentioned in the error. The error feels like a red herring.

Wim Leers’s picture

Status: Needs work » Reviewed & tested by the community

1) This patch only modifies JavaScript.
2)This patch cannot have changed the data that gets sent to the server.

Hence you've discovered a bug that must already have existed before this patch. Please open a new issue for it (or I will). We should go back to the commit before jQuery UI 1.10 and there it should occur as well.

jessebeach’s picture

Agreed with #14. I'm putting together the findings from my debugging of the AJAX issue and opening a new ticket. I'll link it here. What this patch here does is expose what has been dormant in the field code before now.

jessebeach’s picture

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Hm. That's sub-optimal, but it'd definitely be good to get this working at all again.

Committed and pushed to 8.x. Thanks.

Incidentally, this makes me cranky:

+++ b/core/misc/create/create-editonly.jsundefined
@@ -964,7 +964,7 @@
-  jQuery.widget('Create.halloWidget', jQuery.Create.editWidget, {
+  jQuery.widget('Midgard.halloWidget', jQuery.Midgard.editWidget, {

And especially this:

+++ b/core/modules/edit/js/createjs/editingWidgets/drupalcontenteditablewidget.jsundefined
@@ -8,7 +8,7 @@
-  jQuery.widget('DrupalEditEditor.direct', jQuery.Create.editWidget, {
+  jQuery.widget('Midgard.direct', jQuery.Midgard.editWidget, {

Midgard is a different CMS project entirely, it doesn't really make sense to pull their namespace into our project. However, it looks like according to https://github.com/bergie/create/issues/173, having that string hard-coded to "Midgard" is this is an upstream issue, hopefully will be resolved with a subsequent Create.js update.

Wim Leers’s picture

RE: "incidentally": It's "just" jQuery UI Widgets namespacing working in very very unexpected ways. It annoys the hell out of me too.

(The Drupal 8 equivalent would be: "plugins for Drupal 8 only work if you declare them in the 'Drupal' namespace".)

Wim Leers’s picture

Issue tags: -sprint

Thanks for the follow-up issue, Jesse! I assigned it to myself to ensure I investigate it further.

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