migrating from 1.5 to 2.5: custom fields wont show

beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Sun, 2010-04-18 16:03

I had no problems migrating from a previous one (cyberbee.net/gallery) which has no custom fields (but cations imported fine). Now I can to combine a 2nd one to this which has many custom fields.

1. I imported once, no custom fields migrated. (yes, I checked importing custom fields and also had the "custom field" and and another plugin according to instructions.

2. I created a new album, and said overide the custom fields, added all the custom fields names, and saved that, import again, no fields.

3. I globally added the same custom fields to the whole gallery, import again...no fields.

running out of ideas. I may delete all the albums and then start with plants.bees.net/gallery which has many fields, then go back to bee images (cyberbee.net/gallery), but not sure if that would work either...


G2 URL (optional): cyberbee.net/gallery2
G2 version:2.3.1
G1 URL (optional):plants.bees.net/gallery
G1 version: 1.5.10
G1 character set:
PHP memory limit: 400meg
--
PHP version (e.g. 5.1.6): 5.2.12
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33): 2.2
Database (e.g. MySql 5.0.32): mysql 5.5.2-m2
Activated toolkits (e.g. NetPbm, GD): NetPbm,
Operating system (e.g. Linux): FreeBSD
Browser (e.g. Firefox 2.0):

Zach de BeeGuy

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Sun, 2010-04-18 16:29
 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Mon, 2010-04-19 02:15

strangely, now if I type http://cyberbee.net/gallery2, it automatically forwards me to /gallery (the old one).
I thought the migration redirect was to redirect from gallery to gallery2, now it is the reverse!

Zach de BeeGuy

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2010-04-19 20:58
beesatmsu wrote:
strangely, now if I type http://cyberbee.net/gallery2, it automatically forwards me to /gallery (the old one).
I thought the migration redirect was to redirect from gallery to gallery2, now it is the reverse!

Zach de BeeGuy

Looks like you might have reversed the rewrite rules and put the wrong one in the wrong directory.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Mon, 2010-04-19 21:43

that is weird! because I never touched the directory. I did turn on the G1-->G2 rewrite, but I did not delete G1 contents, so the forwarding should not work anyway, now it is reversed...it was fine last night at home initially (when I was typing the message), then I noticed in my office machine it started forwarding first, but i did managed to upload some photos from home...then after that neither can access gallery2....if I delete the rules in the upgrade section, will my g1 still work?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2010-04-19 21:44

Check one of the last lines in your config.php file for G2. The setting for baseUri. What does it show?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Mon, 2010-04-19 22:52

nivekiam,

thanks for asking...here is the whole thing..(without copyrights etc).

<?php
/* Include bootstrap.inc in case config.php overrides GALLERY_MAIN_PHP */

require_once(dirname(__FILE__) . '/bootstrap.inc');
require_once(dirname(__FILE__) . '/modules/core/classes/GalleryUrlGenerator.class');
require_once(dirname(__FILE__) . '/modules/core/classes/GalleryCoreApi.class');

/* The REQUEST_URI can either be /path/index.php or just /path/. Get rid of index.php.* */
$path = GalleryUrlGenerator::getCurrentRequestUri();
if (preg_match('|^(/(?:[^?#/]+/)*)(.*)|', $path, $matches)) {
$path = $matches[1] . GALLERY_MAIN_PHP;
if (!empty($matches[2]) && ($pos = strpos($matches[2], '?')) !== false) {
$path .= substr($matches[2], $pos);
}
}

$configBaseUri = @$gallery->getConfig('baseUri');

$urlGenerator = new GalleryUrlGenerator();
$urlGenerator->init(!empty($configBaseUri) ? $configBaseUri : null);

$phpVm = $gallery->getPhpVm();
$phpVm->header('Location: ' . $urlGenerator->makeUrl($path));
?>

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2010-04-19 23:10

That's not from your config.php file and if it is, it's not correct. That looks like your index.php file.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Tue, 2010-04-20 02:08

sorry, I thought you were asking for index.php.

here it is: not sure why there is a # in front...that means the line was not executed?

#$gallery->setConfig('baseUri', 'http://www.cyberbee.net/gallery2/main.php');
?>

Zach de BeeGuy

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2010-04-20 03:49

