3.0.4 release and restriction on filenames
Serge D
Joined: 2009-06-11
Posts: 2466 |
Posted: Mon, 2012-07-16 18:54 |
I do remember seeing special code restricting file naming convention to a certain style introduced in latest release Second question, is there a way to automatically adjust file names to comply with new restrictions Serge |
|
Posts: 2466
bump
Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter
Posts: 8339
bharat committed a fix last night for filenames with multiple . in them
http://gallery.menalto.com/node/107102#comment-394437
-s
Posts: 2466
Experimental snapshot was not updated with the fix
Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter
Posts: 27300
Does for me:
https://github.com/gallery/gallery3/commit/6d9d6a2e5d4fae49942e78e4e812c44934513f4a
try this link:
https://github.com/gallery/gallery3/downloads
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 2466
Made change above, but it did not resolve the issue. Still getting the following
Probably something else is missing
Some of my files due to Unicode look like this
"__ __________________.jpg"
"______________-____ ________________ ________.jpg"
"______________________ 001_001.jpg"
and this was fine before, as this is how Gallery created them
In general, why ORM validation need to be performed on existing items
I would understand rules are applied when file is uploaded, but after?
2012-07-24 10:38:38 -07:00 --- error: ORM Validation has failed for items model
#0 /gallery3/system/libraries/ORM.php(755): ORM_Validation_Exception_Core::handle_validation('items', Object(Validation))
#1 /gallery3/modules/gallery/models/item.php(773): ORM_Core->validate(NULL)
#2 /gallery3/system/libraries/ORM.php(778): Item_Model_Core->validate()
#3 /gallery3/modules/gallery/libraries/MY_ORM.php(34): ORM_Core->save()
#4 /gallery3/modules/gallery/libraries/ORM_MPTT.php(79): ORM->save()
#5 /gallery3/modules/gallery/models/item.php(523): ORM_MPTT_Core->save()
#6 /gallery3/modules/gallery/models/item.php(276): Item_Model_Core->save()
#7 /gallery3/modules/gallery/models/item.php(173): Item_Model_Core->relative_path()
#8 /gallery3/themes/greydragon/libraries/MY_Theme_View.php(547): Item_Model_Core->file_url()
#9 /gallery3/themes/greydragon/views/album.html.php(44): Theme_View->get_thumb_link(Object(Item_Model))
#10/gallery3/system/libraries/View.php(318): include('...')
#11/gallery3/system/libraries/View.php(260): View_Core->load_view('...', Array)
#12/gallery3/modules/gallery/libraries/MY_View.php(75): View_Core->render(false, false, false)
#13/gallery3/system/libraries/View.php(226): View->render()
#14/gallery3/themes/greydragon/views/page.html.php(234): View_Core->__toString()
#15/gallery3/system/libraries/View.php(318): include('...')
#16/gallery3/system/libraries/View.php(260): View_Core->load_view('...', Array)
#17/gallery3/modules/gallery/libraries/MY_View.php(75): View_Core->render(false, false, false)
#18/gallery3/system/libraries/View.php(226): View->render()
#19/gallery3/modules/gallery/controllers/albums.php(77): View_Core->__toString()
#20 [internal function]: Albums_Controller->show(Object(Item_Model))
#21/gallery3/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Albums_Controller), Array)
#22 [internal function]: Kohana_Core::instance(NULL)
#23/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#24/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#25/gallery3/index.php(113): require('...')
#26 {main}
2012-07-24 10:38:38 -07:00 --- error: Validation errors: Array
(
[name] => illegal_data_file_extension
)
Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter
Posts: 27300
Please update the thicket:
http://sourceforge.net/apps/trac/gallery/ticket/1897
with your findings.
Send Bharat a dump of your DB so he can replicate.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 7994
Hm. A database dump would be helpful, but barring that, can you give me a listing of the names of the files in that album?
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!
Posts: 85
@OP
I've just discovered tonight that, at least for me, spaces in filenames appear to be causing problems. I've posted my findings in a thread which bharat is also following:
http://gallery.menalto.com/node/107102
EDIT:
Never mind this post - though removing spaces from filenames fixed the issue I was having it was related to my firewall. I posted my my findings in the other thread.
Posts: 2466
Sorry, cannot provide you with the dump.
Files are all as above - file names were in Russian and when uploaded they are converted into this form. Until 3.0.4 update, it was functioning for 3 years just fine.
Latest update have some restrictions which were introduced, but I suspect no upgrade path was incorporated to adjust any existing file notations.
if you could describe rules for file names it would be helpful to figure out which file is "wrong" from my end.
Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter
Posts: 7994
Back from travelling - let's dig into this. All of those validation errors are generated in modules/gallery/models/item.php so let's figure out which one specifically you're tripping up on. I'm listing the four places where they happen below, all in the valid_name() function. Either you have more than one dot in a filename (line 810), you have a new file that's missing an extension (818 - probably not the issue), or you have a photo or movie that has an illegal extension (824, 830).
I suggest that you change the name of the error on those to something that tells you which line it's happening on and what the item id is and then we can figure out from the error what went wrong. Eg:
$v->add_error("name", "illegal_data_file_extension {$this->id} at " . __LINE__);
. Then generate the error and let's see what's in the logs.---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!