[WINDOWS] Import from Gallery2 Error: [parent_id] => invalid

Gismo

Joined: 2003-08-17
Posts: 46
Posted: Sun, 2010-12-26 12:56

Hi,

when i try to import my pictures form my Gallery2 installation i become this error:

1746 ORM validation errors: Array ( [parent_id] => invalid ) exception 'ORM_Validation_Exception' with message 'ORM Validation has failed for items model'

What is wrong!? I have allready run a import form a other Photo album and this workes great, only this album is not working.

greetings

gismo

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2010-12-26 20:48

Sounds like you have an integrity issue in your G2. Try running the http://codex.gallery2.org/Gallery2:Modules:integrity on your G2.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
Gismo

Joined: 2003-08-17
Posts: 46
Posted: Sun, 2010-12-26 21:17

Hi,

i have found this error:

Failed to load entity ids: 2448, 2456, 2457, 2458, 2459, 2460, 2461, 2462, 2463
Unknown plugin: theme hasi
Orphaned data in table PluginParameterMap with no row in PluginMap table; ids: module/rewrite
Path component F:\Webserver\hasigallery\g2data\albums\2003\Januar03\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2003\Februar03\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2003\Maerz03\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2003\April03\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2003\Mai03\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2003\Juni03\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2003\August03\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2003\September03\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2003\Oktober03\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2003\November03\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2003\Dezember03\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2003\Juli03\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2004\Januar04\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2004\Mai04\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2004\Juni04\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2004\August04\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2004\September04\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2004\Oktober04\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2004\November04\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2005\Januar05\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2005\Mai05\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2005\Juli05\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2005\August04\Thumbs.db not connected to any item
Path component F:\Webserver\hasigallery\g2data\albums\2005\September05\Thumbs.db not connected to any item

What can i do to repair this error?!?!

 
Gismo

Joined: 2003-08-17
Posts: 46
Posted: Mon, 2010-12-27 11:55

ok, i have installed a new Gallery2 Version and imported all the pictures to the new gallery2 Version. The integrity check is now clean with no error and the gallery2 is working BUT when i try to import the gallery to gallery3 i become the SAME error:

3137 ORM validation errors: Array ( [parent_id] => invalid ) exception 'ORM_Validation_Exception' with message 'ORM Validation has failed for items model' in.....

Is there a problem because i allready HAVE Albums from a other gallery2 imported to gallery3 !?

 
crackers

Joined: 2002-10-24
Posts: 67
Posted: Tue, 2010-12-28 14:27

will start my own thread.... sorry :)

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2010-12-30 03:59

@Gismo: I don't know that anybody has tested importing two different G2's into a single G3. I doubt that will work. Can you look in your gallery3/var/logs error logs and infd one of those ORM_Validation_Exception errors and paste it in its entirety here? That will help.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
Gismo

Joined: 2003-08-17
Posts: 46
Posted: Thu, 2010-12-30 11:22

