Importing G2 --> G3 RC 1, error: @todo G2_FUNCTION_FAILED

sarangan

Joined: 2008-05-07
Posts: 12
Posted: Thu, 2010-02-25 07:12

Error logs looks like this:
Please help need. Thanks.

Task Import from Gallery 2 started (task id 5)
Group 'Admin' does not exist in Gallery 3, skipping
User with id: 6 already imported, skipping
User with id: 5 already imported, skipping
exception 'Exception' with message '@todo G2_FUNCTION_FAILED' in /home/tamilwir/public_html/gallery3/modules/g2_import/helpers/g2_import.php:1117
Stack trace:
#0 /home/tamilwir/public_html/gallery3/modules/g2_import/helpers/g2_import.php(566): g2(Array)
#1 /home/tamilwir/public_html/gallery3/modules/g2_import/helpers/g2_import_task.php(145): g2_import_Core::import_item(Array)
#2 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#3 /home/tamilwir/public_html/gallery3/modules/gallery/helpers/task.php(90): call_user_func_array('g2_import_task:...', Array)
#4 /home/tamilwir/public_html/gallery3/modules/gallery/controllers/admin_maintenance.php(186): task_Core::run('5')
#5 [internal function]: Admin_Maintenance_Controller->run('5')
#6 /home/tamilwir/public_html/gallery3/modules/gallery/controllers/admin.php(57): call_user_func_array(Array, Array)
#7 [internal function]: Admin_Controller->__call('maintenance', Array)
#8 /home/tamilwir/public_html/gallery3/system/core/Kohana.php(330): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#9 [internal function]: Kohana_Core::instance(NULL)
#10 /home/tamilwir/public_html/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#11 /home/tamilwir/public_html/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#12 /home/tamilwir/public_html/gallery3/index.php(91): require('/home/tamilwir/...')
#13 {main}

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25967
Posted: Thu, 2010-02-25 14:31

Anything in the <gallery3>/var/logs for this import?
What version of G2.
FAQ: What information is required when I ask for help in the forums?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
sarangan

Joined: 2008-05-07
Posts: 12
Posted: Thu, 2010-02-25 15:23

2010-02-24 23:53:18 -08:00 --- error: Gallery 2 call failed with: Error (ERROR_MISSING_OBJECT)<b>in</b> modules/core/classes/helpers/GalleryItemAttributesHelper_simple.class <b>at line</b> 124 (GalleryCoreApi::error)
<b>in</b> modules/core/classes/helpers/GalleryItemAttributesHelper_simple.class <b>at line</b> 102 (GalleryItemAttributesHelper_simple::fetchViewCounts)
<b>in</b> modules/core/classes/GalleryCoreApi.class <b>at line</b> 1350 (GalleryItemAttributesHelper_simple::fetchViewCount)
<b>in</b> /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import.php <b>at line</b> 566 (GalleryCoreApi::fetchItemViewCount)
<b>in</b> /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import_task.php <b>at line</b> 145 (g2_import_Core::import_item)
<b>in</b> ??? <b>at line</b> 0 (g2_import_task_Core::import)
<b>in</b> /home/tamilwir/public_html/g3/modules/gallery/helpers/task.php <b>at line</b> 90
<b>in</b> /home/tamilwir/public_html/g3/modules/gallery/controllers/admin_maintenance.php <b>at line</b> 186 (task_Core::run)
<b>in</b> ??? <b>at line</b> 0 (Admin_Maintenance_Controller::run)
<b>in</b> /home/tamilwir/public_html/g3/modules/gallery/controllers/admin.php <b>at line</b> 57
<b>in</b> ??? <b>at line</b> 0 (Admin_Controller::__call)
<b>in</b> /home/tamilwir/public_html/g3/system/core/Kohana.php <b>at line</b> 330 (ReflectionMethod::invokeArgs)
<b>in</b> ??? <b>at line</b> 0 (Kohana_Core::instance)
<b>in</b> /home/tamilwir/public_html/g3/system/core/Event.php <b>at line</b> 208
<b>in</b> /home/tamilwir/public_html/g3/application/Bootstrap.php <b>at line</b> 67 (Event_Core::run)
<b>in</b> /home/tamilwir/public_html/g3/index.php <b>at line</b> 91

2010-02-24 23:53:18 -08:00 --- error: exception 'Exception' with message '@todo G2_FUNCTION_FAILED' in /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import.php:1117
Stack trace:
#0 /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import.php(566): g2(Array)
#1 /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import_task.php(145): g2_import_Core::import_item(Array)
#2 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#3 /home/tamilwir/public_html/g3/modules/gallery/helpers/task.php(90): call_user_func_array('g2_import_task:...', Array)
#4 /home/tamilwir/public_html/g3/modules/gallery/controllers/admin_maintenance.php(186): task_Core::run('1')
#5 [internal function]: Admin_Maintenance_Controller->run('1')
#6 /home/tamilwir/public_html/g3/modules/gallery/controllers/admin.php(57): call_user_func_array(Array, Array)
#7 [internal function]: Admin_Controller->__call('maintenance', Array)
#8 /home/tamilwir/public_html/g3/system/core/Kohana.php(330): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#9 [internal function]: Kohana_Core::instance(NULL)
#10 /home/tamilwir/public_html/g3/system/core/Event.php(208): call_user_func_array(Array, Array)
#11 /home/tamilwir/public_html/g3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#12 /home/tamilwir/public_html/g3/index.php(91): require('/home/tamilwir/...')
#13 {main}

 
sarangan

Joined: 2008-05-07
Posts: 12
Posted: Thu, 2010-02-25 15:24

The latest version of Gallery, Gallery 2.3.1

 
sarangan

Joined: 2008-05-07
Posts: 12
Posted: Thu, 2010-02-25 15:25

I have to tell you that my gallery is very large and have 250639 photos and about 2000 albums.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25967
Posted: Fri, 2010-02-26 00:17
Quote:
Gallery 2 call failed with: Error (ERROR_MISSING_OBJECT)

Seems your G2 might be partly broken,
Search the forums for "(ERROR_MISSING_OBJECT)" and there is a few post on how to correct that kind of issue.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
sarangan

Joined: 2008-05-07
Posts: 12
Posted: Fri, 2010-02-26 06:43

I have spent 6 hours to fix this by all those methods. But it still doesn't works.
floridave, please help to fix this.

Thanks.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25967
Posted: Fri, 2010-02-26 14:36
valiant wrote:
canned response:

Error (ERROR_MISSING_OBJECT) : Missing object for ...

some part of your g2 database isn't 100% ok, the data integrity is a little corrupted.
reason: unknown. fix: it's not easy, but you can fix the database manually, someone else had the same problem and i gave a few instructions:

http://gallery.menalto.com/node/32741

http://gallery.menalto.com/node/38916

I have never had this issue so can only offer the above.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
sarangan

Joined: 2008-05-07
Posts: 12
Posted: Fri, 2010-02-26 23:52

Non of these instructions was able to fix the problem. But it's ok, thanks anyway for your time.
Gallery2 is working fine for me and i will forget Gallery 3. :)

 
joe7rocks
joe7rocks's picture

Joined: 2004-10-07
Posts: 556
Posted: Sat, 2010-02-27 00:48

Sarangan: Fact is that your Gallery 2 data(base) is already broken in those places, you just not seeing it as it only happens with -lets say- 1 item in every 50,000.
But if you'd navigate to those photos you'd get an error anyway (unless its eg cached and you can't see it, yet).

You better fix them up anyway, either reupload the files, remove the entries, or fix the database inconsistency.
Yes, that is a pain, agreed, but shit happens sometimes.. (Talking as an owner of a G2 with Millions of photos :) )

Dog Photography | Gallery Themes

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2010-03-01 03:36

Please git pull the latest fixes, and report the new error / log messages:
http://github.com/gallery/gallery3/commit/1077477a9032d5a4855e19e2dd4ce923472b711c

It will probably still fail, but it should report why so we can identify the issue.

Note: I'd import into an empty / fresh G3 installation. Importing on top of a failed import is not handled perfectly.

 
sarangan

Joined: 2008-05-07
Posts: 12
Posted: Tue, 2010-03-02 07:58

valiant: I have pasted the error log below.

Quote:
Task Import from Gallery 2 started (task id 1)
Group 'Everybody' was converted to 'Everybody'
Group 'Registered' was converted to 'Registered Users'
Group 'Admin' does not exist in Gallery 3, skipping
Loaded existing user: 'admin'.
Added user to group 'Everybody'.
Added user to group 'Registered Users'.
Added 'admin' flag to user
Skipping anonymous user
exception 'Exception' with message '@todo G2_FUNCTION_FAILED' in /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import.php:1188
Stack trace:
#0 /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import.php(617): g2(Array)
#1 /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import_task.php(145): g2_import_Core::import_item(Array)
#2 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#3 /home/tamilwir/public_html/g3/modules/gallery/helpers/task.php(90): call_user_func_array('g2_import_task:...', Array)
#4 /home/tamilwir/public_html/g3/modules/gallery/controllers/admin_maintenance.php(186): task_Core::run('1')
#5 [internal function]: Admin_Maintenance_Controller->run('1')
#6 /home/tamilwir/public_html/g3/modules/gallery/controllers/admin.php(57): call_user_func_array(Array, Array)
#7 [internal function]: Admin_Controller->__call('maintenance', Array)
#8 /home/tamilwir/public_html/g3/system/core/Kohana.php(330): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#9 [internal function]: Kohana_Core::instance(NULL)
#10 /home/tamilwir/public_html/g3/system/core/Event.php(208): call_user_func_array(Array, Array)
#11 /home/tamilwir/public_html/g3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#12 /home/tamilwir/public_html/g3/index.php(91): require('/home/tamilwir/...')
#13 {main}

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2010-03-02 19:49

is there more information about it in your var/log/ files? (check for the timestamp of the errors in there)

 
sarangan

Joined: 2008-05-07
Posts: 12
Posted: Tue, 2010-03-02 21:18

Yes, this is the log there was in var/logs/:

2010-03-02 13:17:28 -08:00 --- error: Gallery 2 call failed with: Error (ERROR_MISSING_OBJECT)<b>in</b> modules/core/classes/helpers/GalleryItemAttributesHelper_simple.class <b>at line</b> 124 (GalleryCoreApi::error)
<b>in</b> modules/core/classes/helpers/GalleryItemAttributesHelper_simple.class <b>at line</b> 102 (GalleryItemAttributesHelper_simple::fetchViewCounts)
<b>in</b> modules/core/classes/GalleryCoreApi.class <b>at line</b> 1350 (GalleryItemAttributesHelper_simple::fetchViewCount)
<b>in</b> /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import.php <b>at line</b> 617 (GalleryCoreApi::fetchItemViewCount)
<b>in</b> /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import_task.php <b>at line</b> 145 (g2_import_Core::import_item)
<b>in</b> ??? <b>at line</b> 0 (g2_import_task_Core::import)
<b>in</b> /home/tamilwir/public_html/g3/modules/gallery/helpers/task.php <b>at line</b> 90
<b>in</b> /home/tamilwir/public_html/g3/modules/gallery/controllers/admin_maintenance.php <b>at line</b> 186 (task_Core::run)
<b>in</b> ??? <b>at line</b> 0 (Admin_Maintenance_Controller::run)
<b>in</b> /home/tamilwir/public_html/g3/modules/gallery/controllers/admin.php <b>at line</b> 57
<b>in</b> ??? <b>at line</b> 0 (Admin_Controller::__call)
<b>in</b> /home/tamilwir/public_html/g3/system/core/Kohana.php <b>at line</b> 330 (ReflectionMethod::invokeArgs)
<b>in</b> ??? <b>at line</b> 0 (Kohana_Core::instance)
<b>in</b> /home/tamilwir/public_html/g3/system/core/Event.php <b>at line</b> 208
<b>in</b> /home/tamilwir/public_html/g3/application/Bootstrap.php <b>at line</b> 67 (Event_Core::run)
<b>in</b> /home/tamilwir/public_html/g3/index.php <b>at line</b> 91

