Import from Gallery 2 to Gallery 3 beta

icalvo

Joined: 2010-09-30
Posts: 4
Posted: Thu, 2010-09-30 12:03

I have the same exact problem KyO77 reported.

Error (ERROR_MISSING_OBJECT) : Parent 7 path admin

* in modules/core/classes/helpers/GalleryFileSystemEntityHelper_simple.class at line 98 (GalleryCoreApi::error)
* in modules/core/classes/GalleryCoreApi.class at line 1952 (GalleryFileSystemEntityHelper_simple::fetchChildIdByPathComponent)
* in modules/core/classes/helpers/GalleryFileSystemEntityHelper_simple.class at line 53 (GalleryCoreApi::fetchChildIdByPathComponent)
* in modules/core/classes/GalleryCoreApi.class at line 1901 (GalleryFileSystemEntityHelper_simple::fetchItemIdByPath)
* in modules/rewrite/classes/RewriteSimpleHelper.class at line 45 (GalleryCoreApi::fetchItemIdByPath)
* in ??? at line 0 (RewriteSimpleHelper::loadItemIdFromPath)
* in modules/rewrite/classes/RewriteUrlGenerator.class at line 103
* in modules/rewrite/classes/parsers/pathinfo/PathInfoUrlGenerator.class at line 134 (RewriteUrlGenerator::_onLoad)
* in init.inc at line 166 (PathInfoUrlGenerator::initNavigation)
* in modules/core/classes/GalleryEmbed.class at line 129
* in /srv/gallery3/modules/g2_import/helpers/g2_import.php at line 150 (GalleryEmbed::init)
* in /srv/gallery3/modules/g2_import/helpers/g2_import.php at line 55 (g2_import_Core::init_embed)
* in /srv/gallery3/modules/g2_import/controllers/admin_g2_import.php at line 62 (g2_import_Core::is_valid_embed_path)
* in ??? at line 0 (Admin_g2_import_Controller::save)
* in /srv/gallery3/modules/gallery/controllers/admin.php at line 62
* in ??? at line 0 (Admin_Controller::__call)
* in /srv/gallery3/system/core/Kohana.php at line 331 (ReflectionMethod::invokeArgs)
* in ??? at line 0 (Kohana_Core::instance)
* in /srv/gallery3/system/core/Event.php at line 208
* in /srv/gallery3/application/Bootstrap.php at line 67 (Event_Core::run)
* in /srv/gallery3/index.php at line 94

Gallery2 2.3 (Multisite)
Gallery3 3.0 RC2 (Single install)

Each with a separate MySQL database.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2010-10-02 03:51

Can you try reproducing this with the latest experimental version of G3? See my signature for upgrading instructions.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
icalvo

Joined: 2010-09-30
Posts: 4
Posted: Sat, 2010-10-02 09:58

Tried clean installation with latest experimental (gallery-gallery3-c0022dc), just installed Gallery2 Import and tried. Same result, although obviously some line numbers changed due to the diffs with RC2. This is the trace:

