Hi
I tried to switch from G2 to G3. I used the module in G3 to import my G2 albums but the import hangs with the error below.
I didn't find out why the item_id is NULL here. Any suggestions?
Thanks.
error: exception 'Database_Exception' with message '#1048: Column 'item_id' cannot be null [ INSERT INTO `g3items_tags`
(`tag_id`, `item_id`)
VALUES ('17', NULL) ]' in /www/gallery3/system/libraries/Database_Mysqli_Result.php:27
Stack trace:
#0 /www/gallery3/system/libraries/Database_Mysqli.php(79): Database_Mysqli_Result_Core->__construct(false, 'INSERT INTO `g3...', Object(mysqli), true)
#1 /www/gallery3/system/libraries/Database.php(272): Database_Mysqli_Core->query_execute('INSERT INTO `g3...')
#2 /www/gallery3/modules/gallery/libraries/MY_Database.php(45): Database_Core->query('INSERT INTO `g3...')
#3 /www/gallery3/system/libraries/Database_Builder.php(973): Database->query('INSERT INTO `g3...')
#4 /www/gallery3/system/libraries/ORM.php(888): Database_Builder_Core->execute(Object(Database_Mysqli))
#5 /www/gallery3/modules/gallery/libraries/MY_ORM.php(23): ORM_Core->save()
#6 /www/gallery3/modules/tag/models/tag.php(73): ORM->save()
#7 /www/gallery3/modules/tag/helpers/tag.php(44): Tag_Model->save()
#8 /www/gallery3/modules/g2_import/helpers/g2_import.php(828): tag_Core::add(Object(Item_Model), 'Kemer')
#9 /www/gallery3/modules/g2_import/helpers/g2_import.php(562): g2_import_Core::import_keywords_as_tags('Kemer, Antalya,...', Object(Item_Model))
#10 /www/gallery3/modules/g2_import/helpers/g2_import_task.php(145): g2_import_Core::import_item(Array)
#11 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#12 /www/gallery3/modules/gallery/helpers/task.php(90): call_user_func_array('g2_import_task:...', Array)
#13 /www/gallery3/modules/gallery/controllers/admin_maintenance.php(186): task_Core::run('66')
#14 [internal function]: Admin_Maintenance_Controller->run('66')
#15 /www/gallery3/modules/gallery/controllers/admin.php(57): call_user_func_array(Array, Array)
#16 [internal function]: Admin_Controller->__call('maintenance', Array)
#17 /www/gallery3/system/core/Kohana.php(330): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#18 [internal function]: Kohana_Core::instance(NULL)
#19 /www/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#20 /www/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#21 /www/gallery3/index.php(92): require('/www/gallery3/a...')
#22 {main}
Posts: 10
I'm getting the same error as above.
After importing about half of the database the system stops with:
exception 'Database_Exception' with message '#1048: Column 'item_id' cannot be null [ INSERT INTO `items_tags`
(`tag_id`, `item_id`)
VALUES ('255', NULL) ]' in /my_domain_path............/system/libraries/Database_Mysqli_Result.php:27
Can anybody suggest a solution to this problem?
Thanks,
Rodrigo
Posts: 5
I'm also running into a similar error importing photos from Gallery 2.3 core 1.3.0 to current Gallery 3 RC1 and can't seem to figure it out for the life of me:
#1048: Column 'item_id' cannot be null [ INSERT INTO `g3_items_tags` (`tag_id`, `item_id`) VALUES ('58', NULL) ]
exception 'Database_Exception' with message '#1048: Column 'item_id' cannot be null [ INSERT INTO `g3_items_tags`
(`tag_id`, `item_id`)
VALUES ('58', NULL) ]' in /home/bythedr1/public_html/gallery3/system/libraries/Database_Mysqli_Result.php:27
Stack trace:
#0 /home/bythedr1/public_html/gallery3/system/libraries/Database_Mysqli.php(79): Database_Mysqli_Result_Core->__construct(false, 'INSERT INTO `g3...', Object(mysqli), true)
#1 /home/bythedr1/public_html/gallery3/system/libraries/Database.php(272): Database_Mysqli_Core->query_execute('INSERT INTO `g3...')
#2 /home/bythedr1/public_html/gallery3/modules/gallery/libraries/MY_Database.php(45): Database_Core->query('INSERT INTO `g3...')
#3 /home/bythedr1/public_html/gallery3/system/libraries/Database_Builder.php(973): Database->query('INSERT INTO `g3...')
#4 /home/bythedr1/public_html/gallery3/system/libraries/ORM.php(888): Database_Builder_Core->execute(Object(Database_Mysqli))
#5 /home/bythedr1/public_html/gallery3/modules/gallery/libraries/MY_ORM.php(23): ORM_Core->save()
#6 /home/bythedr1/public_html/gallery3/modules/tag/models/tag.php(73): ORM->save()
#7 /home/bythedr1/public_html/gallery3/modules/tag/helpers/tag.php(44): Tag_Model->save()
#8 /home/bythedr1/public_html/gallery3/modules/g2_import/helpers/g2_import.php(825): tag_Core::add(Object(Item_Model), 'soccer')
#9 /home/bythedr1/public_html/gallery3/modules/g2_import/helpers/g2_import.php(561): g2_import_Core::import_keywords_as_tags('soccer, china, ...', Object(Item_Model))
#10 /home/bythedr1/public_html/gallery3/modules/g2_import/helpers/g2_import_task.php(145): g2_import_Core::import_item(Array)
#11 /home/bythedr1/public_html/gallery3/modules/gallery/helpers/task.php(90): g2_import_task_Core::import(Object(Task_Model))
#12 /home/bythedr1/public_html/gallery3/modules/gallery/controllers/admin_maintenance.php(186): task_Core::run('g2_import_task:...', Array)
#13 /home/bythedr1/public_html/gallery3/modules/gallery/controllers/admin.php(57): Admin_Maintenance_Controller->run('1')
#14 [internal function]: Admin_Controller->__call('1')
#15 /home/bythedr1/public_html/gallery3/system/core/Kohana.php(330): ReflectionMethod->invokeArgs(Array, Array)
#16 /home/bythedr1/public_html/gallery3/system/core/Event.php(208): Kohana_Core::instance('maintenance', Array)
#17 /home/bythedr1/public_html/gallery3/application/Bootstrap.php(67): Event_Core::run(Object(Admin_Controller), Array)
#18 /home/bythedr1/public_html/gallery3/index.php(91): require('/home/bythedr1/...')
#19 {main}
System info:
Operating system: Linux 2.6.31.9-grsec
Apache: Unknown (actual version: 2.2.13)
PHP: 5.2.10
MySQL: 5.0.90-community
Thanks,
Rush
Posts: 5
Just a quick update...
I found an .flv file in the gallery, deleted it through G2 and was able to restart the photo import without a problem.
Rush