Support » Plugin: Eazyest Gallery » images db records still there after deleting folders

  • Resolved tgv604


    Hi Marcel,

    I keep experimenting with some large (122 albums, 1.5 GB) photo gallery, and noticed that after deleting all folders in back-end, there’s still a huge amount of “attachment” records in posts related to images that no longer exist — is that intentional?

    Also, just got this (a typo?):
    An error occurred while indexing your gallery.
    Please check your server settings to solve this error:
    Fatal error: Call to undefined function get_tansient() in D:\home\footy\wp-content\plugins\eazyest-gallery\includes\class-eazyest-folderbase.php on line 1638

    I’ve changed it to get_transient(), got no more errors


Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Marcel Brinkkemper


    No, this is not intentional. They should be deleted after the folder gets deleted.
    The searching ajax script in ‘All Folders’ should also find deleted images and clear them from db.
    I’ll check why they still remain.
    Thanks for the hint on the typo.

    Plugin Author Marcel Brinkkemper


    Just checked, the get_transient should have picked up a list a attachments (still) to delete.

    Plugin Author Marcel Brinkkemper


    Fixed in trunk.


    Just hit the problem another guy had before,
    with the gallery folder “wp-content/uploads/albums/” all images in back-end (when I open a folder and check thumbnail or full url in top right corner) has double “/albums/”, in this way:

    In database, image’s slug is correct, but every _wp_attached_file meta key starts with “album”: album/folderXX/imageYY.jpg

    AS a result, in front-end all images either don’t show at all, or show “missing attachment.

    All folders were picked up by the ajax script, my theme is a child theme of twentytwelve, wp 3.5.1, EZG 0.1.0-RC-2, active plugins – “Auto ThickBox Plus” and some definitely irrelevant tinymce enhancement.

    Tried it twice, second time by deactivating plugin, removing everything EZG-related from database (options, posts and metas), deleting in filesystem and re-transferring all photos, activating EZG, saving settings, opening “all folders” and going away to let it discover photos in peace.

    It died couple of times with “An error occurred while indexing your gallery. Please check your server settings to solve this error: 500 (Internal Server Error) – Internal Server Error” but that’s probably low-end hosting issue. Nothing in logs.

    And another bad one.. when I edit the slug for a folder in “quick edit” mode, a new empty folder with the slug as a name is getting created and then picked up by ajax script. Didn’t test this thoroughly but it seemed like the original folder (non-empty) also loses its caption. Will

    Oh and “Recent folders” widget seems not to honour “Number of folder icons to show” — displays the whole lot.

    Sorry for ruining your Sunday ))

    Plugin Author Marcel Brinkkemper


    Au contraire,
    It doesn’t ruin my Sunday. I love these kinds of detailed bug reports.
    I’ll start working on it tomorrow.
    The error 500 is most probably an out-of-execution-time error.
    The script processes 20 attachments per request. You can lower it by adding a filter to 'eazyest_gallery_max_process_items' (1 parameter, default 20)
    I hadn’t looked into the quick edit for folder slug yet. Thanks for noticing.
    BTW, it amazes me that the script has been downloaded so many times, and so few people discover bugs (or take the time to report them)
    Thanks again.

    Plugin Author Marcel Brinkkemper


    I could not reproduce the album/album/ error with trunk.

    Add folders in Admin and upload images in Admin -> No errors
    Add folders and images outside WordPress -> Auto Index -> No problems

    BTW, could you make separate support requests per issue, I might not look again at issues that are marked ‘resolved’


    I think I’ve found it. The /album/album issue happens on LAMP only (tried two hostings), while localhost (Win7/apache 2.4/php 5.3 as module) is immune to this. Another [possible – I didn’t tried it other way] condition is that EZG root folder is inside WP uploads folder.

    I suspect this bug has something to do with the _wp_relative_upload_path() [/wp-includes/post.php, line 230] used when generating metas — it returns path relative to wp_upload_dir() if no filters are registered. However, this function does not have a chance to mess things up on windows due to backslashes vs forward-slashes difference.

    Example: D:/home/footy/wp-content/uploads/albums/mugshots/img.jpg and D:\home\footy/wp-content/uploads on windows, /home2/roosfoot/public_html/dev/wp-content/uploads/albums/mugshots/img.jpg and /home2/roosfoot/public_html/dev/wp-content/uploads on linux.

    Saying this, I’m struggling to understand how the relative path ends up getting recorded correctly on windows

    p.s. in folderbase class at line 1864 $gallery_path is not initialised — doesn’t seem to be relevant here but anyway.

    Really hope all this makes sense


    Plugin Author Marcel Brinkkemper


    Eazyest Gallery changes the upload_dir for post_type galleryfolder. Maybe this fails somewhere on LAMP. However, the Eazyest Gallery demo on is running LAMP.
    Anyhow, I now have a direction to search. Thanks.

    Plugin Author Marcel Brinkkemper


    Got it. The wp_upload_dir filter didn’t get the $_POST variables.
    Fix will be in RC-5

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘images db records still there after deleting folders’ is closed to new replies.