2010-03-02 13:17:28 -08:00 --- error: exception 'Exception' with message '@todo G2_FUNCTION_FAILED' in /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import.php:1188
Stack trace:
#0 /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import.php(617): g2(Array)
#1 /home/tamilwir/public_html/g3/modules/g2_import/helpers/g2_import_task.php(145): g2_import_Core::import_item(Array)
#2 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#3 /home/tamilwir/public_html/g3/modules/gallery/helpers/task.php(90): call_user_func_array('g2_import_task:...', Array)
#4 /home/tamilwir/public_html/g3/modules/gallery/controllers/admin_maintenance.php(186): task_Core::run('3')
#5 [internal function]: Admin_Maintenance_Controller->run('3')
#6 /home/tamilwir/public_html/g3/modules/gallery/controllers/admin.php(57): call_user_func_array(Array, Array)
#7 [internal function]: Admin_Controller->__call('maintenance', Array)
#8 /home/tamilwir/public_html/g3/system/core/Kohana.php(330): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#9 [internal function]: Kohana_Core::instance(NULL)
#10 /home/tamilwir/public_html/g3/system/core/Event.php(208): call_user_func_array(Array, Array)
#11 /home/tamilwir/public_html/g3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#12 /home/tamilwir/public_html/g3/index.php(91): require('/home/tamilwir/...')
#13 {main}

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2010-03-02 22:01

@sarangan:
the bad news: the output doesn't tell you which G2 enitity id is missing. that's kinda silly, and bad. we made that mistake in G2. we could work around that in the importer, but that requires a series of changes (which we'll eventually do, I guess).

the good news: i've just committed a change to github to ignore any fetchItemViews errors and just set the item view count to 0 if we can't get the value out of G2.
so you shouldn't see the exact error as shown above again, but you might get different errors still (since there seems to be something wrong with the integrity of your G2 database).

 
sarangan

Joined: 2008-05-07
Posts: 12
Posted: Tue, 2010-03-02 22:21

hmm ok,
It will be nice if importer could ignore failed items and continue. Looking forward to hear a solution to fix this problem so I can move my gallery to G3 from G2. :)

Thanks.

 
rredmon
rredmon's picture

Joined: 2004-07-06
Posts: 34
Posted: Sat, 2010-03-06 04:23

Just adding my 2cents that I'm stuck in exactly the same way. Apparently I have a slightly corrupted G2 DB that I don't know how to fix and can't migrate (via import) to G3.

 
swiftsam

Joined: 2009-09-23
Posts: 23
Posted: Tue, 2010-03-09 22:53

I am getting the same error, but it looks like a different cause than sarangan's problem. All of my users, groups, albums, and items imported really well, it looks like I'm just missing comments. I bet I can work around that manually ...

Quote:
2010-03-09 14:31:27 -08:00 --- error: Gallery 2 call failed with: Error (ERROR_STORAGE_FAILURE)<b>in</b> modules/core/classes/GalleryStorage.class <b>at line</b> 480 (GalleryCoreApi::error)
<b>in</b> /home/www/cmubuggy.org/gallery3/var/modules/g2_import/b873fc18746eb6e6dc4278d773575e52/Gallery.class <b>at line</b> 203 (GalleryStorage::search)
<b>in</b> /home/www/cmubuggy.org/gallery3/modules/g2_import/helpers/g2_import.php <b>at line</b> 1023 (G2_Gallery::search)
<b>in</b> /home/www/cmubuggy.org/gallery3/modules/g2_import/helpers/g2_import_task.php <b>at line</b> 156 (g2_import_Core::get_comment_ids)
<b>in</b> ??? <b>at line</b> 0 (g2_import_task_Core::import)
<b>in</b> /home/www/cmubuggy.org/gallery3/modules/gallery/helpers/task.php <b>at line</b> 90
<b>in</b> /home/www/cmubuggy.org/gallery3/modules/gallery/controllers/admin_maintenance.php <b>at line</b> 186 (task_Core::run)
<b>in</b> ??? <b>at line</b> 0 (Admin_Maintenance_Controller::run)
<b>in</b> /home/www/cmubuggy.org/gallery3/modules/gallery/controllers/admin.php <b>at line</b> 57
<b>in</b> ??? <b>at line</b> 0 (Admin_Controller::__call)
<b>in</b> /home/www/cmubuggy.org/gallery3/system/core/Kohana.php <b>at line</b> 330 (ReflectionMethod::invokeArgs)
<b>in</b> ??? <b>at line</b> 0 (Kohana_Core::instance)
<b>in</b> /home/www/cmubuggy.org/gallery3/system/core/Event.php <b>at line</b> 208
<b>in</b> /home/www/cmubuggy.org/gallery3/application/Bootstrap.php <b>at line</b> 67 (Event_Core::run)
<b>in</b> /home/www/cmubuggy.org/gallery3/index.php <b>at line</b> 91

