Hi,
First of all I really like this useful module and I would like to use it with lytebox. Thanx for developint it.

But unfortunately in some circumstances (I did not figured out exactly: same user logged in to edit/view the gallery node from other computer, or other user with rights, or when the cron runs, or I do not know...)
the uploaded original picture files are deleted!!!

As I fugured out the uploaded pics go to
.../gallery_assist/-userID-/gallery_assist-nodeID-/...ORIGINAL FILEME.EXT...
and the generated files like thumbnals, etc go to /img /prev /thm

After a while or after triggered specific conditions or actions or I do not know, but the original files are deleted.
This is by design or by mistake?
I hope this is a bug and you should investigate/fix it, because the lightbox scripts are referring to the original files. And of course that is good to store the originals to see the file in real size.

I think this issue is related to some other reported issues, but the core is this, so I opened this new bug report.
Do you have the same issue or any solution from Juan?

Thank you in advance,

CommentFileSizeAuthor
#11 gallery_assist.patch594 bytesberenddeboer
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dzhu’s picture

Hello,

This module removes all symbols, except alphanumeric characters from the file name. So if you are trying to upload into one gallery two files, for examplea, named file_1.jpg and file$.jpg, module will rename both of them to the file.jpg. And finally you will get one file instead of two.

Of course, I may be wrong and it is something different.

strengzs’s picture

Thank you for your comment!

Good to know and should written somewhere under the installation process, readme, project summery, etc.

I use only xyz123.jpg file names in my case right now.

I tried to recreate the problem of course when I want I can not.
But this had happened with me a lot of times, I reinstalled the module completely, copied back the original files with FTP. The deletion of the originals from the root of the gallery folder happened again.
I will get back when experience the issue again.
I think this deletion caused the problems in the following 2 reported issues:
http://drupal.org/node/607798 "Gallery Assist not uploading 'some' images properly..." -was closed without explained solution
http://drupal.org/node/618694 "Small files are not loaded"

So this is a problem, but hard to recreate because we do not know what is triggering to delete the original files.

jcmc’s picture

Hello dzhu, hello strengzs,

It is my earnest, I did not expect that this module would find so many sympathizers.

1 - Some bugs exists in the current Version of "Gallery Assist Lightboxes". The points posted here belong to it.

  1. The work with the i18n Module eg. Paths go lost by translations.
  2. Not reconizing the to including needed lightboxes css- or js- files.
  3. Not documentation about: wich supported lightboxes works with the from drupal supported jquery.js (version 1.2.5). Some lightboxes for example prettyPhoto need version 1.3.1 of jquery.js.

I have fixed the above mencioned points. Only the documentation is left.

2 - Can you please write me about your issue with users, permitions etc? waht was your purpose and waht was wrong?

3 - strengzs as you know through dzhu. The upload script rename the original files. It is not correctly but I had my reasons at the beginning. Now I can change it. The posibility to configure your own pattern matching filter for filenames and the option to choose wich save file method to use (FILE_EXISTS_RENAME OR FILE_EXISTS_REPLACE) will be implemented.

4 - http://drupal.org/node/607798 is a "from alone self fixed issue". It is the sample of a premature bug report (:-D) Arran solved self the issue but don't know how.

5 - http://drupal.org/node/618694 - Is a report from dzhu nad is realy a bug. I would call it a missing feature by the File-API. This is a comment only, I have a solution for that.

No hesitate to report issues and feature requests.The firsts are things are to be fixed. The seconds I make if I can and have the time.

I hope I have satisfied your questions and have successfully incorporated a little patience in your impatience.
Don't forget it -You help me to develop THIS_MODULE better.

Thanks and Regards
Juan Carlos

ekkljs’s picture

Hello,

I have faced exactly same problem as strengzs reported. The original files are deleted.
Only admin is able to upload files. One odd thing is that it doesn't follow imagecache preset.
I have another preset for fast gallery and it doesn't work for gallery assist.

I think this isn't casued by cron because original files aren't deleted after cron runned. I am not sure how long they are there but they are gone less than a day.

strengzs’s picture

Hi,

I have tried Juan's developer version from His repo: http://github.com/jcmc/ (The base module and lightboxes) and the original problem is solved.
I mean the pictures are showed in lightboxes because in this release the lightbox click refers the files from /prev folder, so there is no need for the original files anymore.

So, if the deletion of the original files are by design than this issue is solved.
Otherwise if the original files should be there this is still a bug. This is up to you Juan.
I am fine with this solution.
I can save storage space on my server with the deletion of originals, but I have to change the preview picture size to get bigger pictures seen in lightbox. (lightboxes are handling picture resize very well depending your desktop/browser resolution)

Thank you again Juan to take time to develop this module! ;-)
Regards,
Zs

strengzs’s picture

Priority: Critical » Normal
Status: Active » Needs review
jcmc’s picture

