Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 08:27 am EDT

Geeklog Forums

advanced_editor_mode


Status: offline

colonel_flagg

Forum User
Newbie
Registered: 09/13/06
Posts: 13
After installation and getting the site back up and running from a mysql backup, if I go to post a new story, when I click "Save", I get the following in the error.log file:

Fri Jan 5 14:09:06 2007 - 1054: Unknown column 'advanced_editor_mode' in 'field list'. SQL in question: REPLACE INTO gl_stories

In the config file,

$_CONF['advanced_editor'] = false;

I have toggled this, tried again, same error. Changed back to false, same error.

Looks like, during the install, the field did not get injected into the table.

Thoughts? Fix?




/CF
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
So did you do an install or a restore from backup? Or both, meaning the backup was from an older Geeklog version?

bye, Dirk
 Quote

Status: offline

colonel_flagg

Forum User
Newbie
Registered: 09/13/06
Posts: 13
Found the problem, previous admin of the site put some custom code into the story.php file. I believe I have it resolved.



/CF
 Quote

William

Anonymous
I would like to please revisit this issue as I am receiving the same error. I restored a backup db into a new installation. All of the geeklog files are new and default except the ones necessary to change.

Text Formatted Code
('20071219131219721',254,'General','asdf','adf','adsf',0,FROM_UNIXTIME(1198087505),'0','0','',0,'0','0','0',FROM_UNIXTIME(943938005),'plaintext','1',0,0,254,3,3,2,2,2,1,1,0)
Wed Dec 19 13:16:47 2007 - 1054: Unknown column 'advanced_editor_mode' in 'field list'. SQL in question: REPLACE INTO gl_stories (sid,uid,tid,title,introtext,bodytext,hits,date,comments,trackbacks,related,featured,commentcode,trackbackcode,statuscode,expire,postmode,frontpage,draft_flag,numemails,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon,show_topic_icon,in_transit,advanced_editor_mode) VALUES ('20071219131619684',254,'z32fanatic','asd f dsf','as dfsd af','sdf ds f asdf sad f fsadf f ',0,FROM_UNIXTIME(1198088179),'0','0','',0,'0','0','0',FROM_UNIXTIME(943938019),'html','1',0,0,254,3,3,2,2,2,1,1,0)
 


please let me know if you need more of the error. I am on the latest version of geeklog,
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Sounds like you didn't run the install script in upgrade mode. You need to do this to update your database, e.g. to add new fields like the "advanced_editor_mode" (which is new in 1.4.1) it's complaining about.

bye, Dirk
 Quote

William

Anonymous
So I should run the install script again, this time in upgrade mode?

I read this, maybe I am confused. http://www.geeklog.net/faqman/index.php?op=view&t=37

I received the backup of their database,
I installed geeklog
I emptied the database and uploaded their backup

now I need to go through the install agian and choose upgrade? While the current data is in the db?

Thank you very much for your help.
 Quote

William

Anonymous
I also notice, it is giong to this page in the url when trying to post

http://www.jackkingoff.net/sngiconsmain/geeklog/public_html/admin/story.php

obviously this file is not in that location
 Quote

William

Anonymous
i apologize for my incorrect post above.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: William

now I need to go through the install agian and choose upgrade? While the current data is in the db?


Yes.


Quote by: William

obviously this file is not in that location


Check $_CONF['site_url']

bye, Dirk
 Quote

William

Anonymous
I am not upgrading though, I am migrating and our geeklog is on the latest version for the old and new setup.

I am getting this, Its been re uploaded a few times and verified successfull by my hoting. i have also tried multiple backups of the DB.

Text Formatted Code
FROM gl_staticpage WHERE (sp_centerblock = 1) AND (sp_where = 0) AND ((sp_tid = 'none') OR (sp_tid = 'all')) AND (perm_anon >= 2) ORDER BY sp_id
Fri Dec 21 08:38:36 2007 - 1054: Unknown column 'sp_help' in 'field list'. SQL in question: SELECT sp_id,sp_title,sp_content,sp_format,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon,sp_php,sp_inblock,sp_help


Any thoughts?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Same as above: A complaint about a new field (used in the code but not present in the database).

Are you sure you were running the same Geeklog version on the old site as the one you now have on the new site? From the errors you're getting, I'd say they were different.

bye, Dirk
 Quote

William

Anonymous
Yes I run the version check and it comes back with the latest version. 1.4.1

I dont see anything in story.php about anything in this error. Is there another file it may be in?

From what I can tell sp_help is the only field that is not in the gl_staticpage table if that means anything.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
A search for "advanced_editor" should result in quite a few hits in admin/story.php

At the risk of sounding like a broken record: Your database seems to have been created with an earlier version of Geeklog.

Have you tried running the install script in upgrade mode? Since you have a copy of the database anyway, the worst thing that could happen is that you'd have to reinstall that db backup.

The install script will actually try to guess your current version (see what the version dropdown defaults to) and will refuse to continue if it thinks your database is already up to date. But my guess is that it will upgrade your database.

bye, Dirk
 Quote

William

Anonymous
I had tried to run in upgrade mode and it has reported an error, something existed. I saw the error in the common errors part of the install instructions, it said something about havnig already tried the install. I did a fresh install and got the same thing.

Anyways, I went ahead and started from scratch again.

Installed 1.4.1, verified the new isntall worked.
Deleted the db content and imported the backup DB from the old hosting.
I verified I received the same error as above.
I tried again to run the upgrade.
It said it successfully went through.

I verified that Admin can log in and post, success. I have not verified regular users yet.

Thank You so much for your help. I am not sure why it took so many attempts to fix. Im sure i screwed something up to make the upgrade not work the first few tries while i was trying to fix the problem.

For future reference. Does it matter what version the old DB is, or the version it was installed from. I just went and verified and it said 1.4.1, however per the upgrade it said 1.4.0 so I'm assuming they installed 1.4.0 then upgraded to 1.4.1. ?

So, if I take this db from my test server and import it to a db in my production server. Theoretically, all I will have to do is to change the db username and pass in the config.php file correct? Assuming the import is 100% successfull and whatnot.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The version check in Geeklog only checks the version of the code, not the database. Actually, it only looks at the version number in config.php

The install script, when upgrading the database, looks at the existence of a few fields and tables and determines the current version from that (e.g. when the gl_users table has a 'remoteusername' field, it's at least version 1.4.0, and so on). It's not bullet-proof, though, and a failed upgrade could confuse it.

bye, Dirk
 Quote

All times are EDT. The time is now 08:27 am.

  • 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