Error (ERROR_MISSING_OBJECT) : Parent 7 path admin
* in modules/core/classes/helpers/GalleryFileSystemEntityHelper_simple.class at line 98 (GalleryCoreApi::error)
* in modules/core/classes/GalleryCoreApi.class at line 1952 (GalleryFileSystemEntityHelper_simple::fetchChildIdByPathComponent)
* in modules/core/classes/helpers/GalleryFileSystemEntityHelper_simple.class at line 53 (GalleryCoreApi::fetchChildIdByPathComponent)
* in modules/core/classes/GalleryCoreApi.class at line 1901 (GalleryFileSystemEntityHelper_simple::fetchItemIdByPath)
* in modules/rewrite/classes/RewriteSimpleHelper.class at line 45 (GalleryCoreApi::fetchItemIdByPath)
* in ??? at line 0 (RewriteSimpleHelper::loadItemIdFromPath)
* in modules/rewrite/classes/RewriteUrlGenerator.class at line 103
* in modules/rewrite/classes/parsers/pathinfo/PathInfoUrlGenerator.class at line 134 (RewriteUrlGenerator::_onLoad)
* in init.inc at line 166 (PathInfoUrlGenerator::initNavigation)
* in modules/core/classes/GalleryEmbed.class at line 129
* in /srv/gallery3/modules/g2_import/helpers/g2_import.php at line 158 (GalleryEmbed::init)
* in /srv/gallery3/modules/g2_import/helpers/g2_import.php at line 55 (g2_import_Core::init_embed)
* in /srv/gallery3/modules/g2_import/controllers/admin_g2_import.php at line 62 (g2_import_Core::is_valid_embed_path)
* in ??? at line 0 (Admin_g2_import_Controller::save)
* in /srv/gallery3/modules/gallery/controllers/admin.php at line 62
* in ??? at line 0 (Admin_Controller::__call)
* in /srv/gallery3/system/core/Kohana.php at line 331 (ReflectionMethod::invokeArgs)
* in ??? at line 0 (Kohana_Core::instance)
* in /srv/gallery3/system/core/Event.php at line 208
* in /srv/gallery3/application/Bootstrap.php at line 67 (Event_Core::run)
* in /srv/gallery3/index.php at line 97

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2010-10-03 00:19

Hrm. Ok, I get it. This looks like a bad interaction between the PathInfo short url format you're using in your G2. The G2 code is trying to parse the G3 url and failing. Try deactivating the G2 rewrite module and then try the G3 import again -- that should fix it.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
icalvo

Joined: 2010-09-30
Posts: 4
Posted: Sun, 2010-10-03 10:14

Thank you, I have deactivated rewrite and reached further, but still cannot import.

When I click "Save" it shows the following:

* Gallery version 0 detected
* Your most common thumbnail size in Gallery 2 is 150 pixels, but your Gallery 3 thumbnail size is set to 200 pixels. Using the same value will speed up your import.
* Your Gallery 2 has the following importable data in it:
54 users, 4 groups, 212 albums, 1014 photos, 0 movies, 0 comments, 0 tagged photos/movies/albums

I have deactivated notification, search, exif and PHP accelerators.

Then, I hit "Begin import!" and it says:

- Starting up...
- @todo G2_FUNCTION_FAILED

And it stops. This is the trace from /var/logs:

2010-10-03 03:05:18 -07:00 --- error: Gallery 2 call failed with: Error (ERROR_PLATFORM_FAILURE) : /srv/g2data/locks/1 <b>in</b> modules/core/classes/FlockLockSystem.class <b>at line</b> 72 (GalleryCoreApi::error)
<b>in</b> modules/core/classes/GalleryLockSystem.class <b>at line</b> 147 (FlockLockSystem::_acquireLock)
<b>in</b> modules/core/classes/helpers/GalleryLockHelper_simple.class <b>at line</b> 176 (GalleryLockSystem::acquireWriteLock)
<b>in</b> modules/core/classes/GalleryCoreApi.class <b>at line</b> 2291 (GalleryLockHelper_simple::acquireWriteLock)
<b>in</b> modules/core/classes/helpers/GalleryPermissionHelper_advanced.class <b>at line</b> 1054 (GalleryCoreApi::acquireWriteLock)
<b>in</b> modules/core/classes/helpers/GalleryPermissionHelper_advanced.class <b>at line</b> 1090 (GalleryPermissionHelper_advanced::_getAccessListCompacterLock)
<b>in</b> modules/core/classes/GalleryCoreApi.class <b>at line</b> 524 (GalleryPermissionHelper_advanced::compactAccessLists)
<b>in</b> /srv/gallery3/modules/g2_import/helpers/g2_import_task.php <b>at line</b> 77 (GalleryCoreApi::compactAccessLists)
<b>in</b> ??? <b>at line</b> 0 (g2_import_task_Core::import)
<b>in</b> /srv/gallery3/modules/gallery/helpers/task.php <b>at line</b> 90
<b>in</b> /srv/gallery3/modules/gallery/controllers/admin_maintenance.php <b>at line</b> 194 (task_Core::run)
<b>in</b> ??? <b>at line</b> 0 (Admin_Maintenance_Controller::run)
<b>in</b> /srv/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> /srv/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> /srv/gallery3/system/core/Event.php <b>at line</b> 208
<b>in</b> /srv/gallery3/application/Bootstrap.php <b>at line</b> 67 (Event_Core::run)
<b>in</b> /srv/gallery3/index.php <b>at line</b> 97

