PDA

View Full Version : Moved site to new server, problems with CMPS edit page


trana
10-15-2006, 12:20 AM
I am testing the move of my site to a new server. I moved everything to a new server which is running MySQL 5 instead of 4.x. I seem to be having problems making changes to my default page in the CMPS admincp area.

When I try to enable the display of a module in the Edit Page area (my default page), I receive the following error:

Database error in vBulletin 3.6.0:

Invalid SQL:
UPDATE adv_pages SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
`title` = 'Default / Homepage',
`displayorder` = '0',
`parentid` = '0',
`styleid` = '-1',
`active` = '1',
`type` = 'module',
`name` = 'home',
`meta` = (removed)
`advanced` = 'a:2:{s:15:\"adv_portal_poll\";a:1:{s:19:\"portal_poll_forumid\";s:1:\"4\";}s:15:\"adv_portal_news\";a:7:{s:19:\"portal_news_forumid\";s:1:\"9\";s:20:\"portal_news_maxposts\";s:1:\"1\";s:24:\"portal_news_allowreplies\";s:1:\"0\";s:22:\"portal_news_showavatar\";s:1:\"0\";s:20:\"portal_news_showicon\";s:1:\"1\";s:22:\"portal_news_showrating\";s:1:\"0\";s:25:\"portal_news_showsignature\";s:1:\"0\";}}',
`modules` = '34,2,1,29,38,9,7,19,35,37,6,45,4,13,25,36',
`userperms` = '1,2,3,4,5,6,7,8'
WHERE pageid = 1;

MySQL Error : Out of range value adjusted for column 'styleid' at row 1
Error Number : 1264

I had a similar problem with editing my basic style in VB. I asked for help on the VB site and the solution was this:

ALTER TABLE style CHANGE templatelist templatelist MEDIUMTEXT;

So now I am looking for help with my CMPS error which I believe may be related. On the VB site I was informed that one of my mods/hacks may have altered the table structure.

Can anyone help me resolve this?

Thank you in advance.

Brian
10-15-2006, 06:16 PM
That column should already be able to handle the text you've posted. If you run this query though it *should* take care of the problem.

ALTER TABLE `adv_pages` CHANGE `advanced` `advanced` TEXT NOT NULL

Our Sponsors
 

trana
10-16-2006, 12:19 AM
I ran that query (5 rows affected) and I am still receiving this error:

MySQL Error : Out of range value adjusted for column 'styleid' at row 1
Error Number : 1264

Brian
10-16-2006, 02:21 PM
Sorry about that, I think I read over the error too quickly the first time. It looks like MySQL may have changed the way they handle negative integers being inserted into unsigned columns in v5.0. If you'll look in your vba_cmps_admin.php file for this code:
$db->query_write(fetch_query_sql($page, 'adv_pages', iif($_POST['do'] == 'doeditpage', 'WHERE pageid = ' . $pageid)));


And add this right above:
if ($page['styleid'] == '-1')
{
$page['styleid'] = 0;
}


That should take care of the problem.