Hello ekkljs, strengzs,

Not all webserver work equal and not all people use the one.

I decide to rename the original files to avoid "path bugs or adress bugs" caused because a user try to upload files called with exotic names or script code.
When a server is correctly customized you have not problems with whitespaces on the hyperlinks.

Equal, I had implemented this feature in the last dev by github.com/jcmc/gallery_assist/downloads. Now you can choose wich method you want. .

Another thing strengzs. if you use imagecache I can't understand why you remove the originals.
Imagecache can't work without them.

I can save storage space on my server with the deletion of originals, but I have to change the preview picture size to get bigger pictures seen in lightbox.

How you want to make this when you remove the originals????

In your case ekkljs, about presets etc. The last action of your preset must be a size action.
When not, how can know Gallery Assist the sizes to build the image, thumbnail boxes and the end the item box.

example
- action 1-> resize 60x60 (have size information)
- action 2-> desaturate (not have size information)

you can think why I not get the first acction?
ok look this example
- action 1-> resize 100x100 (have size information but not you want)
- action 2-> desaturate (not have size information)
- action 3-> crop 70x70 (have size information, the information needed by gallery assist)

I hope it help you
Regards
Juan Carlos

strengzs’s picture

Hi Juan,

Thank you for your efforts again. I am fine right now, the modules works like I want. You can close this issue.
I do not use image cache at all, I do not know that module.

A quick summary:
With ver. 1.6 the lightbox refers the original files in the gallery folder to show up, not from /prev. Unfortunately somehow the original files are deleted. So I opened the issue. In the meantime I tried your dev. version from your personal repo. and the lightbox module from there refers to /prev so everything is fine, and I do not care about the originals at all.

Anyway, I do not know your concept about the original files:
1, should be there (than we have/had this bug with disappearing of the files)
2, should be deleted

At the first time I thought lightbox refers to the original files because of the bigger size of the original image. (and this is the concept) Lightbox can resize the picture depends on the actual resolution of the screen, available space on the browser.
In the developer version pictures from /prev are smaller (as I set in your module) than the original. So I have to set is for bigger then the default 550 to get the benefit of lightbox resize capability. That is no problem for me, so this is fine again.

So if the originals are deleted by default, or by design, we can still use the module. And we can save storage space. For example my users can upload files to gallery from digital cameras (1-2 MBytes more than 2000 pixel resolution and your module converts it to smaller files, and deletes (or I do it myself) the original big files. Perfect solution.

It think this way is better than store the original files for common use of the gallery module when owner allows uploads for the users.
However to store the original files have other benefits of course.

Regards,
Zs

jcmc’s picture

Status: Needs review » Fixed

Hello strengzs,

It make me happy that now all works in your installation :-D.

For your information:
ImageCache is very good when you have many requests from your website. ImageCache make your website faster by loading and you have a better flexibility with the customizing of sizes in your layout.

Modules with preset-functionality (posibility to change thumbnail or preview sizes in your layout) needs the originals in case you change the sizes from presets. These modules with this feature, removes the old thumnbnail- or preview- or what ever preset-files and creates new with the new sizes.
In your case you can create new content types with assigments and other presets.

PS:

Anyway, I do not know your concept about the original files:
1, should be there (than we have/had this bug with disappearing of the files)
2, should be deleted

I never delete the originals, or better, the module change only the names (ok I have to update the files table with the new names) .
Extra because of your problem, I have implemented the feature in : Administer -> Site configuration -> Gallery -> Extras
fieldset "Upload process ->Files name filter". If you change this to "none" you have then the originals, which you have always wanted.

I did that with certainty because you are not the only one who has such an installation.

Ok, You and your clients should have fun with Gallery Assist.

Regards
Juan Carlos

jcmc’s picture

Status: Fixed » Closed (fixed)
berenddeboer’s picture

Status: Closed (fixed) » Needs review
FileSize
594 bytes

I think the thread has become very confusing, but I'm reacting to strengzs first post. He is completely right, the original file will be deleted after a while. I.e. after you run cron.

This happens because gallery assist uses the file_save_upload() function. Quote:

The file will be added to the files table as a temporary file. Temporary files
are periodically cleaned. To make the file permanent file call file_set_status
() to change its status.

So originals are removed I detected to my utter dismay.

Here's the patch that calls file_set_status().

berenddeboer’s picture

Version: 6.x-1.6 » 6.x-1.8-beta1

Bumped to 6.x-1.8-beta1, patch and test was against that version.

jcmc’s picture

Status: Needs review » Active

Hi berenddeboer,

I'm working on a solution of this problems.

I open the issue again.

Regards
Juan Carlos

berenddeboer’s picture

Thanks Juan. Your module is exactly what is needed in many situations, it's simple, and gets a gallery up immediately, and can be used easily in other pieces of code.

jgrossmcs’s picture

Hi Juan,

I've run into this problem, however I have a slightly different scenario:

I'm using the Gallery Assist 1.6 release code on Drupal 6.x and Linux/Apache (can't remember ver). I'm also using Lightbox 2 and Gallery Assist to Lighbox.