hmmm, o.k. what's in your /gallery2/.htaccess file?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Tue, 2010-04-20 13:55

here you go -- thanks again for trying to help..

# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteBase /gallery2/

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . - [L]

RewriteCond %{THE_REQUEST} /gallery2/d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . /gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3 [QSA,L]
RewriteCond %{THE_REQUEST} /gallery2/v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . /gallery2/main.php?g2_path=%1 [QSA,L]
</IfModule>

# END Url Rewrite section

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2010-04-20 15:39

Well I don't see anything there redirecting. How about in your site root at cyberbee.net? Is there an .htaccess there and if so, what's in that?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Tue, 2010-04-20 16:01

no .htaccess in the root (uplevel from gallery or gallery2). on my freebsd machine, firefox at least works for gallery2, so I could mess with it. but Konqueror (KDE brower) also forwards to gallery.

strangely, the forwarding did not start right away that day...there was some delay (and variable on different clients)...(which suggests DNS issue, but I cannot find any).

I also tried mapping it to something like g1.cyberbee.net and g2.cyberbee.net (bypassing the root and pointing directing to gallery subfolder). still the same...

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2010-04-20 16:22

DNS wouldn't have anything to do with your site's sub-directories.

The redirect happens for me in Firefox. I can only think you've got something somewhere that's doing this. Since you can access your G2 site without getting redirected, I'd suggest clearing the cache:
FAQ: How can I clear cached data?

Disabling URL Rewrite for now and then clearing the cache again:
FAQ: How can I clear cached data?

Then re-enabling the URL Rewrite plugin
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Tue, 2010-04-20 18:53

Thanks. have to be at home to do that...all computers here in office redirect to gallery from gallery2...but I can get to install though...through /v/install

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2010-04-20 18:59

/v/install?

That shouldn't be a valid path
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Tue, 2010-04-20 23:59

sorry, it was gallery2/install
I cleared both database and template cache...the other browser still redirects...it is so strange...

****
+ Delete template cache Wed Apr 21 19:52:24 2010
Success
run now
Gallery compiles template files and saves them for increased performance. If you're experiencing problems that say Smarty error then you might try running this task. Also run this if you add or remove any local/*.tpl or theme override so Smarty will find the right file.

Last Run Details:

Template cache deleted successfully
+ Delete database cache Wed Apr 21 19:52:35 2010
Success
run now

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2010-04-21 02:26

If you want to PM me SSH (preferably) or FTP login credentials as well as Gallery login credentials I can poke in and take a look.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Wed, 2010-04-21 12:15

Thank you very much for the offer! . well gallery2 is not working as I wanted anyway...so I am reinstalling and will wipe out the data. maybe will try not using rewrite rule next time...and install the one with custom fields first to see if it works (plants), then bees...

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Wed, 2010-04-21 14:30

Nivekiam, please take a look at the http://plants.bees.net. I am not sure what I had originally was "custom fields" or part of the caption. I do not remember since it was setup up 5-6 years ago. anyway I tried import again during migration and no text comes through (the url http://cyberbee.net/gallery2 now works).... I guess I may have to keep the original there...another strange thing. I forgot to turn comments plugin off, and all the spams came through. which I thought I deleted already in gallery1 (76,000!). Thanks!

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2010-04-21 15:10

You have a total of 76 items you're importing....

Just turn the comment plugin off and spend the 15 seconds to do the import again.

o.k. Looking at the source code it looks like you were using some custom fields addon for G1 (I don't know if that was a standard option or not), but I doubt that the custom fields plugin for G2 knows how to read from that. So you'd probably have to re-enter that data in G2.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Thu, 2010-04-22 12:07

do not remember if G1 has plugin option or not...anyway the admin page does not say much (and no option to add or remove an entry)...it is possible that I program directly at php, but it stayed there after upgrade from 1.3 to 1.5. I totally forgot how I did it.

..maybe I will keep it separate from my bee images and let it stay in G1...

thanks for all the help.

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Sat, 2010-04-24 02:39

I reinstalled G2, and migrated again. used g1 to g2 redirect, removed the old photos...redirect wont work...strange. it is not a big deal, just strange that redirect wont work..

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2010-04-24 14:54
nivekiam wrote:
If you want to PM me SSH (preferably) or FTP login credentials as well as Gallery login credentials I can poke in and take a look.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here