WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
Problem when creating an album with Unicode name (3 posts)

  1. mamouneyya
    Member
    Posted 2 years ago #

    Hi,

    There is a problem generating/accessing any photo under albums that were ORIGINALLY created with Arabic names. Apparently, the plugin fails to generate thumbnails, etc. No difference if you change the name to ASCII later. On the other hand, if you create a new album with ASCII name, and change its name to Arabic or whatever after that, no problems happen at all.

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. mamouneyya
    Member
    Posted 2 years ago #

    UPDATE:
    Hmm, looks like I got it. It seems that the plugin fails to encode Unicode names properly. The problem I was mentioning was mainly happening because of the improperly encoded (1) directory names and (2) DB paths that the plugin generates when creating an album using the name you originally set. Accessing the gallery directory via FTP I was seeing folders with names like:
    %d8%aa%d8%ac%d8%b1%d9%88%d8%a8%d8%a9
    and so the paths were configured inside ngg_gallery table in DB. I've just tried to test that with an album. I've directly renamed its folder and manually changed its path in DB using an Arabic name, and viola! all of the album photos become accessible.

    By the way, the same thing is applicable when uploading photos. The plugin improperly encodes any non-ASCII characters using characters like %xx1, etc, so the photo/album becomes inaccessible.

  3. mamouneyya
    Member
    Posted 2 years ago #

    Okay, I see that there is actually a warning message when creating a new album:

    Allowed characters for file and folder names are: a-z, A-Z, 0-9, -, _ )

    but this is really silly. A robust plugin must not depend on users to not do a simple mistake like this. Also, it makes no sense to make users unable to create albums with Unicode labels for the directory name sake. The plugin can generate a name with random hash or whatever to use for the directory in case it was unable to use the user input, and keeps the Unicode name for the label that site guests see. At least, the plugin must check the name that was entered before creating a useless album that cannot be used at all.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.