In the module package (also in CVS) js/ajax_pic_preview.js is missing! (loaded at line 38 in ajax_pic_preview.module)
-> module does not work with drupal 6 rc 2

Comments

IcyAndy’s picture

Priority: Critical » Normal

It seems that the problem only occurs when clean urls are set to off:

"warning: file_get_contents(js/ajax_pic_preview.js) [function.file-get-contents]: failed to open stream: No such file or directory in /drupal-6.0-rc2/includes/locale.inc on line 1622."

-> At least the documentation has to tell this. Better: The installer checks if clean ulrs are on (As a requirement).

Fayna’s picture

I think I'm receiving the same error, and I have clean URLs on.

warning: file_get_contents(js/ajax_pic_preview.js) [function.file-get-contents]: failed to open stream: No such file or directory in /.../includes/locale.inc on line 1622.
The selected file /../picture_6.png could not be uploaded, because the destination sites/default/files/avatars/tmp/7d7d540685499e5d9805ea55f7744d3d.png is not properly configured.
Could not upload file.

Is there something else I need to do to configure this module properly?

IcyAndy’s picture

No, this is not the same error. The problem in your case is most likely that "sites/default/files/avatars/tmp/" ist not writeable. Check that drupal can create files in this directory (or that tmp exists at all). Afair the module needs the tmp subdirectory but does not create it by itself.

Fayna’s picture

I installed the module on my Drupal 6.2 installation and created the tmp folder. I'm not really sure how to make the folder writable since I'm using MAMP. Now I'm just getting this error, though:

warning: file_get_contents(js/ajax_pic_preview.js) [function.file-get-contents]: failed to open stream: No such file or directory in /../includes/locale.inc on line 1622.

IcyAndy’s picture

That is the reported "error". The module needs "clean URLs" on to work properly (you will find more information in the forum and handbook pages. Take a look here as a start http://drupal.org/node/15365)

Fayna’s picture

Sorry, I forgot to mention I have them on. I'm going to try with a new installation and see if I have the same problem.

Fayna’s picture

I found out why I was having the problem. I had renamed my pictures directory to something else like "avatars." It was weird because the tmp files would be uploaded correctly to the avatars/tmp folder, but I would get the error. Creating a "pictures" and tmp folder fixed it though.

mmilano’s picture

Status: Active » Fixed

Thanks for posting the fix.

It will save in the picture upload path, but it wasn't creating a new tmp path as you discovered.

I just added some code that will check for the tmp path every time it uploads now, so this should not be an issue in the future. This will be available in the -dev release here soon, otherwise 6.x-1.2 when it is released.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.