Welcome to Geeklog Saturday, June 23 2018 @ 10:54 pm EDT

Geeklog Forums

How to re-install plugins when migrating to new server


Status: offline

worldfooty

Forum User
Full Member
Registered: 13/01/09
Posts: 156
Location:Mostly Adelaide, South Australia, Australia
Hi,

My host wanted to move me to a new server and in the process I'm trying to upgrade to GL1.8 before jumping to 2.0

In the install procedure I've chosen the Migrate option and the first line says:

Be sure any previously installed plugins have been copied to your new server.

Exactly what does it want me to do? I've grabbed the latest zip files of the plugins I use: mediagallery, captcha, youtube, socialmedia, do I need to install them all first before proceeding?

And if I chose to follow through the Migration (I've got the new server, I've created an empty database and I've decided to import my old db first *, and I've unpacked GL1.8) will I get messed up if I do NOT do anything about my plugins first? Can I just install them afresh once I have GL fully installed or will that trash anything the plugins previously needed to add to my db?

* I'm a bit nervous that my db and user have different names to the old server, hopefully if I import it manually and enter the new names in the Migration screen everything will work.

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1281

If you are upgrading Geeklog you do not need to choose the migrate option.

I would upgrade on the first server and then move the website to the second server. If the domain is the same and the paths are the same then you do not need to migrate.

You only need to choose the migrate if the domain or paths are changing.

One of the Geeklog Core Developers.

Status: offline

worldfooty

Forum User
Full Member
Registered: 13/01/09
Posts: 156
Location:Mostly Adelaide, South Australia, Australia
Too late. I created an empty db on the new server, backed up my old one, imported it, installed GL1.8, copied across some of my images etc, did the migrate option. Seemed to work ok.