exception 'ORM_Validation_Exception' with message 'ORM Validation has failed for items model' in F:\Webserver\gallery3\system\libraries\ORM_Validation_Exception.php:20
Stack trace:
#0 F:\Webserver\gallery3\system\libraries\ORM.php(755): ORM_Validation_Exception_Core::handle_validation('items', Object(Validation))
#1 F:\Webserver\gallery3\modules\gallery\models\item.php(799): ORM_Core->validate(NULL)
#2 F:\Webserver\gallery3\system\libraries\ORM.php(778): Item_Model_Core->validate()
#3 F:\Webserver\gallery3\modules\gallery\libraries\MY_ORM.php(23): ORM_Core->save()
#4 F:\Webserver\gallery3\modules\gallery\libraries\ORM_MPTT.php(76): ORM->save()
#5 F:\Webserver\gallery3\modules\gallery\models\item.php(362): ORM_MPTT_Core->save()
#6 F:\Webserver\gallery3\modules\g2_import\helpers\g2_import.php(476): Item_Model_Core->save()
#7 F:\Webserver\gallery3\modules\g2_import\helpers\g2_import_task.php(130): g2_import_Core::import_album(Array)
#8 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#9 F:\Webserver\gallery3\modules\gallery\helpers\task.php(90): call_user_func_array('g2_import_task:...', Array)
#10 F:\Webserver\gallery3\modules\gallery\controllers\admin_maintenance.php(194): task_Core::run('23')
#11 [internal function]: Admin_Maintenance_Controller->run('23')
#12 F:\Webserver\gallery3\modules\gallery\controllers\admin.php(62): call_user_func_array(Array, Array)
#13 [internal function]: Admin_Controller->__call('maintenance', Array)
#14 F:\Webserver\gallery3\system\core\Kohana.php(331): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#15 [internal function]: Kohana_Core::instance(NULL)
#16 F:\Webserver\gallery3\system\core\Event.php(208): call_user_func_array(Array, Array)
#17 F:\Webserver\gallery3\application\Bootstrap.php(67): Event_Core::run('system.execute')
#18 F:\Webserver\gallery3\index.php(97): require('F:\Webserver\ga...')
#19 {main}' in F:\Webserver\gallery3\modules\g2_import\helpers\g2_import.php:478
Stack trace:
#0 F:\Webserver\gallery3\modules\g2_import\helpers\g2_import_task.php(130): g2_import_Core::import_album(Array)
#1 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#2 F:\Webserver\gallery3\modules\gallery\helpers\task.php(90): call_user_func_array('g2_import_task:...', Array)
#3 F:\Webserver\gallery3\modules\gallery\controllers\admin_maintenance.php(194): task_Core::run('23')
#4 [internal function]: Admin_Maintenance_Controller->run('23')
#5 F:\Webserver\gallery3\modules\gallery\controllers\admin.php(62): call_user_func_array(Array, Array)
#6 [internal function]: Admin_Controller->__call('maintenance', Array)
#7 F:\Webserver\gallery3\system\core\Kohana.php(331): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#8 [internal function]: Kohana_Core::instance(NULL)
#9 F:\Webserver\gallery3\system\core\Event.php(208): call_user_func_array(Array, Array)
#10 F:\Webserver\gallery3\application\Bootstrap.php(67): Event_Core::run('system.execute')
#11 F:\Webserver\gallery3\index.php(97): require('F:\Webserver\ga...')
#12 {main}
2010-12-27 03:52:51 -08:00 --- error: exception 'G2_Import_Exception' with message 'Fehler beim importieren des Gallery 2 Albums "september02" mit der ID 3137
ORM validation errors: Array
(
[parent_id] => invalid
)

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2010-12-30 21:00

Soo... you're on Windows and that's an unsupported platform. I'm not excited about spending a lot of time on this to find out that it's a Windows issue. If you can reproduce this on Linux I'll absolutely investigate.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
Gismo

Joined: 2003-08-17
Posts: 46
Posted: Thu, 2010-12-30 22:50

Yes, this is the easy way, so thx for your "help"

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2010-12-30 23:09

I don't know how to interpret that comment. I guess I could interpret it as you being unhappy that I'm not helping you, in which case I could reply taht I thought that writing 30,000+ lines of code and giving it to you for free was "help" enough...
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
Gismo

Joined: 2003-08-17
Posts: 46
Posted: Fri, 2010-12-31 07:25

A brief overview of the requirements of Gallery 1 and Gallery 2:
Platform - UNIX (BSD, Linux, ...) or Windows
Webserver - Apache, Microsoft IIS, Zeus, ...
PHP - PHP version 4.3.0 or greater (Gallery 1.x requires PHP 4.1.0 or greater), PHP safe_mode must be turned off
Image Processing Library - In order to automatically generate thumbnails and resized versions of your photos, Gallery requires either ImageMagick or NetPBM. Gallery 2 additionally supports GD and GraphicsMagick
Database (Gallery 2 only) - MySQL 3.x, 4.x or 5.x, PostgreSQL 7.x or 8.x, Oracle 9i or 10g, DB2 8.2, MS SQL Server 2005 (Gallery 1.x does NOT require a database)

