Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Inserting footnotes works like a charm. Though I can't seem to edit it. Selecting it and editing it via the footnote button display "Unknown object" in the text field.
Comment | File | Size | Author |
---|---|---|---|
#22 | footnotes-via-wysiwyg-ckeditor.patch | 5.89 KB | manhho06 |
#21 | footnotes-ckeditor_and_ie-1124454-21.patch | 903 bytes | rooby |
#7 | workarounds_for_buggy_footnotes_version-1124454-7.patch | 2.51 KB | Dashu |
#2 | 1124454.patch | 1.08 KB | lavamind |
Comments
Comment #1
hingo CreditAttribution: hingo commentedYes. It seems CKEditor is constantly changing the API for plugins which breaks 3rd party plugins. From footnotes_wysiwyg/README.txt:
From your description it seems newest CKEditor breaks it in new ways yet again.
Also note the "seeking new maintainer" at http://drupal.org/project/footnotes, ie I'm not working to fix this, I'm hoping others will step in. (Footnotes is used by many professional Drupal shops, I'm sure it's just a matter of time someone fixes this.)
Comment #2
lavamind CreditAttribution: lavamind commentedHere's a patch to fix that problem. Works with CKeditor 3.6.
The patch can probably also be backported to the 6.x branch of the module.
If you don't want to work with the patch, you can easily for the problem by hand. Just locate all instances (3) of
element.getAttribute( '_cke_real_element_type' )
and replace withelement.getAttribute( 'data-cke-real-element-type' )
.Comment #3
hingo CreditAttribution: hingo commentedThanks for the patch.
Since you've contributed helpful stuff in previous issues, I've added you as a maintainer. Please go ahead and commit this yourself. (Note: I didn't review the patch, if you'd like that done then please wait for or ask someone to do it.)
Comment #4
lavamind CreditAttribution: lavamind commentedIf anyone can confirm that the patch works for them, I'll commit the change.
Comment #5
Dashu CreditAttribution: Dashu commentedUnfortunately, it did not work for me.
Applied the patch and tried to do it manually but -> nothing.
CKEditor Version CKEditor 3.6.1
Comment #6
Dashu CreditAttribution: Dashu commentedI debugged a little further.
The problem is, that the fakeElement alt and title values are not set properly.
This is where the error occurs:
http://docs.cksource.com/ckeditor_api/symbols/src/plugins_fakeobjects_pl...
createFakeElement()
79 var lang = this.lang.fakeobjects,
80 label = lang[ realElementType ] || lang.unknown;
and I suspect that this also happens in createFakeParserElement()
115 var lang = this.lang.fakeobjects,
116 label = lang[ realElementType ] || lang.unknown,
where lang.unknown is "Unknown Object" / "Unbekanntes Objekt"
Comment #7
Dashu CreditAttribution: Dashu commentedWorkaround for everyone who wants that unknown object tootltips removed (in addition to the patch provided by lavamind):
Use the patch below (lavaminds patch + mine)
-------------------- OR do it manually ---------------------
/footnotes/footnotes_wysiwyg/ckeditor_plugin/plugin.
Line 117
Before:
After:
---------------------- And ------------------------------
Line 178:
has to change to ->
Comment #8
denix CreditAttribution: denix commentedthanks, this helped me a lot with configuration previous than WYSISWYG 7.x-2.1, CKEditor 3.6.1.7072, Footnote Wysiwyg 7.x-2.5 and Footnote 7.x-2.5 but now it seems not to work anymore.
Thanks again,
Denis
Comment #9
hoZt CreditAttribution: hoZt commentedI tried to apply these patches with the current 3.6.x version of ckeditor and it does not work. When the ckeditor plugin is enabled the editor does not display at all.
Comment #10
vegardjo CreditAttribution: vegardjo commentedNot getting the patch to work on CK 3.6.1
@hoZt: have you seen this issue: #1333748: plugin not found causes ckeditor not to work? I had the same problem, but solved it there.
Comment #11
rooby CreditAttribution: rooby commentedSolution in #2 is working fine for my testsing with CKEditor 3.6.1
However I did not use the patch, I did a find and replace manually in the file.
Comment #12
rooby CreditAttribution: rooby commentedCommitted #2 to Drupal 6 & 7.
http://drupalcode.org/project/footnotes.git/commit/9ca1a0c
http://drupalcode.org/project/footnotes.git/commit/6d6ad51
@Dashu:
I'm not sure exactly what you are experiencing in #5, #6 & #7, but please try the latest dev version once this commit shows up and if it doesn't work with the latest CKEditor, post back here with your problems.
Thanks.
Comment #13
rooby CreditAttribution: rooby commented@Dashu:
Is your problem only in IE or all browsers?
Comment #15
pverrier CreditAttribution: pverrier commentedChanging 7.x-2.5 to latest dev version (2012-Mar-06) plus patch #7 (tooltip = footnote text instead of "Unknown object") worked for me : I now have the contextual link and the right tooltip. But :
Comment #16
robin_b CreditAttribution: robin_b commented#7 works
(however the patchfile has some unnecessary lines at the beginning)
Comment #17
soulfroysPlease, the #12 commit is not present in last dev. Does Anyone know why?
Comment #18
rooby CreditAttribution: rooby commentedIt is for me when I download it.
Comment #19
soulfroysI forgot my report (following the instructions in #7):
...easily fixable in line 59:
@rooby
Thank you, but did not understand what you say and forgive me for my poor English (not my first language).
Comment #20
Anonymous (not verified) CreditAttribution: Anonymous commentedAs it appears that there are a number of us that are still having issues, I'm changing status from closed.
Comment #21
rooby CreditAttribution: rooby commentedI spent a decent amount of time on this today and have made a little progress.
I was able to fix the [object] bug reasonably easy, however another bug remains, which is that when you add a footnote:
* In IE9 it adds it to the start of the text area, not where your cursor is.
* With older IE it throws a javascript error and doesn't work at all. The error comes out of ckeditor and is "Error: Unable to get value of the property 'remove': object is null or undefined"
Firefox & Chrome work fine.
The problem is the use of the
<fn>
tag.CKEditor doesn't like doing:
element.createFromHtml('<fn></fn>');
With a bogus tag. At least in IE.
Change it to a div for example and it works.
I have not yet been able to find a way in CKEditor to use custom tags in this manner so I will have to do some more investigating.
I might also open an issue with the CKEditor guys and see what they have to say about it.
Attached is the patch that gets rid of the [object] bug, but it still doesn't get things fully working in IE.
This also affects CKEditor 3.6.5
Comment #22
manhho06 CreditAttribution: manhho06 commentedfootnotes via wysiwyg (CKEditor 3.6.5.7647)
Fixed footnotes error with IE 8 and 7.
Use the patch below.
Comment #23
rooby CreditAttribution: rooby commentedGreat thanks.
I will review this tonight.
Comment #24
R.Muilwijk CreditAttribution: R.Muilwijk commentedYou might like to upgrade to ckeditor 4.1 see #2025027: Add support for ckeditor 4.x
Comment #27
scott_euser CreditAttribution: scott_euser as a volunteer and at Soapbox Communications Ltd commented