Page 1 of 1

Pivot1.x to PivotX: Database Import Error

PostPosted: Sun Feb 21, 2016 1:34 pm
by hishgraphics
Hi,
I've been using Pivot1.x since 2005 and thought it's high time to migrate to PivotX. My site is at http://www.hishgraphics.com and Pivot is installed in http://www.hishgraphics.com/blog.

I followed the upgrade instructions, and also the one in this forum post.

I still have problems with the import_pivot.php script.

I set the old database directory to ../pivot.old/db and click the checkboxes for both Keep entry codes/uids and Convert entries from ISO-8859-1 to UTF-8. The preview shows that all the old entries in pivot.old can be read. However when I click on Yes! Do it! the database import fails. The entries are not in the pivotx/db folders. I checked at the Admin Entry pages and using FireFTP to see the directory directly.

The only anomaly when I run the import script is this at the top of the page:
Code: Select all
Strict Standards: Only variables should be passed by reference in /home/hishgr/public_html/blog/pivotx/import_pivot.php on line 10


Any help is very much appreciated. Let me know if you need more information that I have not thought of in my troubleshooting.

Thank you.

Edit: I forgot to write that I am updating into flat file database, and there are 1477 entries.

Re: Pivot1.x to PivotX: Database Import Error

PostPosted: Sun Feb 21, 2016 3:17 pm
by hishgraphics
UPDATE:

YES! I kept trying the import script until it finally worked!

I think I should have clicked on Yes! Do It! during the first step, and not in the second step or higher.

However, how do I change each entry URL from ?e=nnnn.php back to ?id=nnnn.php because I have a lot of direct links to my blog posts from Facebook, Google Plus and various forums.

For example, the link from this G+ entry: https://plus.google.com/u/0/+KhairulHis ... X6FqG6huw9

Re: Pivot1.x to PivotX: Database Import Error

PostPosted: Mon Feb 22, 2016 5:40 pm
by Harm10
You should be aware that this script from version 1 to 2 is already very old.
So it probably does not adhere to the current PHP rules. That is why you get those messages.

You should also be aware that development for version 2 has stopped long ago.
Even bug fixing is hardly every done.

If you are contemplating on moving of Pivot 1 perhaps you should look at other CMSses. For example Bolt although that doesn't support flat file afaik.

To change your URLs you need to write your own htaccess rule. There is a lot of information on the internet with examples on how to do that.

Sorry I cannot be of any real help.

Re: Pivot1.x to PivotX: Database Import Error

PostPosted: Mon Feb 22, 2016 11:37 pm
by hansfn
Easy!!

Just look at example.htaccess that comes with PivotX. It has rules that would redirect for example http://www.hishgraphics.com/blog/pivot/ ... hp?id=1477 to http://www.hishgraphics.com/blog/?e=1477

Re: Pivot1.x to PivotX: Database Import Error

PostPosted: Tue Feb 23, 2016 1:58 pm
by hishgraphics
Thanks you guys!

I am loving this.

I assume that...

Code: Select all
RewriteCond %{QUERY_STRING} id=([1-9][0-9]*)
RewriteRule ^pivot/entry.php index.php?e=%1 [R=301,L]


... is what I should alter? I'll start to read up on it when I have the time. Thanks again.

V2 is no longer in development? Dammit! Why am I always late to any party?

Bolt, eh? I guess I should keep that in mind. But I think I'll try to stick with PivotX 2.0 as long as I can.

Re: Pivot1.x to PivotX: Database Import Error

PostPosted: Tue Feb 23, 2016 5:40 pm
by Harm10
Good suggestion by hans!

You will need the whole block active that starts with the header: # Some rules to make old Pivot URLs redirect to the new PivotX URLs.

Re: Pivot1.x to PivotX: Database Import Error

PostPosted: Tue Feb 23, 2016 6:24 pm
by hansfn
is what I should alter


No, no altering. Just copy the whole block to your .htaccess file.

Re: Pivot1.x to PivotX: Database Import Error

PostPosted: Wed Feb 24, 2016 4:18 am
by hishgraphics
It didn't work.

This is my newest blog post. The new URL points here: http://www.hishgraphics.com/blog/?e=1477

The previous 1.x URL for it is: http://www.hishgraphics.com/blog/pivot/ ... hp?id=1477

With the .htaccess in the /blog directory with no modification to the following code...:

Code: Select all
RewriteRule ^archives/archive_(.*)\.php index.php?a=$1 [R=301,L]
RewriteCond %{QUERY_STRING} id=([1-9][0-9]*)
RewriteRule ^pivot/entry.php index.php?e=%1 [R=301,L]
RewriteCond %{QUERY_STRING} c=([^&]*)
RewriteRule ^pivot/archive.php index.php?c=%1 [R=301,L]
RewriteCond %{QUERY_STRING} tag=([^&]*)
RewriteRule ^pivot/tags.php index.php?t=%1 [R=301,L]
RewriteRule ^rss\.xml$ rss [R=301,L]
RewriteRule ^atom\.xml$ atom [R=301,L]


... the URL is now pointed instead to: http://www.hishgraphics.com/home/hishgr ... .php?e=783

I wonder if something is wrong with how my Firefox is parsing the URL. Or if there are unforeseen server limitations. Time for me to dig some more into .htaccess I suppose.

Re: Pivot1.x to PivotX: Database Import Error

PostPosted: Wed Feb 24, 2016 9:08 am
by hansfn
OK, you didn't have any rewrite rules earlier. You need to set RewriteBase ;-) Add

Code: Select all
RewriteBase /blog/

before the code you posted.

PS! RewriteBase is mentioned in the example.htaccess file I pointed to.

Re: Pivot1.x to PivotX: Database Import Error

PostPosted: Wed Feb 24, 2016 3:47 pm
by hishgraphics
Thanks again! I didn't know what rewrite rules were.