This are the requiremts form the gallery homepage..... and yes, Windows is not supported ;) So why do you write that the requrements are Windows and IIS and you do not support them?

I love your gallery and i realy thanks alot for your work!!!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2010-12-31 07:42

That's true for Gallery 1 and Gallery 2. But you're using Gallery 3, and its requirements are here:
http://codex.gallery2.org/Gallery3:Requirements

Both Gallery 1 and Gallery 2 are still available (though you have to get G1 from https://sourceforge.net/projects/jallery/), you can download and use them on Windows and they'll work just fine! But Gallery 3 was not designed to run on Windows/IIS and probably has lots of issues if you try to use it there. I apologize for the confusion and have updated the requirements link to point at the G3 requirements to make it clearer.

---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
Gismo

Joined: 2003-08-17
Posts: 46
Posted: Fri, 2010-12-31 07:46

oh ok, so after 7 year i have to search for a other photo album that is supporting one of the most popular operating system in the world....

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2010-12-31 08:00

7 years, wow -- sorry to see you go. But we can only do so much with the resources we have.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
Gismo

Joined: 2003-08-17
Posts: 46
Posted: Fri, 2010-12-31 14:54

fixed the bug by myself.... by the way, it IS A BUG in gallery NOT in Windows.....

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2010-12-31 19:16

Awesome. Give me the details about the bug fix and I'll fix it in the code.

I get that you're unhappy about this, but I think you're missing the point here. We have very few folks working on this project. There's nivekiam and floridave working the forums as hard as they can and I'm the only developer. I am not a Windows expert, I don't have IIS installed, I don't run Gallery on Windows. I'm barely keeping up with Linux level support and trying to get the 3.0.1 release out the door, much less the hundreds of features people want in 3.1. This is all I can do, anything more has to come from help from the community. If you're willing to help, then I'm sure we can get G3 working on Windows, but there's no way that we can stand behind it with the limited resources we have.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
futbar

Joined: 2011-01-09
Posts: 2
Posted: Sun, 2011-01-09 20:49

Hi Bharat...

I'm having the same issue (importing two separate G2's into a single G3 instance) as Gismo; however, I am running G2 and G3 on a Linux platform.

Importing the first g2 instance went without issue; it's importing the second (and larger) G2 that's dying at the moment.
I already ran the Integrity check on the latter G2, it found no issues there.

Here's a sample from my G3 error log:


