Stylesheet issue with Postgres

General project discussion. NOT for help questions.
Post Reply
ceilingfish

Stylesheet issue with Postgres

Post by ceilingfish »

I have been using CMCMS with a Postgres v7.3.4 database server.

I have been having trouble administering adding stylesheets, cos there was no drop down of templates to select to associate to stylesheets.

it turns out this is because of the following sql in the page /admin/templatecss.php:

197: SELECT * FROM ".cms_db_prefix()."templates WHERE template_id ORDER BY template_name

Postgres doesn't support non-boolean WHERE clauses on this version so it failed. Very quietly, and as such produced no dropdown. The problem can be solved by changing the SQL to this:

197: SELECT * FROM ".cms_db_prefix()."templates WHERE template_id > 0 ORDER BY template_name

Tom
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Stylesheet issue with Postgres

Post by Ted »

Thanks for that.

This was already fixed in svn.  Very similar fix.
Post Reply

Return to “General Discussion”