1. If I upload files that are "Portrait" orientation, meaning the image is TALLER than it is WIDE it never gets copied to the root gallery assist folder for that gallery. Therefore, I can never actually DISPLAY the image, only the thumbnails - which DO get created. This is unless I copy the files directly to the file structure using FTP or something AFTER posting them through the UI.

2. If I upload 6 images...then upload 6 more....then upload six more, eventually ALL the images get deleted - this MAY be due to the image file type being set to temporary, but that seems odd to me because I have OLDER galleries (the first 1 or 2 I created) that still work as expected. Only the most recent get deleted.

3. I don't have the administration vs. content creator issues with creating and posting to galleries, I think the person up the thread may not have set the permissions/roles for the gallery_assist content - which is different that core content.

Finally, one request, Bulk Image Uploads? Six at a time with the standard UI sort of sucks. Any thoughts on how to do this in bulk? Like 100 files at a time or something? Thanks!

Regards,
Jim Gross

jcmc’s picture

In this commit is the files.status record by 1.

http://drupal.org/project/cvs/601128

I am not secure or this is the solution for desapearing files. I less this report open and active.

jcmc

dzhu’s picture

Looks good!

I hope it will help, so I will test this solution, when you will release next version with this commit.

jcmc’s picture

Hello dzhu,

wait for the release 6.x-1.8beta2 please. I will make the release today in the next hours.

Regards
Juan Carlos

jcmc’s picture

Status: Active » Needs review

please give me fedback

dzhu’s picture

Now I use version 6.x-1.8-beta1 patched to change the files.status record to 1. We created two galleries after the patching, and the pictures still haven't disappeared. But I have to reload all previous pictures, because there is no files.status records at all for them. And I prefer to wait a week or so, to see is there any critical bug in 1.8 version, after that upgrade and then reload files. After that I hope I can report about successful module work.

I just want to be sure that 1.8 version is really stable.

jcmc’s picture

hi dzhu,

the 1.8 is the stablest version.

I can you inform wich are the only bugs. The are allready fixed to.

If you use postgresql #298578

if you need the list layout for galleries #297998

I recomended the update.I am workin on the version 2 and all posibilities to import form equal where, mass-uploas and upload compresed files.

Regards
Juan Carlos

dzhu’s picture

I have updated the module, from 6.x-1.8-beta1 to 6.x-1.8, and immediately get two errors, when I have tried to see some galleries:

Fatal error: Cannot redeclare gallery_assist_get_includes() (previously declared in /drupal/modules/gallery_assist/gallery_assist.module:2409) in /drupal/modules/gallery_assist_lightboxes/gallery_assist_lightboxes_display.inc on line 212

Fatal error: Cannot redeclare gallery_assist_image_more_info() (previously declared in /drupal/modules/gallery_assist/gallery_assist.module:2881) in /drupal/modules/gallery_assist_lightboxes/gallery_assist_lightboxes_display.inc on line 378

I have tried to turn off gallery_assist_lightboxes module, it haven't helped. So I have commented both gallery_assist_get_includes() and gallery_assist_image_more_info() functions in the gallery_assist_lightboxes module.

Update

I had 6.x-1.2-beta1 version of Gallery Assist Lightboxes module, now updated to 6.x-1.2, errors haven't appeared again. So it was some incompartibility between Gallery Assist Lightboxes 6.x-1.2-beta1 module and Gallery Assist 6.x-1.8 module.

strengzs’s picture

Hi there!

I have the same problem:
Fatal error: Cannot redeclare gallery_assist_get_includes() (previously declared in /home/kincsess/public_html/sites/all/modules/gallery_assist/gallery_assist.module:2409) in /home/kincsess/public_html/sites/all/modules/gallery_assist_lightboxes/gallery_assist_lightboxes_display.inc on line 212

I updated from 1.7 to 1.8

I copied back the 1.7 files and looks fine, but under the 1.7 to 1.8 update there was some database modification as well.
I hope you can fix this little problem soon. I love this module.
Thank you

jcmc’s picture

Status: Needs review » Fixed

Hello this issue exist not more at Gallery Assist version 6.x-1.8-beta2 and at Gallery Assist Lightboxes version 6.x-1.2.

It was my error not to advice in the release notes about the change and the Nedd to make the updates simultan to the two modules.

The layout feature "list" was added to the functionalities and the function gallery_assist_get_includes() was moved and centralized from gallery_Assist_lightboxes_display.inc to the mother module.

Today are the last versions:
for GA - 6.x-1.9-beta3
for GA-Lightboxes - 6.x-1.3-beta4

This error is not longer exists.

Status: Fixed » Closed (fixed)

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