Staticpages db format error

Found a bug? Tell us!!
Post Reply
empika
Regular
Posts: 9
Joined: Mon Jan 31, 2005 3:39 pm

Staticpages db format error

Post by empika »

Hi

when i save a static page i get this error:

ERROR:

INSERT INTO commune_staticpages (headline,permalink,pagetitle,articletype,publishstatus,language,content,markup,articleformat,articleformattitle,authorid,parent_id,show_childpages,pre_content,pass,filename,is_startpage,shownavi,showonnavi,timestamp,pageorder) values ('Testing', '/pages/testing.html', 'testing', '3', '0', 'en', 'testing testing 1 2 3 wee', '1', '1', 'Communecation.net :: ', '1', '0', '1', '', '', 'none.html', '0', '1', '1', '1167837887', '2')

/ Unknown column 'show_childpages' in 'field list'

I did get another error previously about "articletype" but i seem to have remedied that by following another thread. but now, having acctually looked at the DB it seems that it is missing 3 more fields!
Are there any patches or any lines of sql i can run to fix this, i dont want to attempt myself incase i b0rk my installation.
thanks
edd
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Staticpages db format error

Post by garvinhicking »

Hi!

It seems that you upgraded the staticpage-plugin somewhen, but it was not able to perform the proper SQL statements.

Try to execute this SQL:

Code: Select all

ALTER TABLE commune_staticpages ADD COLUMN show_childpages int(1) not null default '0';
ALTER TABLE commune_staticpages ADD COLUMN pre_content text;
ALTER TABLE commune_staticpages ADD COLUMN is_startpage int(1) default '0';
ALTER TABLE commune_staticpages ADD COLUMN pageorder int(4) default '0';
ALTER TABLE commune_staticpages ADD COLUMN articletype int(4) default '0';
CREATE TABLE commune_staticpages_types (
                        id int(11) autoincrement int(11) not null auto_increment primary key,
                        description varchar(100) not null default '',
                        template varchar(255) not null default '',
                        image varchar(255) not null default '');
INSERT INTO commune_staticpages_types (description, template) VALUES ('Article', 'plugin_staticpage.tpl');
INSERT INTO commune_staticpages_types (description, template) VALUES ('Overview', 'plugin_staticpage_aboutpage.tpl');
UPDATE commune_staticpages SET articletype = 1, pageorder = 0;
ALTER TABLE commune_staticpages ADD COLUMN shownavi int(4) default '1';
ALTER TABLE commune_staticpages ADD COLUMN showonnavi int(4) default '1';
ALTER TABLE commune_staticpages ADD COLUMN publishstatus int(4) default '1';
ALTER TABLE commune_staticpages ADD COLUMN language varchar(10) default '';
CREATE FULLTEXT INDEX staticentry_idx on commune_staticpages (headline, content);
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
empika
Regular
Posts: 9
Joined: Mon Jan 31, 2005 3:39 pm

Post by empika »

great, after alot of dabbling this worked a treat. i already had a bunch of those columns and also already had the types table too. how odd eh!

thank alot garvin :)
empika
Regular
Posts: 9
Joined: Mon Jan 31, 2005 3:39 pm

Post by empika »

:(
after all that i am getting this 'error' when i post a certain old article up:

Get The Hell Outa Here!

Any idea what this means or why it may not like the content?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

That message does not come from Serendipity! Is it maybe mod_security from your server?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
empika
Regular
Posts: 9
Joined: Mon Jan 31, 2005 3:39 pm

Post by empika »

how strange. I will look into this further.
It seems to work ok with most stuff i try, i have copied the html out of previous blog posts and it seems to work fine but one old article i copied and pasted the html from an article i had before updated and it throws this.
I shall ask my host and see what they know.

thanks
edd
empika
Regular
Posts: 9
Joined: Mon Jan 31, 2005 3:39 pm

Post by empika »

ok, it seems to be a 403 error... but why would i get it on this one particular piece of html?
Is there anything that the staticpages plugin cannot parse properly?

here is what i am pasting into the content box
http://pastebin.com/850814
empika
Regular
Posts: 9
Joined: Mon Jan 31, 2005 3:39 pm

Post by empika »

seems like the plugin is having trouble parsing some different things.
it doesnt like "G++" or "g++" but manages to handle "G ++" or "g ++".

it does not like the line..
255);">eddy@obiwan:~# tar -xvzf lame-3.96.1.tar.gz<br />

..either and it bombs out at

255);">eddy@obiwan:~# tar -

i tried to add each bit to the line to see where it would bomb out but am not going to go throught the whole lot to find out what else it doesnt like unless i really have to :)

so any ideas? could be the way the plugin posts the data back to the server?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

It's not the plugin, it'S your server's mod_security that is reacting on that. Talk to your hoster please, it is nothing that serendipity can change!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply