This is the D7 sister issue for #1960612: jQuery UI 1.10 update broke Create.js, and thus in-place editing. The patch in #3 contains the solution.

In D7 this can happen when you install the jQuery Update module, which in its most recent dev snapshot also uses jQuery UI 1.10.

What's tricky here in D7 though is that we must support both the jQuery UI version that ships with D7 core as well as jQuery UI 1.10…

Comments

wim leers’s picture

wim leers’s picture

Status: Active » Postponed

AFAICT it is impossible to be compatible with both jQuery UI 1.8 and 1.10 without hacks. So, the solution to this issue:

  1. depends on the answer to https://github.com/bergie/create/issues/173#issuecomment-15950653 -> this will determine whether Create.js will be compatible with both
  2. if the answer is "Create.js will support jQuery UI 1.10 only", then Edit module must declare a dependency on jQuery Update >= 7.x-2.4 (which is not yet released).
wim leers’s picture

StatusFileSize
new7.41 KB

In the meantime, here's a 1:1 port of #1960612-3: jQuery UI 1.10 update broke Create.js, and thus in-place editing to D7. If the OP were to apply this patch, then all should be well.

kriboogh’s picture

I can confirm the patch in #3 works

wim leers’s picture

Thanks for confirmation :)

OnkelTem’s picture

The patch from #3 does't apply on the latest git vesion of Edit (commit 291fea80598adfa27ea85074e73205e869052dcd)

OnkelTem’s picture

StatusFileSize
new6.78 KB

Here is the updated version of the patch from #3.
I confirm it fixes jQuery UI 1.10.x issues but breaks old jQuery UI :)
So it's need to be updated so that both old and new jQuery UIs get working.

OnkelTem’s picture

StatusFileSize
new59.59 KB

Not everything goes smooth though.
I can successfuly edit and save text fields, but body field isn't saved.
When I click to edit a body field, error message arises (sorry for missed formatting):

jquery.min.js:2
Uncaught TypeError: Object #<Object> has no method 'inline'
jQuery.widget._ckeditor_attachInlineEditor
e.isFunction.l.(anonymous function) jquery.ui.widget.min.js:4
jQuery.widget.stateChange
e.isFunction.l.(anonymous function) jquery.ui.widget.min.js:4
Drupal.edit.EditAppView.Backbone.View.extend.editorStateChange app.js:309
$element.createEditable.statechange app.js:95
e.Widget._trigger jquery.ui.widget.min.js:4
jQuery.widget._doSetState create-editonly.js:467
e.isFunction.l.(anonymous function) jquery.ui.widget.min.js:4
(anonymous function) create-editonly.js:446
Drupal.edit.EditAppView.Backbone.View.extend.acceptEditorStateChange app.js:245
jQuery.widget.setState create-editonly.js:444
e.isFunction.l.(anonymous function) jquery.ui.widget.min.js:4
propertyElement.enablePropertyEditor.activated create-editonly.js:582
jQuery.widget.stateChange
e.isFunction.l.(anonymous function) jquery.ui.widget.min.js:4
Drupal.edit.EditAppView.Backbone.View.extend.editorStateChange app.js:309
$element.createEditable.statechange app.js:95
e.Widget._trigger jquery.ui.widget.min.js:4
jQuery.widget._doSetState create-editonly.js:467
e.isFunction.l.(anonymous function) jquery.ui.widget.min.js:4
(anonymous function) create-editonly.js:446
Drupal.edit.EditAppView.Backbone.View.extend.acceptEditorStateChange app.js:245
jQuery.widget.setState create-editonly.js:444
e.isFunction.l.(anonymous function) jquery.ui.widget.min.js:4
Drupal.edit.views.PropertyEditorDecorationView.Backbone.View.extend.onClick propertyeditordecoration-view.js:138
p.event.dispatch jquery.min.js:2

Screenshot:
35.png

wim leers’s picture

Yes, the patch to update Create.js indeed breaks old jQuery UI, which is why I haven't committed this yet :)

For a solution to that, see https://github.com/bergie/create/issues/173#issuecomment-15951454

I'm currently waiting for feedback to see how the Create.js maintainer wants to see that implemented: https://github.com/bergie/create/issues/173#issuecomment-16567518

OnkelTem’s picture

Category: task » bug
StatusFileSize
new6.78 KB
new814 bytes

I finally managed to get editing working, with a proviso though.

1) "has no method 'inline'" message was related to CKEditor. After I upgraded the library to 4.1, editing started working.
2) However, I ran into another problem. If there is only one textarea field on a page for which ckeditor is used, editing doesn't work and error message arises:

Uncaught TypeError: undefined is not a function          jquery.ui.widget.js:71
(anonymous function)
(anonymous function)
jQuery.extend.globalEval                                 jquery.js:564

which actually occurs in the line of drupalckeditorwidget.js:

jQuery.widget('Midgard.ckeditor', jQuery.Midgard.direct, {

but jQuery.Midgard.direct is defined in drupalcontenteditablewidget.js which is not loaded. Perhaps jQuery.Midgard.editWidget should be used here. Patch is provided.

OnkelTem’s picture

Category: bug » task

I occasionally changed to bug report. Changing it back.

wim leers’s picture

What you reported in #10 is already fixed in alpha 11, in this commit: http://drupalcode.org/project/edit.git/commit/291fea8 :)

OnkelTem’s picture

I made this fix for your patch, not for the master branch.

Does this mean the patch from #3 is not required anymore?

Renee S’s picture

A head's up, it looks like the maintainer of Create.js has pushed some changes to make it compatible with both 1.10 and < 1.10.

Peribanu’s picture

Can anyone confirm what the current fix is for 7.x-1.x-dev? The download being offered from the Spark project page dated 10th May is still broken.

wim leers’s picture

Issue tags: -sprint

That was wrong for a while now.

#15: sorry for our unresponsiveness; we're working very hard to get everything as stable as possible in D8 before July 1. Expect massive progress and super smooth experience shortly after July 1!

wim leers’s picture

That was wrong for a while now.

#15: sorry for our unresponsiveness; we're working very hard to get everything as stable as possible in D8 before July 1. Expect massive progress and super smooth experience shortly after July 1!

wim leers’s picture

That was wrong for a while now.

#15: sorry for our unresponsiveness; we're working very hard to get everything as stable as possible in D8 before July 1. Expect massive progress and super smooth experience shortly after July 1!

wim leers’s picture

That was wrong for a while now.

#15: sorry for our unresponsiveness; we're working very hard to get everything as stable as possible in D8 before July 1. Expect massive progress and super smooth experience shortly after July 1!

pjezek’s picture

StatusFileSize
new73.69 KB

Hi,

I just discovered that this affects me as well.
For now I use this workaround with 7.x-1.0-alpha9+0-dev:
Settings jQuery to use 1.5 as default jQuery version and 1.7 in Admin. (see screenshot)

jQuery_spark.png

pjezek’s picture

Issue summary: View changes

Updated issue summary.

socialnicheguru’s picture

#10 patch, https://drupal.org/files/create_js_jquery_ui_1_10-1962274-10.patch, worked for me on Drupal 7.

I have jquery_update 1.7, jquery 1.10. I need 1.7 because of other modules

wim leers’s picture

Issue summary: View changes
Status: Postponed » Closed (won't fix)

I'm currently working on backporting Drupal 8's implementation of in-place editing. That implementation no longer depends on Create.js. Consequently, the incompatibility with jQuery 1.10 will be fixed as well.

(Drupal 8 uses jQuery 2.0.3, so expect compatibility with that version as well.)