[Elgg 1.5-1.12 & 2.X - 4.X: Tidypics] v1.8.1beta11

Release Notes

Changelog:

  • Some general code cleanup,
  • Fix of river entries appearing twice on image uploads in case the Flash uploader is used and the plugin option is set to create separate entries for each uploaded image (issue introduced in beta10),
  • Added TidypicsBatch class (that extends ElggObject class) used for creation of objects of subtype "tidypics_batch" (used for handling "batches" of uploaded images) instead of creation the objects as ElggObject and assinging the subtype,

Improvements on slideshow:

  • a slideshow can be started on all pages that display a suitable list of images (but the slideshow feature is only available if the slideshow plugin option introduced in beta10 is enabled in the plugin settings),
  • start of slideshow via title menu button,
  • slideshow will include the next 64 images (i.e. 5 pages of images) of the current displayed image list taking into account the current page offset (i.e. on page 1 the slideshow will display pages 1-5 while on page 10 it will display the images of pages 10-14 etc.). (Longtime goal for future Tidypics versions: no limitation of number of images in slideshow and most likely replacing the PicLensLite slideshow by something else / something better. Currently, the number of images to be included in a slideshow is somewhat limited by avoiding running into memory issues. Also, the PicLensLite slideshow library requires the Flash plugin on client browsers which is annoying and the 3D wall feature does no longer work),

Improvements on image orientation correction at image uploading:

  • using best methods available depending on image library selected,
  • update orientation information saved in image file after a change of image orientation if the image library used supports this (GD library unfortunately does not support it but the exif info saved in the image file is lost on image orientation correction anyway),
  • support of orientation correction not only of rotated but also of mirrowed (and possibly additionally rotated) images,