2011-01-09 11:24:57 -08:00 --- error: exception 'G2_Import_Exception' with message 'Failed to import Gallery 2 album with id 497 and name DespairClassic.
ORM validation errors: Array
(
[parent_id] => invalid
)
exception 'ORM_Validation_Exception' with message 'ORM Validation has failed for items model' in /var/www/hosts/g3.test.lan/htdocs/system/libraries/ORM_Validation_Exception.php:20
Stack trace:
#0 /var/www/hosts/g3.test.lan/htdocs/system/libraries/ORM.php(755): ORM_Validation_Exception_Core::handle_validation('items', Object(Validation))
#1 /var/www/hosts/g3.test.lan/htdocs/modules/gallery/models/item.php(799): ORM_Core->validate(NULL)
#2 /var/www/hosts/g3.test.lan/htdocs/system/libraries/ORM.php(778): Item_Model_Core->validate()
#3 /var/www/hosts/g3.test.lan/htdocs/modules/gallery/libraries/MY_ORM.php(23): ORM_Core->save()
#4 /var/www/hosts/g3.test.lan/htdocs/modules/gallery/libraries/ORM_MPTT.php(76): ORM->save()
#5 /var/www/hosts/g3.test.lan/htdocs/modules/gallery/models/item.php(362): ORM_MPTT_Core->save()
#6 /var/www/hosts/g3.test.lan/htdocs/modules/g2_import/helpers/g2_import.php(476): Item_Model_Core->save()
#7 /var/www/hosts/g3.test.lan/htdocs/modules/g2_import/helpers/g2_import_task.php(130): g2_import_Core::import_album(Array)
#8 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#9 /var/www/hosts/g3.test.lan/htdocs/modules/gallery/helpers/task.php(90): call_user_func_array('g2_import_task:...', Array)
#10 /var/www/hosts/g3.test.lan/htdocs/modules/gallery/controllers/admin_maintenance.php(194): task_Core::run('9')
#11 [internal function]: Admin_Maintenance_Controller->run('9')
#12 /var/www/hosts/g3.test.lan/htdocs/modules/gallery/controllers/admin.php(62): call_user_func_array(Array, Array)
#13 [internal function]: Admin_Controller->__call('maintenance', Array)
#14 /var/www/hosts/g3.test.lan/htdocs/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#15 [internal function]: Kohana_Core::instance(NULL)
#16 /var/www/hosts/g3.test.lan/htdocs/system/core/Event.php(208): call_user_func_array(Array, Array)
#17 /var/www/hosts/g3.test.lan/htdocs/application/Bootstrap.php(67): Event_Core::run('system.execute')
#18 /var/www/hosts/g3.test.lan/htdocs/index.php(97): require('/var/www/hosts/...')
#19 {main}' in /var/www/hosts/g3.test.lan/htdocs/modules/g2_import/helpers/g2_import.php:478
Stack trace:
#0 /var/www/hosts/g3.test.lan/htdocs/modules/g2_import/helpers/g2_import_task.php(130): g2_import_Core::import_album(Array)
#1 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#2 /var/www/hosts/g3.test.lan/htdocs/modules/gallery/helpers/task.php(90): call_user_func_array('g2_import_task:...', Array)
#3 /var/www/hosts/g3.test.lan/htdocs/modules/gallery/controllers/admin_maintenance.php(194): task_Core::run('9')
#4 [internal function]: Admin_Maintenance_Controller->run('9')
#5 /var/www/hosts/g3.test.lan/htdocs/modules/gallery/controllers/admin.php(62): call_user_func_array(Array, Array)
#6 [internal function]: Admin_Controller->__call('maintenance', Array)
#7 /var/www/hosts/g3.test.lan/htdocs/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#8 [internal function]: Kohana_Core::instance(NULL)
#9 /var/www/hosts/g3.test.lan/htdocs/system/core/Event.php(208): call_user_func_array(Array, Array)
#10 /var/www/hosts/g3.test.lan/htdocs/application/Bootstrap.php(67): Event_Core::run('system.execute')
#11 /var/www/hosts/g3.test.lan/htdocs/index.php(97): require('/var/www/hosts/...')
#12 {main}

If you require any additional debugging data, please let me know and I'll gladly put it together.

Any assistance you can provide will be greatly appreciated. :)

Thanks in advance..
--futbar

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2011-01-11 00:44

So @Gismo, are you going to contribute your solution back to us? I guess this just underscores my point -- the people who can help prefer not to, and instead prefer us to spend our time solving their problems :-(

@futbar: I haven't tested it, but I'm pretty sure that you can't import two Gallery 2 instances into a single Gallery 3. We have a table where we track the ids from the G2 mapped to the G3, and as soon as your 2nd import refers to one of these it's going to get confused. I think we'll have to extend the G2 Import code to track separate G2 installs in order to make this work. If you file a ticket for this, I'll work on it when I can (probably not for a while though -- sorry).
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
futbar

Joined: 2011-01-09
Posts: 2
Posted: Tue, 2011-01-11 01:28

@Bharat: That makes sense, and explains why the import process does get partially through the import (it does create a few albums and sub-albums) before generating the error.

I'll open up a ticket for it, if for no other reason than it sounds like a nice feature to have eventually. Understandably not critical, just nice to have. :)

I'm also more than willing to test Gismo's fix if he's willing to share it. :D

Thanks!
--futbar