Error message re stylesheets on reinstall: SQL error in listcssassoc.php

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
burlington
Power Poster
Power Poster
Posts: 444
Joined: Wed Dec 27, 2006 5:15 pm

Error message re stylesheets on reinstall: SQL error in listcssassoc.php

Post by burlington »

I have just completely reinstalled CMSMS from 1.4 something, and used version 1.6.4 "Moindou" for this.

On trying to associate an existing Template with a Stylesheet I get the message: 'SQL error in listcssassoc.php'

If I create a NEW Template, and again try to associate it with a Stylesheet, I get the same message.

If I try to create the connection the other way round, ie from the Stylesheet list, then I get the message: 'Error creating association'

Rightly or wrongly, I kept the SQL database untouched when reinstalling but I can't figure out what the problem now is.

I have read the previous postings last year on this but they seem to refer to version 1.5xx.

Can anyone help please?

Thank you.

Martin
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Error message re stylesheets on reinstall: SQL error in listcssassoc.php

Post by Dr.CSS »

You can not reinstall a site or whatever by just putting the files up you need to run install/upgrade.php...
burlington
Power Poster
Power Poster
Posts: 444
Joined: Wed Dec 27, 2006 5:15 pm

Re: Error message re stylesheets on reinstall: SQL error in listcssassoc.php

Post by burlington »

Sorry, but I think you misunderstand me.

What I did was to delete ALL of the CMSMS site, folders & files, eg admin, lib and so on, then upload a completely new set from 1.6.4 then run Install as if I was starting afresh.

I did this because the previous site seems to have been hacked, so a fresh start was called for.

I did of course take considerable precautions of copying all the templates, CSS, Globals etc codes etc to .txt in case everything went pear-shaped but in the event, the re-install went smoothly except for the issue about the CSS associations, and the text backups I made were generally not needed.

Perhaps I should have deleted the database as well, and then re-installed it form a back-up copy; I don't know.

Martin
burlington
Power Poster
Power Poster
Posts: 444
Joined: Wed Dec 27, 2006 5:15 pm

Re: Error message re stylesheets on reinstall: SQL error in listcssassoc.php

Post by burlington »

May I please bump this posting up as I do need an answer soonest, if at all possible.

Do you think I should start all over again, and also create DB tables etc over what I already have?

BUT then, if I do that, will I be able to import my old data into the new DB? Are the tables names etc the same?

Thanks

Martin
Fraserm
Forum Members
Forum Members
Posts: 107
Joined: Wed Mar 04, 2009 2:27 pm

Re: Error message re stylesheets on reinstall: SQL error in listcssassoc.php

Post by Fraserm »

Aside from anything else that may be causing/contributing to your issue, the database schema will be significantly different between 1.4 and 1.6.4 so you can't just hook that old DB up to the new core.

As Dr.CSS says, you'll need to run install/upgrade.php from the install directory. The upgrade will make the appropriate changes to your DB schema so that it will work properly with the latest core files.

I know you said you'd copied your templates etc but have your backed up your database using MySQL Administrator, PHPMyAdmin or similar? If you haven't, do it before you upgrade the DB, that way, if 1.6.4 doesn't work you can still restore the DB to a 1.4 install and try again.
Last edited by Fraserm on Mon Aug 31, 2009 2:42 pm, edited 1 time in total.
Pierre M.

Re: Error message re stylesheets on reinstall: SQL error in listcssassoc.php

Post by Pierre M. »

Beware there may be malicious content in the data you are restoring from because you were cracked.

How many pages, templates and stylesheets do you have ? If low (total<30), start from very scratch blank database and copy-paste safe content to the new 1.6 from scratch.
BTW this is a use of static copying (with wget) I hadn't expected but I find usefull.

Pierre M.
burlington
Power Poster
Power Poster
Posts: 444
Joined: Wed Dec 27, 2006 5:15 pm

Re: Error message re stylesheets on reinstall: SQL error in listcssassoc.php

Post by burlington »

Thank you everyone.

I haev now upgraded via /install/upgrade.php and everything seems normal.

All pages & data are backed up via CPanel plus local backup. If, in the event, it all goes pear-shaped, then I do have all the CSS, templates, text backed up via .txt files, etc to be able to reinstall from scratch.

Again, thank you all so much for your help. This Forum is of great help to idiots like me.

Regards

Martin
Post Reply

Return to “CMSMS Core”