Some remarks regarding which image library to use for Tidypics:

  • if possible and available on your server use the "ImageMagick executable". Generally, this library has a much smaller memory requirement compared to the GD library both for image resizing (i.e. creation of thumbnail preview images) and orientation correction of images. Additionally, the exif information saved in an image file will be preserved both during resizing and orientation correction processing,
  • next best choice after "ImageMagick executable" is the "imagick PHP extension". It also has a low memory consumption compared to the GD library but you might lose exif information during image processing,
  • the GD library should be available on any server (as Elgg core requires it anyway). The memory requirement of the GD library can be quite high both for creation of thumbnails and image orientation corrections. The memory requirement is depending not on the image file size in the first place but on image resolution, color depth per pixel and color channels per pixel (so even a small sized image file might require more memory than available on the server). If you use the GD library for Tidypics on your server, your users might not be able to upload larger images. Additionaly, exif information saved in the image files might get lost during image orientation correction.
  • @iionly,  I am using tidypics 1.8.1beta 11 with imagemagick on elgg 1.8.16,  I have file_tools 1.8 set to show folder structure, however, i can not find any individual user or group folders/files anywhere (unless i'm not looking in the right place).... maybe that is the problem?? where should these files be located, and if they are not there, how would i solve this issue? It could possibly be a Host Papa issue.  the path that they gave me to activate imagemagick works in the tidypics settings, but i can not find the path to the file anywhere in my Cpanel-even with a search.  I will send them another note as well.... thanks again for the support :)

  • @iionly:  oh, i found the data files!! (i was confused at first by the format).  HostPapa says the directory to imagamagick is correct, and after testing i see they are right.  the photo's are uploaded to the image folder of the user data files, but they are not showing up on the elgg site.  instead of a thumbnail (from the edit photo step), i only see the name of the photo.  when i make a title and description it shows up on the album page, but no photos.  all of the in these image files are within the 5mb allowance setting. avatars seem to be working fine.  next step??

  • Just to confirm: are you sure that the image files are saved correctly in the data directory? For each uploaded image there should appear 4 image files (different sizes of the image used on the site). The names of these files are <upload_timestamp><image name>.extension for the original file and additionally the "thumb", "largethumb" and "smallthumb" prefix for the resized image files. Also, is the filesize of all the image files larger than 0? I have to admit that I'm currently at a loss why the images should not show up on the site, if they are really saved correctly in the data directory.

    In case the image files are not all there or the filesize is 0 the problem might be caused by a too small value of post_max_size in Elgg's .htaccess file. The value of post_max_size should be large enough to handle the added size of all images uploaded in one batch - and best would be to make it even a bit larger just to be on the safe side. The 5MB limit set in Tidypics settings is an option to allow restricting the max size of image uploads. But it's still necessary to configure the server / Elgg's .htaccess to allow for uploading and processing files of the desired size, i.e. you would need to make sure that upload_max_filesize and post_max_size are large enough to be able to handle 5MB files.

    If you think all settings are correct and the files are all existing in the data directory: could the problem be caused by another plugin or your theme plugin?

  • @iionly - yup have done all of that, setting page is set for 10M uploads, but javascript complains that the pic exceeds 5M.

    I suspect some of the problem might be at the user's end...

  • @Baradhili: when you say "the problem might be at the user's end" what limit is shown on the upload page for you? Does uploading images larger than 5MB work for you? On the Tidypics settings page you will have to enter the image filesize limit without any "M" or "MB", i.e. you would only enter the number like "10" for a 10 MB filesize limit.

    If you still use GD library for image resizing you need to keep in mind that there's also a difference between the error messages "too many bytes" and "too many pixels". The "too many bytes" means that the image file is larger than allowed. The "too many pixels" means the image requires too much memory for resizing (more memory than allowed by memory_limit in .htaccess).

  • @iionly:  the user data files appear to be creating the different sizes off the originals correctly.  however, the photo's that are uploaded to a Group will appear in the Data image folder of the user who uploaded them, but  does not get rendered to other sizes within the data image folder.  viewing the album on the site, only the name of the photo's appear in the album (no thumb).  Another thing is that in a Group album the title link of the album is mirrored- one in bold, the other regular.  also, the same photo names of the Group pictures are also automatically showing up on the personal page of the user who uploaded the photos to the Group.  I am using the Purity Theme.  i would be interested in trying another theme that tidypics seems to be working good on..... just to try and see if that could be some part of the issue....any suggestions? thanks again :)

  • @iionly,  to clearify, all of the uploaded pictures OTHER than the ones being uploaded via tidy pics are working fine in the user data/image files.

  • @iionly:  also, i tried using the Thumbnail Creation in the settings and got this error: "unable to get oritinal photo".  (if this helps??)

  • @w2f: are you sure that uploading images to group albums ALWAYS fails or would it work for example for an image that worked to be uploaded to a normal user album? I rather suspect that the uploading of an image to a group album failed because the image itself was again larger than your server config can handle. Adjust the php variables in Elgg's .htaccess file (or you might need to adjust the server's php.ini if the values set in .htaccess are ignored):

    • memory_limit: VERY important when using GD php extension for image resizing. It's the main limiting factor here. If possible using Imagick php extension or ImageMagick executibles instead - and make sure that not only these tools are installed on the server but also used by Tidypics! 
    • post_max_size: needs to be large enough to handle the sum of all images uploaded in one batch PLUS some overhead. If you stick to the basic uploader it's easier to define a post_max_size, e.g. maximum of 10 images per batch with for example  5MB per image ==> post_max_size at least 50 MB (or make it 64MB to be on the safe side). With the Flash uploader the problem is that there's no limitation of number of images of a batch (one reason I personally stick with the basic uploader...).
    • upload_max_filesize: no files larger than that can be uploaded. The Tidypics image size limit is only an additional limit, e.g. you can set upload_max_filesize to 100 MB to allow for video upload but still set the limit within the Tidypics settings to 5MB. But it won't work the other way round.

    The problem is that it's quite impossible to catch all reasons for failed image uploads within Tidypics that are caused by the limits due to the php variables. There are some checks but if you don't configure your server properly in the first place there are chances that some uploads will fail. Check the server info tab on the Tidypics settings page to see what values are in use on your server. Even though you might have adjusted the values in .htaccess they might not be in use on your server depending on the server config.

    Please also read the other comments. I might have answered the same question already in the past.

    Regarding the visiblity of group content: that's how it works on Elgg (not only within Tidypics). Depending on the access level people get to see content (or won't see it).

    Regarding thumbnail creation: if the image upload failed in the first place, the thumbnail creation is not possible. If you don't see any image / thumbnail image this is a sign that the original image upload failed. If you see a question mark placeholder image instead of the thumbnails this indicates that most likely only the thumbnail creation failed. In this case you can try the re-creation of the thumbnails. In case the upload already failed there's no way to fix it and the only thing to do is to delete the entry.

    Themeing issues: does the same issue also occur with Elgg's default theme? If yes, I might indeed need to fix this in Tidypics. But if it occurs only with some theme it is most likely a bug in this theme that would need to be fixed by upgrading this theme.

  • @iionly:  I have imagemagick executibles path on tidypics settings working good.  The Server Info. shows: GD-enagbled, imagick-enabled, exec()- enabled (imagemagick),  Memory available to PHP- 64MB, Memory Used to load this page- 17.30MB,  Max File Upload size- 64MB,  Max Post Size- 64MB, Max Input Time- 60's, Max execution time- 3-'s, GD imagejpeg- enabled, GD imagepng- enabled, GD imagegif- enabled, exif- enabled, cookie only sessions-enabled.

    from elgg .htaccess php shows:

    ############################ # PHP SETTINGS <IfModule mod_php5.c> # limit the maximum memory consumed by the php script to 64 MB php_value memory_limit 64M # register_globals is deprecated as of PHP 5.3.0 - disable it for security reasons. php_value register_globals 0 # post_max_size is the maximum size of ALL the data that is POST'ed to php at a time (8 MB) php_value post_max_size 8388608 # upload_max_filesize is the maximum size of a single uploaded file (5 MB) php_value upload_max_filesize 5242880 # on development servers, set to 1 to display errors. Set to 0 on production servers. php_value display_errors 0 </IfModule>

    ............................

    however, something strange did happen tonight while adding a new user avitar: we got this error message:

    "Fatal error:  Out of memory (allocated 29884416) (tried to allocate 17152 bytes) in /home/mysite/public_html/myELGG/engine/lib/filestore.php on line 141"  .    This is the first time this has happened (that i am aware of).  however, when we changed the name of the file before re-uploading it again it worked!  (we changed it from DSCF2xxx.jpeg, to "image").   Not sure if this is at all related to this issue... the avitar is fine now... but just adding the results incase it might indicate some related setting problem on my end?

    Also, I tried changing the theme back to basic elgg and had the same issue, so i don't think it is a theme issue then.  maybe another plugin??  funny thing is that even though i have deleted to photo file names and albums several times, they reappear each time i re-activate tidypics to check on my progress....and then delete them all again.  i read through past posts and could not find anything specific to this problem...but my eyes are blurring from reading so much....i'll take a break for now and get back on it again in a few days...maybe i overlooked the post.  thanks again for the replies and help.

     

  • @w2f:

    Is max_execution_time really just 3 seconds (or even 3- seconds which would seem a typo)? Default is 30 seconds.

    Have you posted what's within your .htaccess file or what's in htaccess_dist (the template for .htaccess)? The values shown above are the default values (e.g. upload_max_filesize 5242880). If these values are really in your .htaccess and the server info page of Tidypics shows 64 MB for the maximum upload filesize this seejms to indicate to me that the values set for php variables in .htaccess are ignored on your server. This can be fully okay on some server configurations, for example in case suphp and suexec are used. But then you would need to keep in mind that you can't modify php variables by changing the values in any .htaccess file.

    Still, the config shown on the server info page looks good to me.

    Regarding the fatal error on uploading an avatar image you have to keep in mind that only Tidypics will use ImageMagick for resizing images. Elgg will still use the GD php extension for resizing avatar images and images uploaded using the Files plugin. So, you will still be limited regarding image size of profile images. The error most likely has occured because at the first try there really wasn't enough free memory available for resizing the image. You could increase the memory_limit php variable to 128M to provide more memory in general. But if your server does not have enough free memory that can be allocated it will still not work.

    Regarding the album title may I ask if you might refer to the so called "breadcrumb" links when saying the album title appears twice? The breadcrump links provide a way to navigate between the different pages of Tidypics and are displayed above the title section of the Tidypics pages (which would display the album title on the album gallery page).

    When you say "deleting photos and albums" do you mean you deleted the image files and album directories in the data directory? If you meant that: DON'T DO IT THIS WAY!!! The image entries and albums shown on your site are based on entries in the database. These entries are created when uploading an image or creating an album. If you delete the image files directly from the data directory the entries in the database will still be there but now they are invalid because the corresponding image files are missing. Remove any image entries and/or albums ALWAYS using the "Delete" link on your site! The image files will automatically get deleted from the data directory then but also the entry in the database will get removed.

    For the invalid database entries of images and albums (i.e. for entries you deleted the files directly) you most likely won't be able to use the "Delete" link anymore because these image entries can be displayed correctly anymore on your site because the image files can't be found within the data directory. To remove such invalid entries you would have to remove the entries via the "Delete image" tab on the Tidypics settings page by entering the GUID number of the now invalid image entries (the GUID is the number included in the URL of these image entries).

  • @iionly

    Sizing is set to 10 in the settings page

    Image library is set to imagick php extension

    user is complaining now of getting timeouts - max execution time is set to 130s

     

    Thanks

    Bret

  • @bret: well, larger files take longer to upload. Depending on the bandwidth of your server and also depending on the connection speed of the user who uploads files you might need to increase max_execution_time and max_input_time. I can't give any general advice here at what values are "correct". The time needed highly depends on your individual situation (your server, connection speed of user, maximum file size allowed, etc. etc.). I can only suggest to increase the time limits at least slightly to avoid timeout errors.

  • @iionly:  thanks for the info.  the 3 was a typ-o, should be 30 seconds so that is ok.

    i posted what is in the .htaccess file not the htaccess_dist.

    About the deleting of photo's, at first i only deleted them from the photoalbum...but i noticed that it did not remove the photo's from the data files... so i did delete them that way! even thought the the data image folders are empty (because of deleting the picutres) i can not delet the image folders.  i'm guessing that could be adding to the problem.  i'm the only user setting up pictures and albums on the site for now, so do you think it would be easier (and work) to completely uninstall the the tidypics and reinstall it fresh?? 

  • @w2f: to be honest I'm out of ideas. While it might be a bit tricky to get the php environment variables set up correctly to avoid issues with uploading pictures it should work when the variables are set to large enough values - and it should work at least for small images without issues. But deleting images and albums from the site should work (the only thing I just noticed is that the empty album folder might remain undeleted from the data directory which I need to investigate further - still image files do get removed from the data directory when deleting the image on site). Removing the album and images entries from the site should work without issues if doing it either as album owner or admin. If this fails for you there might be some larger issue with your Elgg installation. Maybe the Tidypics plugin folder is incomplete or contains files with wrong permissions. Or the data directory has wrong permissions. So, if a fresh install is possible, you could try it. Hopefully, the problem does not occur anymore then.

  • @iionly:  i deleted tidypics (1.8.1beta11). plugin and zip.  then download new again from the link on elgg.... then uploaded the new zip  and created a new album in my profile with new photo names.  This is what happened: 

    first of all, after uploading the photos, the "organize" and "slide show" buttons showed up.  (they weren't there before).  However the same issue happened with the name of the photo being doubled with no thumb. 

    The previous settings were still held in memory when i went to tidypics settings.  so were the old album names and picture numbers....however, this time i deleted them all from within tidypics and it worked. (that's great).

    I checked the elgg data folder for the newly uploaded photos and they are there and viewable from the data file, (but again, not in the tidypics album).

    at this point i will contact our host server, maybe its a permissions thing?....(i did have a big problem with the elgg update to 1.8.16 which required host server intervention on my end just to get it installed successfully)- tidypics was working fine (except in groups albums) prior to that when we used elgg 1.8.14). if it is in php, i'm not sure what to even look for.  please let me know if you think of anything else.... otherwise, i will post back if i can get it resolved somehow (incase this happens down the road to someone else).  thanks so much for all the help!

  • @iionly: ps...premissions are set at 644.....if that makes any difference??

  • @w2f: permissions 644 for the files in the tidypics plugin folder sounds right.

    When the "sort" and "slideshow" button only showed up now after the re-install it seems to me something had gone wrong on the first install (or upgrade to) Tidypics 1.8.1beta11.

    If the image files uploaded using Tidypics are now saved correctly in the data directory but still do not show up on the site I think it's not likely that the problem is now within the data directory. I would expect that the read permissions are right when the write permissions obviously are.

    Maybe the old install of the Tidypics plugin was not the only plugin that failed to work after the upgrade or the upgrade of your site to Elgg 1.8.16 itself introduced the problem. First, I would suggest to disable ALL other plugins apart from Tidypics temporarily to check if the images will show up on your site. This is the easiest way to verify any possible problems by other plugins. If the images still do not show up the problem might be caused by something that went wrong when upgrading the site to Elgg 1.8.16. Possibly some files of Elgg core were not copied to the server at all or only incomplete. You could overwrite your installation by copying the files again on the server and the run the upgrade script again. This will not harm you installation (in case the files were already there they will only get replaced by an exact copy while any missing or incomplete files will be added).

  • Hello,

    I'm hosting the Elgg installation at GoDaddy (Deluxe hosting plan).

    The path commands is /usr/bin/

    Each time I upload pictures I get no result, (i'm getting nothing as picture), see capture.

    image

    This is my server info:

    image

    image

    Could anyone help?

    Best regards.

  • @LED: The Info tab shows that ImageMagick is installed and you verified the path on the ImageMagick tab. But have you also entered this path on the Settings tab and selected the "ImageMagick executable" as image library?

    Also, you might need to increase post_max_size. The size would need to be "size of sum of images" + html form. Depending on the limit you defined on the Settings tab for a single image the current post_max_size might be too small.

    If the above is configured, try uploading a single small image with the basic uploader. Does it work or not? What about the image entries that failed: does the original image show up when you click on the thumbnail on the album gallery page and then again on the placeholder image on the image page or does the image page already fail to load? The question mark placeholder images indicate that something went wrong on image resizing - maybe due to the image library / post_max_size not configured correctly. Still it would be interesting to know for debugging the issue if the original image itself was uploaded to the server correctly.

  • i just noticed that the 'more link' underneath the recent images widget for profiles produces a 'that page is only for logged-in users' type of message if the current user is not logged-in.. which is different behaviour to the other widgets in elgg.. 
    usually they forward to the page and we can see the items that are designated to be visible publicly.

  • @ura: I'll have to look into this. I don't remember at the moment if I had a reason to restrict access to logged-in users for these pages or if it just seemed right without any real justification. Actually, I'm pretty sure I've never tested out this link when logged out as the widgets have access level "logged-in" by default, and I've never tested what happens when you change it to "public".

  • i am coding an ajax plugin here that loads all tabbed pages dynamically in elgg.

    i am looking at how best to approach tidypics and am thinking of replacing the many sidebar buttons that are currently rendered with a bunch of tabs and a dropdown selector (as with the river/activity page).

    initially i am thinking of keeping the standard 3 tabs for 'all, owner and friends' and then having maybe 2 dropdowns:

    1. choose album or image
    2. choose view type (e.g. recent comments, recently viewed, images you are tagged in).

    possibly a 3rd dropdown could be used to choose a time period.. or perhaps a slider or calendar as seen here:
    http://pixelkit.com/free-ui-kits/dark-velvet/

    if anyone has any inspired thoughts about a better approach then let me know

  • hmm.. now i am thinking of a one column tidypics view with more than 3 tabs ;)

  • @iionly: i created a completely new 1.8.16 site with a new data folder. using the basic theme (only the default plugins on) with the newest tidypics plugin added, i had the same problem.... this time with no scaling to different sizes to album photos in the data folder, while the avitar scaled normally. So, i deleted the album from tidypics side but even though the pictures deleted from the datatfolder, the data folder itself did not delete. (but i think you mentioned a future fix for that).  if i ask the server tech support to change or check any settings, i will probably need to know what to ask them to look for.... do you have any recommendations? (i'm completely stumped!) seems that all of the server info and settings are correct from the tidypics settings side.

Stats

  • Category: Photos and Images
  • License: GNU General Public License (GPL) version 2
  • Updated: 2022-5-15
  • Downloads: 142112
  • Recommendations: 232

Other Projects

View iionly's plugins