Importing < Pivot 2.0 db/

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

Importing < Pivot 2.0 db/

Postby bramn » Mon Nov 26, 2007 3:29 pm

Importing your old pre-2.0 database can't be easier, just copy all of the standard-xxxx directories in your old pivot/db/ folder to the new db/ folder. However, since PivotX uses a new category system with display names, the old entries aren't automatically added to the correct category after manually adding the 'old' categories.
For instance, my old category was called 'Life' and is called, after manually adding it in PivotX, 'life' (all small caps). Is there a way to mass-add them to the right category?
bramn
 
Posts: 33
Joined: Mon Nov 26, 2007 10:02 am
Location: Enschede, The Netherlands

Re: Importing < Pivot 2.0 db/

Postby Bob » Mon Nov 26, 2007 3:58 pm

If i remember correctly, after conversion, all entries are added to 'life' (in your case), and it makes a 'life' category.. Now, you can go to the categories and set the display name for category 'life' to 'Life', so it will be displayed correctly on your site.

Or, does it go wrong in conversion, and did you get a mismatch? If so, we can do two things:
- I'll fix the conversion script, and you can try again
- Use Phpmyadmin to change them all in the DB to set them right.
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Importing < Pivot 2.0 db/

Postby bramn » Mon Nov 26, 2007 4:32 pm

Euhm I did not use any script, I just copied the standard-xxxxx myself. Is there a conversion/import script? I thought there was only one to convert to the new MySQL format?! Or did I miss something?
bramn
 
Posts: 33
Joined: Mon Nov 26, 2007 10:02 am
Location: Enschede, The Netherlands

Re: Importing < Pivot 2.0 db/

Postby Bob » Mon Nov 26, 2007 4:35 pm

Ah, my bad! I assumed you converted them to MySQL.. Flat File entries don't have to be converted, you just might need to rebuild the index. (which i assume you did)

But, i'm still not sure what the issue is.. :-) Where does it go wrong? Can't you fix it by setting the 'display name' for the category?
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Importing < Pivot 2.0 db/

Postby bramn » Mon Nov 26, 2007 5:35 pm

That's just it, the old category name is not being compared to the 'Display name', but apparently to the 'Name'. Of which the latter I can't set the same, because it is automatically turned to lowercase :)
bramn
 
Posts: 33
Joined: Mon Nov 26, 2007 10:02 am
Location: Enschede, The Netherlands

Re: Importing < Pivot 2.0 db/

Postby hansfn » Mon Nov 26, 2007 11:43 pm

I know what is going, but let me first ask you why you
manual added the 'old' categories.

A-ha, I just understood (while writing this) - you just copied the db/standard-xxxxx folders and not the two old config files, pv_cfg_settings.php and pv_cfg_weblogs.php. PivotX will pick up the old categories and weblog settings if these two config files are present.

Anyway, the problem is that PivotX stores all categories with lovercase (internal) names. It means will have to write a tiny conversion script, looping over all entries and lower casing the category names. I'll do it tomorrow.
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Importing < Pivot 2.0 db/

Postby bramn » Tue Nov 27, 2007 5:13 pm

Yup, you understood me correct. But if I understand correctly I can also just copy my old pv_cfg_* files? Or is it too late for that now ;)
bramn
 
Posts: 33
Joined: Mon Nov 26, 2007 10:02 am
Location: Enschede, The Netherlands

Re: Importing < Pivot 2.0 db/

Postby hansfn » Tue Nov 27, 2007 7:41 pm

It's not too late. Just remove db/ser_weblogs.php and db/ser_categories.php, and PivotX will try to read the old config files. (The "lowercase category names in entries"-script will have to wait until tomorrow.)
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Importing < Pivot 2.0 db/

Postby bramn » Tue Nov 27, 2007 10:31 pm

Worked like a charme indeed! Will this be the 'official' method of importing old entries when PivotX gets out of alpha/beta? :)
bramn
 
Posts: 33
Joined: Mon Nov 26, 2007 10:02 am
Location: Enschede, The Netherlands

Re: Importing < Pivot 2.0 db/

Postby hansfn » Wed Nov 28, 2007 9:20 am

Yes, probably. We have discussed moving the "read old config" code out of the core and into a separate script - I wanted the code to be as clean as possible. On the other hand, it's kind of nice the way it is now.
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway


Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 4 guests

cron