It was going pretty well except I have a lot of customisations and glmenu. I was working through the customisations and installing menu plugin 1.1 when suddenly every stopped working and I got that error about not being able to render. I forced root debug on as recommended elsewhere on here by changing if( function_exists('set_error_handler'Wink ) to force it on.

The error I get now is Fatal error: An SQL error has occurred. Please see error.log for details. in /home/wfnews/system/databases/mysql.class.php on line 260

and the error log shows:

Sun 08 Jun 2014 10:07:41 CST - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND (perm_anon >= 2) ORDER BY topic ASC' at line 1. SQL in question: SELECT tid,topic,imageurl FROM gl_topics AND (perm_anon >= 2) ORDER BY topic ASC

Now I'm pretty lost. I hadn't made any changes to the db in the few hours before it broke.


Status: offline

worldfooty

Forum User
Full Member
Registered: 13/01/09
Posts: 156
Location:Mostly Adelaide, South Australia, Australia
I've tried running that command from in phpadmin:

SELECT tid,topic,imageurl FROM gl_topics AND (perm_anon >= 2) ORDER BY topic ASC

and get the same error. But all those fields exist in gl_topics and I have touched any of that since my site was looking ok after the initial migration.

Actually it seems to need some quotes:

SELECT tid,topic,imageurl FROM `gl_topics` AND (perm_anon >= 2) ORDER BY topic ASC

but still fails. Interestingly if I run that command on my old server (that is still live) I get the same error, even though my site is ok. It seems like it's something to do with perm_anon.

I don't know.

Could the db have been corrupted somehow... maybe I tried to install another plugin although I don't think I did. I was mostly messing around with header.thtml

What should the command look like to work on my working old server, and regardless, what now? I could re import my database but I assume that would be a problem since I've installed menu plugin since then - I assume it would've added to the database since my old server backup didn't have it.

Status: offline

worldfooty

Forum User
Full Member
Registered: 13/01/09
Posts: 156
Location:Mostly Adelaide, South Australia, Australia
Actually I did try to install captcha 3.5.5 about 30 mins before all the problems...maybe that screwed things up? Here's my error log from migration to now:

[snip]

If I wanted to delete then re-import my database, how do I re-install menu plugin since it's already done? Do I just disable it and install it again or will that be a problem? Is it smarter enough to re-update the database?

Will be back in a few hours, hoping someone can help.

Status: offline

worldfooty

Forum User
Full Member
Registered: 13/01/09
Posts: 156
Location:Mostly Adelaide, South Australia, Australia
OK it wouldn't let me post my error log details so I'll try to put just the relevant bit: Sat 07 Jun 2014 23:54:14 CST - Attempting to install the 'menu' plugin Sat 07 Jun 2014 23:54:14 CST - Attempting to create 'Menu Admin' group Sat 07 Jun 2014 23:54:14 CST - Attempting to add 'menu' features Sat 07 Jun 2014 23:54:14 CST - Adding 'menu.admin' feature to the 'Menu Admin' group Sat 07 Jun 2014 23:54:14 CST - Attempting to give all users in the Root group access to the 'menu' Admin group Sat 07 Jun 2014 23:54:14 CST - Registering 'menu' plugin Sat 07 Jun 2014 23:54:15 CST - Successfully installed the 'menu' plugin! Sat 07 Jun 2014 23:54:57 CST - Attempting to install the 'captcha' plugin Sat 07 Jun 2014 23:54:57 CST - Attempting to create 'Captcha Admin' group Sat 07 Jun 2014 23:54:57 CST - 1050: Table 'gl_cp_sessions' already exists. etc I think the next few lines is where it won't let me post on here.

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/05
Posts: 1569
Location:la rochelle, France
Hi Brett,

About menu plugin and the sql error:
Can you check if line 695 in plugins/menu/classes/classMenuelement.php is

PHP Formatted Code
$sql = "SELECT tid,topic,imageurl FROM {$_TABLES['topics']} WHERE 1=1" . $langsql;

and if line 695 in plugins/menu/classes/classMenuelement2.php is

PHP Formatted Code
$sql = "SELECT tid,topic,imageurl FROM {$_TABLES['topics']} WHERE hidden=0" . $langsql;


Abou captcha plugin: delete with phpMyadmin the gl_cp_sessions table before trying to reinstall captcha plugin.

Ben
I'm available to customise your themes or plugins for your Geeklog CMS

Status: offline

worldfooty

Forum User
Full Member
Registered: 13/01/09
Posts: 156
Location:Mostly Adelaide, South Australia, Australia
classMenuelement.php is missing WHERE 1=1

Should I change it?

classMenuelement2.php is as you wrote.

I'll try deleting the gl_cp_sessions table soon.


Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/05
Posts: 1569
Location:la rochelle, France
Should I change it?


Yes.

Thanks,

Ben
I'm available to customise your themes or plugins for your Geeklog CMS

Status: offline

worldfooty

Forum User
Full Member
Registered: 13/01/09
Posts: 156
Location:Mostly Adelaide, South Australia, Australia
Wow, that fixed it thank you! Was that an omission from the version I downloaded or... how did it happen?

Status: offline

worldfooty

Forum User
Full Member
Registered: 13/01/09
Posts: 156
Location:Mostly Adelaide, South Australia, Australia
Latest captcha is now installed ok thanks, with the above advice.

My to do list is now:

- get socialshare working *
- get media gallery back
- get youtube plugin working
- make the menu across the top more like our old one (was based on glmenu)
- restore or save old stats
- transfer our email accounts and forwarding info
- resolve some issues with the time the server shows

* I broke socialshare 1.1 in the move, tried disabling, deleting (caused error because I hadn't copied the code across), deleting the entry from the plugins table, dropping the socialshare table. Each time when I tried to install 1.2 I got errors. Any hints welcome or tomorrow I'll try looking at how the function deletes the plugin to see what I'm missing. At this stage I just want to fully delete it then install 1.2 afresh.

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1281
Instead of the Youtube plugin you could install the Autotag plugin.

This allows you to create easy to advanced autotags.

1061

Once installed you can create a customized youtube autotag that allows you to specify the size, border colour, etc...

For example here is the code I use (when I created the tag youtube):

PHP Formatted Code

<div align="#2">
<object width="500" height="315"><param name="movie" value="http://www.youtube.com/v/#1&hl=en&fs=1&rel=0&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/#1&hl=en&fs=1&rel=0&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="315"></embed></object>
</div>
 

One of the Geeklog Core Developers.

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/05
Posts: 1569
Location:la rochelle, France
Brett,

For socialshare plugin you need to check if group and feature are remove from your database before you can reinstall it. There was certainly an error during last install or uninstall and group and/or feature were not remove properly.

Ben
I'm available to customise your themes or plugins for your Geeklog CMS

Status: offline

worldfooty

Forum User
Full Member
Registered: 13/01/09
Posts: 156
Location:Mostly Adelaide, South Australia, Australia
Ben got me sorted out.

Just haven't worked out how to make menu plugin menus appear when I create them - only the default navigation one seems to work.

Status: offline

worldfooty

Forum User
Full Member
Registered: 13/01/09
Posts: 156
Location:Mostly Adelaide, South Australia, Australia
Ben explained. The default navigation one works across the top so I had to edit that one as desired. The other ones you can create go in blocks.

Warning that there was also a bug in there which he's fixing.

But with that fix in place I really like it, it's done a great job of replacing glmenu that I was using (although in danger of RSI as I manually re-created about 50 menu elements).

Cheers,
Brett

All times are EDT. The time is now 10:54 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content