2010-03-09 14:31:27 -08:00 --- error: exception 'Exception' with message '@todo G2_FUNCTION_FAILED' in /home/www/cmubuggy.org/gallery3/modules/g2_import/helpers/g2_import.php:1117
Stack trace:
#0 /home/www/cmubuggy.org/gallery3/modules/g2_import/helpers/g2_import.php(1023): g2(Array)
#1 /home/www/cmubuggy.org/gallery3/modules/g2_import/helpers/g2_import_task.php(156): g2_import_Core::get_comment_ids(0)
#2 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#3 /home/www/cmubuggy.org/gallery3/modules/gallery/helpers/task.php(90): call_user_func_array('g2_import_task:...', Array)
#4 /home/www/cmubuggy.org/gallery3/modules/gallery/controllers/admin_maintenance.php(186): task_Core::run('6')
#5 [internal function]: Admin_Maintenance_Controller->run('6')
#6 /home/www/cmubuggy.org/gallery3/modules/gallery/controllers/admin.php(57): call_user_func_array(Array, Array)
#7 [internal function]: Admin_Controller->__call('maintenance', Array)
#8 /home/www/cmubuggy.org/gallery3/system/core/Kohana.php(330): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#9 [internal function]: Kohana_Core::instance(NULL)
#10 /home/www/cmubuggy.org/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#11 /home/www/cmubuggy.org/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#12 /home/www/cmubuggy.org/gallery3/index.php(91): require('/home/www/cmubu...')
#13 {main}

 
brentil
brentil's picture

Joined: 2007-04-11
Posts: 121
Posted: Mon, 2010-05-17 19:31

My G2 -> Fresh G3 RC1 is failing with a similar error as well. I'm going to see if I can fix my DB or if the newer github version fixes my issue. I have G2 2.3.1 installed currently with about 8600 images in 360 albums.

Quote:

2010-05-17 11:03:57 -07:00 --- error: Gallery 2 call failed with: Error (ERROR_MISSING_OBJECT)<b>in</b> modules/core/classes/helpers/GalleryItemAttributesHelper_simple.class <b>at line</b> 124 (GalleryCoreApi::error)
<b>in</b> modules/core/classes/helpers/GalleryItemAttributesHelper_simple.class <b>at line</b> 102 (GalleryItemAttributesHelper_simple::fetchViewCounts)
<b>in</b> modules/core/classes/GalleryCoreApi.class <b>at line</b> 1350 (GalleryItemAttributesHelper_simple::fetchViewCount)
<b>in</b> /htdocs/gallery/modules/g2_import/helpers/g2_import.php <b>at line</b> 566 (GalleryCoreApi::fetchItemViewCount)
<b>in</b> /htdocs/gallery/modules/g2_import/helpers/g2_import_task.php <b>at line</b> 145 (g2_import_Core::import_item)
<b>in</b> ??? <b>at line</b> 0 (g2_import_task_Core::import)
<b>in</b> /htdocs/gallery/modules/gallery/helpers/task.php <b>at line</b> 90
<b>in</b> /htdocs/gallery/modules/gallery/controllers/admin_maintenance.php <b>at line</b> 186 (task_Core::run)
<b>in</b> ??? <b>at line</b> 0 (Admin_Maintenance_Controller::run)
<b>in</b> /htdocs/gallery/modules/gallery/controllers/admin.php <b>at line</b> 57
<b>in</b> ??? <b>at line</b> 0 (Admin_Controller::__call)
<b>in</b> /htdocs/gallery/system/core/Kohana.php <b>at line</b> 330 (ReflectionMethod::invokeArgs)
<b>in</b> ??? <b>at line</b> 0 (Kohana_Core::instance)
<b>in</b> /htdocs/gallery/system/core/Event.php <b>at line</b> 208
<b>in</b> /htdocs/gallery/application/Bootstrap.php <b>at line</b> 67 (Event_Core::run)
<b>in</b> /htdocs/gallery/index.php <b>at line</b> 91