2010-10-03 03:05:18 -07:00 --- error: exception 'Exception' with message '@todo G2_FUNCTION_FAILED' in /srv/gallery3/modules/g2_import/helpers/g2_import.php:1251
Stack trace:
#0 /srv/gallery3/modules/g2_import/helpers/g2_import_task.php(77): g2(Object(GalleryStatus))
#1 [internal function]: g2_import_task_Core::import(Object(Task_Model))
#2 /srv/gallery3/modules/gallery/helpers/task.php(90): call_user_func_array('g2_import_task:...', Array)
#3 /srv/gallery3/modules/gallery/controllers/admin_maintenance.php(194): task_Core::run('3')
#4 [internal function]: Admin_Maintenance_Controller->run('3')
#5 /srv/gallery3/modules/gallery/controllers/admin.php(62): call_user_func_array(Array, Array)
#6 [internal function]: Admin_Controller->__call('maintenance', Array)
#7 /srv/gallery3/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#8 [internal function]: Kohana_Core::instance(NULL)
#9 /srv/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#10 /srv/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#11 /srv/gallery3/index.php(97): require('/mounted-storag...')
#12 {main}

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2010-10-03 23:12

Hm. I've seen the "Gallery version 0 detected" issue before. Last time I saw this it was because the Gallery 2 was in one virtual space, and Gallery 3 was in a different one and the G3 code couldn't access the G2 files directly. G3 could get to the G2 *code*, but not the G2 data directory. Can you explain your setup a bit more? I can put in some code to detect this situation and warn about it.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
icalvo

Joined: 2010-09-30
Posts: 4
Posted: Mon, 2010-10-04 06:27

Current structure is:

/srv/gallery2 -> Gallery 2 (multisite redirections)
/srv/codebase/gallery2 -> Code for Gallery 2
/srv/g2_data -> Data for Gallery 2
/srv/gallery3 -> Gallery 3 (single)
/srv/gallery3/var -> Data for Gallery 3

But Gallery2 is pointed by: http://gallery2.mysite.com and Gallery3 is at: http://gallery3.mysite.com.

If I am understanding, both sites should use the same vhost?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2010-10-06 04:02

They don't have to use the same vhost, but can a PHP script runnign in /srv/gallery3 get to /srv/g2_data? I'm guessing that it can't, probably because open_basedir restrictions. But G3 needs to get to the G2 data files in order to do the import.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
bullka2

Joined: 2005-11-20
Posts: 16
Posted: Mon, 2010-10-11 15:44

Quick question.

Can I import gallery 2 content from a different server. I installed a fresh copy of linux and installed G3 there. How do I import G2 content from a different machine. Both are virtual servers in the same physical machine.

What would be the procedure?

PS: Gallery 2 Import requires a local file system path to be entered.

--
bullka

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2010-10-11 16:09

I think you've answered your question, but just to be clear. The G2 Import module in G3 requires that G3 and G2 be on the same server and that G3 have access to the files locally.

If you want G3 on a different server, I'd install it on the same server G2 is on right now, import, then move G3.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
bullka2

Joined: 2005-11-20
Posts: 16
Posted: Mon, 2010-10-11 16:35

Thanks for quick reply.

Is there a guide to move G3 from one server to another?

THanks!

--
bullka

 
bullka2

Joined: 2005-11-20
Posts: 16
Posted: Mon, 2010-10-11 18:13

Found your post in other thread:

"G3 is much easier to move around than G1 or G2, you don't have to worry about paths or anything nearly as much.

You can move the whole install (including DB) or just move the DB and /var directory and put your old /var directory under the new G3 install."

That answers my questions.

Thanks for great job! Best gallery on the web.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2010-10-11 22:17

Yep, another doc that's needed... Care to write it? :)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here