I am not entirely sure if this is a CKEditor issue or an ImageField one, please feel free to correct me if I should be posting this somewhere else.
CKEditor does not show on node creation for imagefield text areas, but it does for the same areas when you edit the exact same node.
I have noticed that all imagefield text areas have different identifiers (in order to be assigned to CKEeditor profiles) though. As an example, one of them shows like this for node creation:
baca:filefield/ahah/projecte/field_projecte_imatges/0.edit-field-projecte-imatges-0-data-field-projecte-imatges-enriquit-body
However, in the node edit form, the same field is identified with:
rubik:projecte@node/147/edit.edit-field-projecte-imatges-1-data-field-projecte-imatges-enriquit-body
Here's an attempt to explain what is what in the previous examples:
In the node creation form:
website_display_theme:filefield/ahah/content_type/image_field_name/x.edit-image-field-name-x-data-field-whatever-imagefield-data-you-chose
And in the node editing form:
website_admin_theme:content_type@node/nid/edit.edit-image_field_name-x-data-field-whatever-imagefield-data-you-chose
I have used the inclusion string *-data-field-projecte-imatges-enriquit-body
in CKEditor Global Profile, which works for editing but not for creation. The administration theme is used for creating and editing nodes, so I suppose there is some missidentification of the field and its path when it is being created, whether if this is CKEeditor's or Imagefield/Filefields' fault I just don't know.
Please tell me if I can provide any further information, and thanks for such a great module.
Comment | File | Size | Author |
---|---|---|---|
#12 | 0001-1286192-CKEditor-just-showing-on-imagefield-textarea.patch | 4.16 KB | mkesicki |
Comments
Comment #1
mkesicki CreditAttribution: mkesicki commentedMaybe try use something like this "*image_field_name*" in incusion string. Please write if that help or not.
Remember to add this into right CKEditor's profile.
Comment #2
castawaybcn CreditAttribution: castawaybcn commentedthe image field name is "field_projecte_imatges", if I try including "*field_projecte_imatges*" (without the inverted commas) I get the following error message:
Rule *field_projecte_imatges* is ambiguous: please append .* if *field_projecte_imatges* is a path or prepend *. if *field_projecte_imatges* is a field
I then tried both "*field_projecte_imatges.*" and ".*field_projecte_imatges*", but no luck.
It seems to me that the field_project_name approach won't do the trick, as I understand that is the path to the image field, and there are several text fields associated with that image, only one of which I want to have CKEditor.
Thanks for looking into this.
Comment #3
mkesicki CreditAttribution: mkesicki commentedMy field's name is "field_new" . After I add "*-field-new*" in CKEditor's global profile exclude list. CKEditor stop showing on that field during edit.
Comment #4
castawaybcn CreditAttribution: castawaybcn commentedIs your field an image field as well?
Comment #5
mkesicki CreditAttribution: mkesicki commentedYes it is. ImageField to upload image with description and title as textarea.
Comment #6
castawaybcn CreditAttribution: castawaybcn commentedI am using two fields: description and a http://drupal.org/project/imagefield_extended field.
CKEditor should appear on the second both on node creation and node edit. I just shows on node edit.
But with your previous instructions I should see CKEditor in both fields, and for both editing and creation pages, should I not? What else can I try?
Comment #7
mkesicki CreditAttribution: mkesicki commentedMy previous description was to 'not' show CKEditor on edit. Sorry for misunderstanding.
The reason why CKEditor isn't show on imagefield description field is that, because description field is created by some ajax/JavaScript call, so CKEditor don't see it on page load.
Some hook, ajax call is needed to create CKEditor's instance for imagefield description.
Comment #8
castawaybcn CreditAttribution: castawaybcn commentedShould this be done on ckeditor's side or imagefield's? Sorry if this is a dumb question, but my ajax/javascript knowledge is rather limited.
Comment #9
mkesicki CreditAttribution: mkesicki commentedWe will check this. Please be patient.
Comment #10
castawaybcn CreditAttribution: castawaybcn commentedSorry, I didn't mean to rush you at all.
Comment #11
mkesicki CreditAttribution: mkesicki commentedComment #12
mkesicki CreditAttribution: mkesicki commentedI added small patch to solve this problem. Please review this.
Comment #13
castawaybcn CreditAttribution: castawaybcn commentedI tried the patch but it does not seem to work.
Just to make sure I used the include filter for that particular field "baca:filefield/ahah/projecte/field_projecte_imatges/0.edit-field-projecte-imatges-0-data-field-projecte-imatges-enriquit-body" without trying any wildcards. The field still seems to be linked to the global theme, not the administration one which is used to create and edit nodes.
Comment #14
mkesicki CreditAttribution: mkesicki commentedInclude/Exclude entries/filters can't help in situation when you add/create node, because ImageField textarea shows in ajax call. Please delete any entries that you added for ImageField to include/exclude list. After this check if provided patch is working for your or not. Please also write what theme do you use ?
Comment #15
castawaybcn CreditAttribution: castawaybcn commentedI removed all entries for ImageField, and flushed all caches. I am afraid patch still doesn't work.
For node editing/creation I am using Rubik theme.
Comment #16
mkesicki CreditAttribution: mkesicki commentedOk I will test this with Rubik theme.
Comment #17
mkesicki CreditAttribution: mkesicki commentedI commit changes to git. Please check latest DEV version. It should works with Rubik theme.
Comment #18
castawaybcn CreditAttribution: castawaybcn commentedTried yesterday with October 1st dev (datestamp = "1317427506"). Same behaviour. On node creation field is still identified with the site's global theme, not the editing/admin theme.
Tried today with October 3rd dev (datestamp = "1317643645"). Same behaviour, but now I cannot access the collapsed fields in CKEditor profiles mysite.com/admin/settings/ckeditor/edit/Default
Comment #19
mkesicki CreditAttribution: mkesicki commented@castawaybcn you still don't see CKEditor in textarea of ImageField title/description after clicking upload button on node creation page ? Even if all entries about Imagefield are removed from CKEditor's profile include/exclude list ?
Comment #20
castawaybcn CreditAttribution: castawaybcn commentedNope. I removed all entries (not just those related to imagefield) in the include/exclude list, but still no joy on node creation.
In the node edit form, however, I now have CKEditor in both the description field and the imagefield_extended field. This is not exactly what I was trying to accomplish though: CKEditor for imagefield_extended only .
Would it help if you had (limited) access to the site I am working with? I don't know if this is a real possibility for security reasons, but let me know if it would and the permissions you would need.
Comment #21
mkesicki CreditAttribution: mkesicki commentedWrite me step to reproduce your problem. Maybe I do something wrong/different than you.
Add screenshot with page where the problem is. I will check this one more time in free time ;)
If I can't find anything I will give you a note.
Comment #22
castawaybcn CreditAttribution: castawaybcn commentedI just sent you the information through the contact form so that you can see for yourself.
Comment #23
mkesicki CreditAttribution: mkesicki commentedComment #24
mkesicki CreditAttribution: mkesicki commentedI commited small changes but this still needs some improvements.
Comment #25
mkesicki CreditAttribution: mkesicki commentedI commited changes and added patch from #1296804: Tabledrag compatibility.
Comment #26
castawaybcn CreditAttribution: castawaybcn commentedUpdated to 6.x-1.x-dev (2011-Oct-13), but I can't see any differences. What changes should I be looking for? Anything I can test?
Thanks a lot.
Comment #27
mkesicki CreditAttribution: mkesicki commented@castawaybcn I send you an e-mail. Please check it and response by mail.
Comment #28
dczepierga CreditAttribution: dczepierga commentedHi,
I rewrite support for ImageField, and all works without one thing - when u use "Add another item" button it's clear in this group all textareas to default values (when u create page default value is empty, when editing the value which is loaded in the start).
I don't found any more bugs, so pls check last DEV version.
Greetings
Comment #29
dczepierga CreditAttribution: dczepierga commentedComment #30
dczepierga CreditAttribution: dczepierga commentedOk, we fix bug with losing text from editor after "Add another item" button click.
All changes commited to GIT.
If u found more bugs pls write issue with description how to reproduce it.
Greetings
Comment #31
mkesicki CreditAttribution: mkesicki commentedComment #32
krishworks CreditAttribution: krishworks commentedthe fix for this produces
TypeError: CKEDITOR.instances is undefined
on line 409 in ckeditor.utils.jsComment #33
dczepierga CreditAttribution: dczepierga commented@krishworks, pls not open so old issue... if u have problem pls write new issue with description of your problem...
Greetings