I installed the latest dev version, but I cannot make the module to work.
I don't see the dropdown menu with the quick edit link in it. I suppose it's a javascript error, since I get in the console:
Uncaught SyntaxError: Unexpected token <
and
Uncaught ReferenceError: _ is not defined
I have installed underscore and backbone js's and they seem ok in the status report.
Any hints?
| Comment | File | Size | Author |
|---|---|---|---|
| #35 | quick-edit-and-ck-editor-not-loading-2154891-35.patch | 1.14 KB | tomtech |
| #33 | quick-edit-and-ck-editor-not-loading-2154891-33.patch | 2.12 KB | tomtech |
Issue fork edit_poc-2154891
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
jvdkolk commentedFor me the same, also using the latest dev version.
Error I get:
Screenshot of Firebug http://i.imgur.com/Dy2shOi.png
Comment #2
wrd commentedI've had the same problem as well. I do see an empty list item in the HTML where the Quick Edit link should be.
Comment #3
wim leersThanks for the useful feedback!
Can you please look at the status report page and check if any problems are being reported by Edit module?
Comment #4
wim leersComment #5
yannisc commentedI get these errors, but I think it's only about CKEditor:
Edit: CKEditor library The CKEditor library is too old, please update to 4.2 or newer!
Edit: CKEditor's "Shared Space" plugin is included "Shared Space" CKEditor plugin missing
This plugin is essential for CKEditor to work with in-place editing.
Please create a custom build of CKEditor that includes this plugin.
Edit: CKEditor's "Source" button is used "Source Dialog" CKEditor plugin missing
This plugin is necessary to keep the "edit source" functionality while in-place editing.
Please create a custom build of CKEditor that includes this plugin.
underscore.js and backbone.js are detected and shown green.
Also, checked the permissions, admins are set to access in-place editing.
Comment #6
yannisc commentedComment #7
wim leers#5: You should fix those CKEditor errors, but that indeed means something else is wrong. Can you give me access to this site, so I can see for myself what's happening? If it's not publicly accessible: use my d.o contact form. Thanks!
Comment #8
wim leersyannisc gave me access to his site, and that was very helpful, because now I know what's going on :)
There are two problems:
data-edit-entity-idattribute that Edit sets from making it into the markup that gets sent to the user. I.e. this has no effect:So, you'll need to make sure your template allows additional attributes to come through.
It seems you're using Display Suite though, so maybe that's the culprit. Please let me know.
data-edit-entity-idattribute gets set just fine. In this case, a JS error occurs.You're using Backbone.js 1.1.0 and Underscore.js 1.5.2. That's fine. But the current version of Edit module requires 0.9.2 and 1.4.0, respectively. I'm working right now on fixing that in #2149237: Upgrade from Backbone 0.9.2 to >=1.0.0 and from Underscore 1.4.0 to >=1.5.0.
In other words: #2149237 should fix this for you :)
Comment #9
yannisc commentedThanks Wim for testing that!
Yes, I use display suite for the business content type.
As for the error with the updated js versions, I updated them because there was an error with the previous versions as well. Since, you'll fix the updated versions, I'll wait for your patch on #2149237.
Thanks again!
Comment #10
wim leersThank *you*, for helping making this module stable!
Comment #11
wim leers@yannisc: #2149237: Upgrade from Backbone 0.9.2 to >=1.0.0 and from Underscore 1.4.0 to >=1.5.0 just landed, please give it a try!
Comment #12
wrd commentedIt's...it's beautiful...
Comment #13
yannisc commentedStill doesn't work properly for me. Now the link is shown and I can enable quick edit, but there's no save button and I get this javascript error:
Uncaught ReferenceError: CKEDITOR is not defined
Wim, I have activated your account again on my site, if you want to try it out.
Comment #14
yannisc commentedI also get at the status report:
Warning: file_get_contents(/ckeditor.js) [function.file-get-contents]: failed to open stream: No such file or directory in edit_requirements() (line 81 of /sites/all/modules/edit/edit.install).
Maybe I have installed a wrong version of CKEditor? Which one should I install?
Comment #15
wim leersYou've got your CKEditor in
sites/all/modules/ckeditor/ckeditor/ckeditor.js, whereas it should be insites/all/libraries/ckeditor/ckeditor.js. I've added a check for that now: #2160093: CKEditor module allows CKEditor library to be installed inside the module rather than in sites/all/libraries, check this in status report.If you update before fixing the problem, you should see this:

Also, your status report indicates that your CKEditor build does not include the Shared Space plugin, which is essential. See the README for instructions.
Comment #16
wim leersAnd thanks for the great feedback, keep it coming! :)
Comment #17
yannisc commentedI updated the module. I got the status report message about having CKEditor on the wrong folder. I moved ckeditor to libraries. Everything works now!!!
Nice job Wim!
I think someone should update the documentation here: http://docs.cksource.com/CKEditor_for_Drupal/Open_Source/Drupal_7/Instal...
It recommends to install CKEditor in the ckeditor module, not in the libraries folder.
Also, I need (and suppose many more people) instructions on how to include the missing plugins in CKEditor. Which version should I download?
Comment #18
yannisc commentedok, I found out how to compile CKEditor with these 2 plugins, I did it and the errors are gone.
Again, I think documentation should be updated here: https://drupal.org/project/ckeditor and not direct people to download the full version.
Comment #19
yannisc commentedWhile quick edit works, CCK is not activating.
I get in full edit mode:
Notice: Undefined offset: 1 in location_cck_tokens() (line 622 of sites/all/modules/location/contrib/location_cck/location_cck.module).
Notice: Undefined index: in location_cck_tokens() (line 628 of sites/all/modules/location/contrib/location_cck/location_cck.module).
Comment #20
yannisc commentedThe above notices are not related to CKeditor, but to CCK Location. After I disabled CCK Location, the notices are gone.
CKEditor still is not working. I get this javascript error at ckeditor.js:
Uncaught TypeError: Cannot read property 'toolbar' of undefined
Comment #21
wim leers#17:
We can't do that: people may want to use CKEditor without using Edit, and hence also without the Libraries API module. Then the
sites/all/librariesdirectory wouldn't exist and installing it in the module directory would be fine. So it's an additional requirement, that's why we now have it in the Status Report :)The detailed instructions are in the README, and the high-level ones are in the Status Report. What more do you want? :)
#18:
We can't do that: people may want to use CKEditor without using Edit, in which case Edit's additional requirements don't apply.
#19: that's entirely unrelated. I see that happen all across your website.
#20: please clear your browser cache, close the tab you're testing in and then try again. It works fine for me on the test page you sent me! :)
Comment #22
wim leersFYI, I just tagged beta 1: https://drupal.org/node/2160191 :)
Comment #23
huma2000 commentedI'm getting also the same problem, no contextual link on my developing machine, there is no errors on the status page and all the js libraries and the ckaeditor are the last verions available.
My site is based on the spark profile, any ideas?
Comment #24
yannisc commentedYes, it worked after I cleared my browser's cache!
Congratulations, Wim for the beta1!!!
How about adding in the documentation of CKEditor that IF you want use CKeditor with the edit module, you should put ckeditor in the libraries folder and compile it with the 2 additional plugins?
Comment #25
yannisc commentedThere's also a usability problem on the same site I gave you access: The first time you use quickedit, the toolbar stays on top of the input box not letting you see what you type (screenshot here: http://d.pr/i/EHUX).
If you close the bar and you retry, it goes to the right position though.
Comment #26
huma2000 commentedSolved!! Cleaned the internal cahes and the links appears, works great now!!
Thanks for this wonderful module!
Comment #27
wim leers#23/#26: yay :)
#24: yay :) The README already covers all those things. And the Status Report now specifically checks that. Nothing more I can do.
#25: Indeed, the entity toolbar's positioning can be pretty annoying in certain cases. We need to fix that in D8 too. I've linked to your comment from the D8 issue: #2090945-2: Polish entity toolbar's positioning.
Also: you don't need to close anything, just wait a little bit and it'll fix itself. Which is of course not acceptable, but at least you don't have to close anything.
Everything reported here has been addressed, and for #8.1, you've opened a new issue (#2160321: Uncaught TypeError: Cannot call method 'getAttribute' of undefined):
So, closing this issue.
Comment #28
wim leers#25: my explanation above was incorrect: this is not a bug in D8, so it's a D7-only problem. Opened an issue for that: #2160517: Entity toolbar when using the CKEditor in-place editor repositions way too slowly: very annoying.
Comment #29
huma2000 commentedI'm still getting the error, no contextual link.
According to firebug:
TypeError: entityElement.get(...) is undefined
http://192.168.72.129/judo/profiles/spark/modules/contrib/edit/js/edit.j...
Line 212
Ideas?
I'm using the last dev version.
Comment #30
huma2000 commentedIf you need I can give you access to the website to debug.
Comment #31
socialnicheguru commentedWith the new edit module beta 1, I get the same as in #29.
Comment #32
socialnicheguru commentedI opened it up because of the "TypeError: entityElement.get(...) is undefined error mentioned." If it should be a new issue, please let us know and I will create a new one. The error hampers the contextual link being shown
Comment #33
tomtech commentedThe 'Quick Edit' contextual item would not show up for me either with the latest dev.
I encountered a few issues:
1) edit_page_load in edit.module presumes there are regions present when it attaches to $children[0[], which isn't the case.
I was able to get around this with a fallback to the mandatory 'content' region. (I guess one could also initialize the theme and grab the first region, similar to block.module's block_page_load, but that seems overkill.)
2) loadMissingEditors in js/edit.js returns an array of scripts, but the call to insert() eventually calls jquery's html() method, which strips out
elements. I was able to work through this by using jquery's parseHTML() method, then calling getScript for each document, though this has two issues. (a) parseHTML requires jquery 1.8.x and (b) I'm assuming the return is always going to be a set of scripts to load. This seems to be the case in the current implementation, but is an assumption nonetheless. This finally got the 'Quick Edit' link to load, but the CKEditor was not showing up. 3) If you have text transformations/filters, a callback is made to...transform the text. but the command on the js side is textLoaderAjax.commands.editorGetUntransformedText, while the ajax return object is invoking the command editCKEditorGetUntransformedText. setting the returned command to editorGetUntransformedText in includes/pages.inc resolves this. I finally have ckeditor loading again!Comment #34
tomtech commentedFurther details to #33...
1) Seems to be theme related. Some themes do not have the regions created when edit_page_load is called. In my case, it is adaptive themes panels everywhere.
2) Seems to be related to jquery_update. The jquery shipped with Drupal7 doesn't seem to have the strip script code. (Running jquery 1.8.x also introduces layout issues that do not exist with jquery 1.7.x.)
3) This issue is related to whether you have any filters enabled. If you do, I don't think ckeditor would ever load since the callback is made to a non-existent method.
Comment #35
tomtech commentedI've confirmed that issue #2 in comment #33 is related to jquery_update. It does not happen with the Drupal 7 included jquery.
I've rolled another patch that just addresses issues #1 and #3.
I still think that working with more recent query versions needs to be addressed, but not sure at the moment the best way to handle that.
Comment #36
wim leers#32: Please open a new issue!
#33/#34/#35: Thanks for all your efforts in tracking down why things are breaking :)
If #2167981 doesn't help with this, then please create a new issue for it. It's not good to repurpose this issue for other things.
<script>tag and for some reason jQuery totally fucked that up: it was somehow hiding the<script>tag, which is why CKEditor couldn't find it, and hence couldn't figure out its location on the server. That was a major WTF!After having written the above, I did a
git grep CKEDITOR_BASEPATH, and it turns out I still have the work-around in the Drupal 7 code! (It was removed from Drupal 8 after we upgraded to jQuery 2, which fixed it.) It's informattedText:So I suspect that the problem here must be at least slightly different. It almost sounds like it's a bug you should also encounter with other modules, but then again very few modules dynamically load more JS. Still, it sounds more like a deficiency on
jquery_update.module's side than on Edit's: Edit is merely using the "insert" AJAX command, and it is that which is broken.Hence my best suggestion for now is to open a new issue in the jQuery Update issue queue. If it turns out to be an Edit issue after all, please open a new issue in the Edit issue queue.
Thanks, all, for the great feedback! But please open new issues, otherwise it becomes impossible to track things. Thanks!
Comment #38
milos.kroulik commentedIf you come here because contextual link doesn't display on nodes, while it does on other places, make sure, that it isn't result of Overlay Paths module incompatibility. I posted the issue at https://drupal.org/node/2185965.
Comment #39
vpiplani commentedFor above issues, in node.tpl.php, following div should be added on top and closing div at the end of the file.
print $classes;clearfix"print $attributes;>It's missing in several contributed themes, and causing quick edit to not load and give error in following element:
entityElement.getAttribute('data-quickedit-entity-id')