Closed (won't fix)
Project:
AJAX Picture Preview
Version:
6.x-2.1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
12 Apr 2012 at 09:13 UTC
Updated:
11 Nov 2012 at 15:29 UTC
Jump to comment: Most recent file
Hello, I am porting this module to Drupal 7. You can find the sandbox project here. Please review the code and if you find any bugs then tell me about the same.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | error_log.txt | 8.35 KB | eugene.ilyin |
Comments
Comment #1
eugene.ilyin commentedHello.
Excellent. I will look at the project for a couple days and let you know here. Thank you.
Comment #2
eugene.ilyin commentedWhat version of the module you are ported to drupal 7?
Comment #3
subhojit777Its the latest stable release of your module i.e. 6.x-2.1. I have also provided this information in the "version" while creating this issue.
Comment #4
eugene.ilyin commentedHello, sorry for the delay but I have no time. I checked your module on Drupal 7, and it causes an error, and JavaScript is not working because of this. Try to update the js library ajax_picture_upload.
I tested your module in browser Google chrome 16 for Linux.
Comment #5
subhojit777Could you please post the error in the issue. In the meantime I will check the ajaxfileupload.js file.
Comment #6
eugene.ilyin commentedOf course, that's the error log.
Comment #7
subhojit777Hello, Eugene I have fixed the error. Please review the code once again, and tell me if there are any missing functionality. Since I am using Drupal 7, there is image preview built in the core, so I am not getting the difference if I enable he module and upload any image. Please recheck the ported module.
Have a nice day :)
P.S. If you have built any other modules in Drupal 6 give me their project links I will port them to Drupal 7
Comment #8
eugene.ilyin commentedHello I checked your module on an empty installation of drupal 7 without options and modules, and I got this error. I will be able to review your work in the evening.
Comment #9
eugene.ilyin commentedI still see the error. You forgot to add code to the repository?
Comment #10
subhojit777Yup, you are right. Sorry. I will push the changes to repository.
Comment #11
subhojit777Comment #12
eugene.ilyin commentedSorry but I'm too busy. I'll try to look tonight.
Comment #13
eugene.ilyin commentedI have JS error when I try to upload avatar
"Uncaught TypeError: Object function (j,s){return new b.fn.init(j,s)} has no method 'ajaxFileUpload'"
ajax_pic_preview.js:17
Browser: Google Chrome 16 for Ubuntu
Comment #14
eugene.ilyin commentedComment #15
eugene.ilyin commentedHello. Will you continue to work further?
Comment #16
subhojit777sure sure :) i am sorry for not replying. was busy...
Comment #17
subhojit777I can't find the error when I upload image in Drupal 7 website and this ported module is also enabled in my Drupal 7 installation. I am uploading and adding an image to a node but dont get the error. How are you uploading the image?
Comment #18
eugene.ilyin commentedHello I am extremely busy in recent days. I will write to you as soon as I can find the time. Sorry.
Comment #19
subhojit777Its ok. I always forget to tell the version of my browser, its Chromium Web Browser version 17.0.963.65
There are some errors coming while I enable the module, I haven't noticed this before. Please give me some time to fix those errors.
Comment #20
subhojit777The errors are removed and you can test the module and check its functionality.
I have changed the .install file of this module, the pictures/tmp directory gets removed on uninstallation.
Comment #21
eugene.ilyin commentedHello. Sorry for delay.
I try to upload photo and see:
Uncaught TypeError: Object function (j,s){return new b.fn.init(j,s)} has no method 'ajaxFileUpload' ajax_pic_preview.js:17
ajaxFileUpload ajax_pic_preview.js:17
c.event.handle jquery.js:64
c.event.add.h.handle.o jquery.js:57
I use Chrome on Ubuntu v.16.0.9
Comment #22
subhojit777Ok, I will fix this bug
Comment #23
subhojit777In your module you are using hook_cron, there you are calling file_delete(). In Drupal 6 file_delete takes filepath as parameter, but in Drupal 7 it takes file object as parameter. Seeing the code in hook_cron I didn't found any way to get file object from its filepath, I also searched the file API but there are no such functions. So, I am using PHP's unlink() function to obtain the same functionality in Drupal 7.
Comment #24
eugene.ilyin commentedIn version 6.x-3.x I refused of hook cron. It is better if you took this version as a basis.
Comment #25
eugene.ilyin commented