NUM error

3 posts by 3 authors in: Forums > CMS Builder
Last Post: August 12, 2010   (RSS)

By s2smedia - August 12, 2010

I am an idiot.. I accidentally renamed the field_name for "num" in the user accounts viewer.

now Im getting an error and it wont me change it back..

and quick fixes are appreciated..

get this errow when I try to change it back to "num"

Notice: Undefined index: num in /home/apexsocc/club_ambassador/pages/login/lib/admin_functions.php on line 506
There was an error creating the MySQL Column, the error was:

Incorrect table definition; there can be only one auto column and it must be defined as a key

Re: [s2smedia] NUM error

By Jason - August 12, 2010

Hi,

The best solution would be to restore a backup from before you made the change. This will rename the field back to "num". It will still have the new column name when you view the section editor, so go to data/schema/ folder and find the accounts.ini.php. The file will look something like this:

;<?php die('This is not a program file.'); exit; ?>

_disableView = 1
listPageFields = "fullname, username, email, isAdmin"
listPageOrder = "fullname, username"
listPageSearchFields = "fullname, username, email"
menuHidden = 0
menuName = "User Accounts"
menuOrder = 1191281761
menuType = "multi"
tableHidden = 0

[NEW FIELD NAME]
order = 1
isSystemField = 1

[createdDate]
order = 2
type = "none"
label = "Created"
isSystemField = 1


Where NEW FIELD NAME is the name you changed num to. Change this back to num and save the file.

That should take care of the issue. It would also be a good idea to disable system field editing from the advanced options menu of your section editor. This will help avoid this mistake in the future.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/