2010-05-17 11:03:57 -07:00 --- error: exception 'Exception' with message '@todo G2_FUNCTION_FAILED' in /htdocs/gallery/modules/g2_import/helpers/g2_import.php:1117
Stack trace:
#0 /htdocs/gallery/modules/g2_import/helpers/g2_import.php(566): g2(Array)
#1 /htdocs/gallery/modules/g2_import/helpers/g2_import_task.php(145): g2_import_Core::import_item(Array)
#2 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#3 /htdocs/gallery/modules/gallery/helpers/task.php(90): call_user_func_array('g2_import_task:...', Array)
#4 /htdocs/gallery/modules/gallery/controllers/admin_maintenance.php(186): task_Core::run('1')
#5 [internal function]: Admin_Maintenance_Controller->run('1')
#6 /htdocs/gallery/modules/gallery/controllers/admin.php(57): call_user_func_array(Array, Array)
#7 [internal function]: Admin_Controller->__call('maintenance', Array)
#8 /htdocs/gallery/system/core/Kohana.php(330): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#9 [internal function]: Kohana_Core::instance(NULL)
#10 /htdocs/gallery/system/core/Event.php(208): call_user_func_array(Array, Array)
#11 /htdocs/gallery/application/Bootstrap.php(67): Event_Core::run('system.execute')
#12 /htdocs/gallery/index.php(91): require('/htdocs/...')
#13 {main}

 
brentil
brentil's picture

Joined: 2007-04-11
Posts: 121
Posted: Tue, 2010-05-18 12:16

The latest version from github fixed the import process for me. It took a while but all 8600+ images made it in with no errors. I was even able to pic up where it left off.

 
swiftsam

Joined: 2009-09-23
Posts: 23
Posted: Fri, 2010-07-30 21:31

Adding an observation here in case it's helpful. I am importing from G2->G3-RC2 and it gets stuck with this error:

Quote:
exception 'Exception' with message '@todo G2_FUNCTION_FAILED' in /home/www/cmubuggy.org/gallery3/modules/g2_import/helpers/g2_import.php:1207
Stack trace:
#0 /home/www/cmubuggy.org/gallery3/modules/g2_import/helpers/g2_import.php(1113): g2(Array)
#1 /home/www/cmubuggy.org/gallery3/modules/g2_import/helpers/g2_import_task.php(156): g2_import_Core::get_comment_ids(0)
#2 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#3 /home/www/cmubuggy.org/gallery3/modules/gallery/helpers/task.php(90): call_user_func_array('g2_import_task:...', Array)
#4 /home/www/cmubuggy.org/gallery3/modules/gallery/controllers/admin_maintenance.php(187): task_Core::run('7')
#5 [internal function]: Admin_Maintenance_Controller->run('7')
#6 /home/www/cmubuggy.org/gallery3/modules/gallery/controllers/admin.php(62): call_user_func_array(Array, Array)
#7 [internal function]: Admin_Controller->__call('maintenance', Array)
#8 /home/www/cmubuggy.org/gallery3/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#9 [internal function]: Kohana_Core::instance(NULL)
#10 /home/www/cmubuggy.org/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#11 /home/www/cmubuggy.org/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#12 /home/www/cmubuggy.org/gallery3/index.php(94): require('/home/www/cmubu...')
#13 {main}

It really would be awesome if the import had a way to save a list or even just a count of the failed items while moving on and importing what it can. My guess is that I don't even care about whatever is broken. But I do care about all of the stuff that it hasn't imported at all (like comments).

thanks!

 
swiftsam

Joined: 2009-09-23
Posts: 23
Posted: Fri, 2010-07-30 22:02

Digging a bit deeper, it seems that it is hanging exactly when it tries to start importing the comments. Below is the additional error info from my /gallery/var/logs/

Looking at g2_import.php line 1113, I see the SQL is looking for comments WHERE publishStatus = 0. When I look at my G2 comments table, I don't have a publishStatus field. Could that be the problem?

My G2 version is 2.2.5 core 1.2.0.7

Quote:
2010-07-29 09:15:45 -07:00 --- error: Gallery 2 call failed with: Error (ERROR_STORAGE_FAILURE)<b>in</b> modules/core/classes/GalleryStorage.class <b>at line</b> 480 (GalleryCoreApi::error)
<b>in</b> /home/www/cmubuggy.org/gallery3/var/modules/g2_import/3dcd8951922566b623592c2b2d9d4bb7/Gallery.class <b>at line</b> 203 (GalleryStorage::search)
<b>in</b> /home/www/cmubuggy.org/gallery3/modules/g2_import/helpers/g2_import.php <b>at line</b> 1113 (G2_Gallery::search)
<b>in</b> /home/www/cmubuggy.org/gallery3/modules/g2_import/helpers/g2_import_task.php <b>at line</b> 156 (g2_import_Core::get_comment_ids)
<b>in</b> ??? <b>at line</b> 0 (g2_import_task_Core::import)
<b>in</b> /home/www/cmubuggy.org/gallery3/modules/gallery/helpers/task.php <b>at line</b> 90
<b>in</b> /home/www/cmubuggy.org/gallery3/modules/gallery/controllers/admin_maintenance.php <b>at line</b> 187 (task_Core::run)
<b>in</b> ??? <b>at line</b> 0 (Admin_Maintenance_Controller::run)
<b>in</b> /home/www/cmubuggy.org/gallery3/modules/gallery/controllers/admin.php <b>at line</b> 62
<b>in</b> ??? <b>at line</b> 0 (Admin_Controller::__call)
<b>in</b> /home/www/cmubuggy.org/gallery3/system/core/Kohana.php <b>at line</b> 331 (ReflectionMethod::invokeArgs)
<b>in</b> ??? <b>at line</b> 0 (Kohana_Core::instance)
<b>in</b> /home/www/cmubuggy.org/gallery3/system/core/Event.php <b>at line</b> 208
<b>in</b> /home/www/cmubuggy.org/gallery3/application/Bootstrap.php <b>at line</b> 67 (Event_Core::run)
<b>in</b> /home/www/cmubuggy.org/gallery3/index.php <b>at line</b> 94

 
swiftsam

Joined: 2009-09-23
Posts: 23
Posted: Fri, 2010-07-30 22:19

sure enough, that was the problem. I changed the SQL in get_comment_ids (g2_import.php: line 1103) to:

Quote:
$results = g2($gallery->search(
"SELECT [GalleryComment::id] " .
"FROM [GalleryComment] " .
"WHERE [GalleryComment::id] > ?",
array($min_id),
array("limit" => array("count" => 100))));

and my import worked great. Let me know if I should submit a bug report or anything. I'm guessing it is just a version-specific import bug.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25967
Posted: Fri, 2010-07-30 23:49
Quote:
My G2 version is 2.2.5 core

Quote:
I'm guessing it is just a version-specific import bug.

I would suspect so as we (support staff) recommend you upgrade G2 prior importing.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25967
Posted: Sat, 2010-07-31 00:02
Quote:
Let me know if I should submit a bug report or anything.

Please do. I don't know much about the importer so your clue might give the devs a hint at some other issue as well.
We have done some changes since RC2 so you might try a git version to see if that helps as well.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
in8sworld

Joined: 2009-01-06
Posts: 2
Posted: Sun, 2010-11-07 15:38

@swiftsam: removing that first WHERE clause fixed up my g2 to g3 import perfectly and successfully brought over all the comments as expected! Thanks so much!
My gallery2's embed.php was "@version $Revision: 17657 $"
and I was importing into 3.0 (Santa Fe)

 
okutbay

Joined: 2010-12-09
Posts: 8
Posted: Thu, 2010-12-09 15:55

i tried to remove first where but still getting the @todo G2_FUNCTION_FAILED
where is the detailed error or how can i see detailed errors...?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7985
Posted: Wed, 2010-12-15 01:33

@okutbay: please start a new forum topic for your problem and include any log data you find in the gallery3/var/logs error logs. thanks!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git