Hi!
I have:
1. CCK version : 6.x-2.1
2. imagefield version: 6.x-3.0-alpha2
Everything was working OK until suddenly. When I upload image, i got in place here should be image this:
{ "status": true, "data": "\x3cdiv class=\"ahah-new-content\"\x3e\x3cdiv class=\"form-item\" id=\"edit-field-image-0-wrapper\"\x3e\n \x3clabel for=\"edit-field-image-0\"\x3eСлика: \x3cspan class=\"form-required\" title=\"Ово поље је неопходно попунити.\"\x3e*\x3c/span\x3e\x3c/label\x3e\n \x3cinput type=\"hidden\" name=\"field_image[0][fid]\" id=\"edit-field-image-0-fid\" value=\"104\" /\x3e\n\x3cimg src=\"http://prodide.com/dev/nasasrbija.org/sites/default/files/images/slika.j...\" /\x3e\x3cdiv class=\"form-item\" id=\"edit-field-image-0-data-description-wrapper\"\x3e\n \x3clabel for=\"edit-field-image-0-data-description\"\x3eОпис: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"128\" name=\"field_image[0][data][description]\" id=\"edit-field-image-0-data-description\" size=\"60\" value=\"\" class=\"form-text\" /\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-field-image-0-data-alt-wrapper\"\x3e\n \x3clabel for=\"edit-field-image-0-data-alt\"\x3eАлтернативни текст: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"128\" name=\"field_image[0][data][alt]\" id=\"edit-field-image-0-data-alt\" size=\"60\" value=\"\" class=\"form-text\" /\x3e\n\x3c/div\x3e\n\x3cdiv class=\"form-item\" id=\"edit-field-image-0-data-title-wrapper\"\x3e\n \x3clabel for=\"edit-field-image-0-data-title\"\x3eНаслов: \x3c/label\x3e\n \x3cinput type=\"text\" maxlength=\"128\" name=\"field_image[0][data][title]\" id=\"edit-field-image-0-data-title\" size=\"60\" value=\"\" class=\"form-text\" /\x3e\n\x3c/div\x3e\n\x3cinput type=\"hidden\" name=\"field_image[0][list]\" id=\"edit-field-image-0-list\" value=\"0\" /\x3e\n\x3cdiv class=\"form-item\" id=\"edit-field-image-0-upload-wrapper\"\x3e\n \x3clabel for=\"edit-field-image-0-upload\"\x3eЗаменити: \x3c/label\x3e\n \x3cinput type=\"file\" name=\"files[field_image_0]\" accept=\"jpg,jpeg,png,gif\" class=\"form-file\" id=\"edit-field-image-0-upload\" size=\"60\" /\x3e\n\n \x3cdiv class=\"description\"\x3eМаксимална величина слике: \x3cem\x3e8 MB\x3c/em\x3e \x3cbr /\x3eДозвољене екстензије: \x3cem\x3ejpg jpeg png gif\x3c/em\x3e\x3cbr /\x3eМора бити JPEG, PNG или GIF слика\x3c/div\x3e\n\x3c/div\x3e\n\x3cinput type=\"submit\" name=\"op\" id=\"edit-field-image-0-upload-btn\" value=\"Подићи\" class=\"form-submit\" /\x3e\n\x3cinput type=\"submit\" name=\"field_image_0_remove_btn\" id=\"edit-field-image-0-remove-btn\" value=\"Уклонити\" class=\"form-submit\" /\x3e\n\n\x3c/div\x3e\n\x3c/div\x3e\x3cscript type=\"text/javascript\"\x3ejQuery.extend(Drupal.settings, { \"basePath\": \"/dev/nasasrbija.org/\", \"thickbox\": { \"close\": \"Close\", \"next\": \"Next \\x3e\", \"prev\": \"\\x3c Prev\", \"esc_key\": \"or Esc Key\", \"next_close\": \"Next / Close on last\", \"image_count\": \"Image !current of !total\" }, \"ahah\": { \"edit-field-image-0-upload-btn\": { \"url\": \"/dev/nasasrbija.org/filefield/ahah/image/field_image/0\", \"event\": \"mousedown\", \"keypress\": true, \"wrapper\": \"edit-field-image-0-ahah-wrapper\", \"selector\": \"#edit-field-image-0-upload-btn\", \"effect\": \"fade\", \"method\": \"replace\", \"progress\": { \"type\": \"throbber\" }, \"button\": { \"op\": \"Подићи\" } }, \"edit-field-image-0-remove-btn\": { \"url\": \"/dev/nasasrbija.org/filefield/ahah/image/field_image/0\", \"event\": \"mousedown\", \"keypress\": true, \"wrapper\": \"edit-field-image-0-ahah-wrapper\", \"selector\": \"#edit-field-image-0-remove-btn\", \"effect\": \"fade\", \"method\": \"replace\", \"progress\": { \"type\": \"throbber\" }, \"button\": { \"field_image_0_remove_btn\": \"Уклонити\" } } } });\x3c/script\x3e" }
Can anyone help please?
Comments
Comment #1
1davor commentedNow I see that actual image upload is done, everything is working OK except when I upload image instead of image previews I got that messy code.
Comment #2
1davor commentedComment #3
1davor commentedANYONE???!!
Comment #4
1davor commentedI've just realized that it's not problem with ImageField, but with FileField - file attachment previews give the same.
I've disabled AHAH and now is doing OK.
Comment #5
jpetso commentedThat text fragment is the JSON data sent by the AJAX callback. Instead of merging it directly though, CCK should rather replace the existing field with only the content that is in the "data" element. Something goes wrong there, but I can't tell what (plus I don't work on filefield anymore so don't expect further help from me).
Comment #6
flickerfly commentedI've seen this when I click the Save button while an upload is in progress or otherwise disrupted the AJAX activity.
Comment #7
dopry commentedI haven't been able to reproduce.. update to latest dev and try there is a good chance this has been fixed... reopen if you can provide more detail or confirm it is still a problem.
Comment #8
jlaundry commentedI have a very similar issue that might be related. However, it might be confined to Safari, as if I follow the same procedure with Firefox it works fine.
With;
cck 6.x-2.1
filefield 6.x-3.x-dev
imagefield 6.x-3.0-alpha4
1. Do the dance of setting up a content type with image
2. Create new content, and attempt to attach an image
At this point the spinny thingy keeps spinning, and the status bar shows "completed X of X+1 items" (this is on a localhost server, so there should be no time delay to upload).
3. Press Save or Preview, and get this wonderful JSON response.
Comment #9
dopry commented"I have a very similar issue that might be related. However, it might be confined to Safari, as if I follow the same procedure with Firefox it works fine."
then open your own stinking issue! not an already closed one and reference the other issues you think are related... and no I can't reproduce. It's an image preview which technically makes this an imagefield issue... does it happen with a plain filefield? Are you using a filefield with an 'image' widget or an actual imagefield....
open your own issue with some useful debugging information.
Comment #10
Adger560 commentedI also suffered this problem,
it does indeed seem to be a safari issue, as it works fine on firefox when uploading images.
Comment #11
tomotomo commentedI'm seeing this exact same problem on 6.x-3.2 running the chrome browser.
Comment #12
tomotomo commentedI just installed 6.x-3.x-dev and can confirm it's still a bug that affects the Google Chrome browser but does not affect Firefox.
This bug also affects Opera which throws a JavaScript error and then redirects to the page filefield/ahah/project/field_images/0
Comment #13
quicksketchtomotomo, please open a new issue and describe your issue from the beginning. This is a convoluted issue to follow.
Comment #14
imroz055 commentedNow I see that actual image upload is done, everything is working OK except when I upload image instead of image previews I got that messy code.