Page 3 of 3

Re: Announcing CMS Made Simple 1.1.2

Posted: Fri Sep 07, 2007 12:06 am
by calguy1000
if the css disappears it usually means a php error of some sort.

You need to look at your httpd error log for interesting things
failing that, you can try adding this to config.php (temporarily):

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors','On');
Then refresh the page and see if anything appears, also check your page source for the word Error. If you find that word, then there's usually an error you can see.

Re: Announcing CMS Made Simple 1.1.2

Posted: Fri Sep 07, 2007 10:20 am
by GDS
I have CMSms running on localhost on my PC.

I upgraded from 1.1 to 1.1.1 using the diff,
all working fine.

Then I upgraded to 1.1.2 using the full installation,
and News disappears.

I am using pretty URL's.
The RSS output is ok.

No news appears on News pages or in News Admin.
Other aspects of News Admin works fine.
It is possible to a add news, but they will not show up (except in RSS).
Upgrading to News 2.5 does not change anything.

Is there a way to un-upgrade back to 1.1.1?


GDS

Re: Announcing CMS Made Simple 1.1.2

Posted: Sat Sep 08, 2007 2:49 am
by Nullig
I just did a fresh install of 1.1.2 on a new site and the News items don't appear in either the frontend or backend, even though I can see them in the db.

Nullig

Re: Announcing CMS Made Simple 1.1.2

Posted: Sat Sep 08, 2007 3:00 am
by calguy1000
I'll check this out tomorrow, but I did a fresh install of 1.1 today, on a new database, in a new directory, added a news item, then did an upgrade to 1.1.2 and had no difficulties.

Re: Announcing CMS Made Simple 1.1.2

Posted: Sat Sep 08, 2007 3:25 am
by Nullig
I don't understand it at all, as it was working fine up to 1.1.1, then when I did the 1.1.1-1.1.2 update, it stopped displaying.

The server is running PHP Version 4.4.1, with a memory_limit of 32M and MySQL 3.23.58.

Nullig

Re: Announcing CMS Made Simple 1.1.2

Posted: Sat Sep 08, 2007 9:05 am
by openmtl
Nullig wrote: I can't see the items in the admin panel, but they were Approved and displayed properly in 1.1.1. The templates are OK. Authorisation is OK.

The new articles showed fine up to CMSMS 1.1.1, then when I did the update to 1.1.2 using the 1.1.1-1.1.2 file, they stopped showing.

I just created a new article and it doesn't show, either.

{news number='4' detailpage='news'} is the tag I use in my template.

Nullig
Turn on $config['debug'] = false;  in config.php and see if you get SQL errors on any page with news in it. I haven't moved to 1.1.2 yet but when I moved from 1.1 -> 1.1.1 (by overwriting the installation with the whole tar.gz rather than using diff) then the SQL syntax changed a little and it tripped up on my old MySQL site. The effect was to have news stories in database but they never appeared on the web page.

Re: Announcing CMS Made Simple 1.1.2

Posted: Sat Sep 08, 2007 12:57 pm
by GDS
I tried to set $config['debug']= true;
I got this Debug message:


(mysql):
            SELECT
                mn.*,
                mnc.news_category_name,
                mnc.long_name,
                u.username,
                u.first_name,
                u.last_name
            FROM cms2_module_news mn
            LEFT OUTER JOIN cms2_module_news_categories mnc
            ON mnc.news_category_id = mn.news_category_id
            LEFT OUTER JOIN cms2_users u
            ON u.user_id = mn.author_id
            WHERE
                status = 'published'
            AND
        ( IFNULL(start_time, '1970-01-01 01:00:01')  < '2007-09-08 14:19:42')  AND (( IFNULL(end_time, '1970-01-01 01:00:01')  = '1970-01-01 01:00:01') OR (end_time > '2007-09-08 14:19:42')) ORDER BY news_date desc LIMIT 7 OFFSET 0
Error (1064): You have an error in your SQL syntax near 'OFFSET 0' at line 17

Re: Announcing CMS Made Simple 1.1.2

Posted: Sat Sep 08, 2007 1:37 pm
by GDS
The error seems to (sort of) disappear if I comment out Line 237 in modules/News/action.default.php

#$query1 .= " LIMIT $pagelimit OFFSET $startelement";

(But now  all articles  shows up, of course)


For the admin panel, I commented out line 95 in modules/News/function.admin_articlestab.php

#$query1 .= " LIMIT $pagelimit OFFSET $startelement";



GDS

Re: Announcing CMS Made Simple 1.1.2

Posted: Sat Sep 08, 2007 3:10 pm
by openmtl
GDS wrote: The error seems to (sort of) disappear if I comment out Line 237 in modules/News/action.default.php

#$query1 .= " LIMIT $pagelimit OFFSET $startelement";

(But now  all articles  shows up, of course)


For the admin panel, I commented out line 95 in modules/News/function.admin_articlestab.php

#$query1 .= " LIMIT $pagelimit OFFSET $startelement";



GDS
Ah same bug as me !. The syntax for older MySQL is ..." LIMIT $startelement , $pagelimit ";  and not the Postgresql syntax of  " " LIMIT $pagelimit OFFSET $startelement";, but as mentioned in http://forum.cmsmadesimple.org/index.ph ... 707.0.html we should be using SelectLimit() e.g. I think this is right but I haven't tested this,

if( $pagelimit >= 0 )
      {
        $dbresult =& $db->SelectLimit($query1,$pagelimit,$startelement,$parms);
      }
      else
      {
        $dbresult =& $db->Execute($query1,$parms);
      }

Re: Announcing CMS Made Simple 1.1.2

Posted: Sat Sep 08, 2007 3:58 pm
by GDS
I tested with this code in both files:

# query1 .= " LIMIT $pagelimit OFFSET $startelement";
$query1 .= " LIMIT $startelement , $pagelimit ";   

Seems to work fine for me.


GDS

Re: Announcing CMS Made Simple 1.1.2

Posted: Sat Sep 08, 2007 4:03 pm
by calguy1000
SelectLimit is the proper way to go.  I'll see about changing it for News 2.5.1, and have it out this weekend or monday.

Re: HEEELP lost adminisration CSS in 1.1.2 !!

Posted: Sat Sep 08, 2007 4:12 pm
by openmtl
PatDeLux wrote: you can see the result here: www.idevlop.com/admin

And it's a problem because I had lost my News as well (I re-enter them now - what a night!) but also, without the normal presentation in the admin interface, I cannot reach the News template, which I need to restore :(

How can I get this admin CSS back ? If necessary I can access MySql records.
For the News see the bits in this thread on the MySQL syntax for the SELECT. That should fix that little quirk.

For missing Admin stylesheets then I get a ERROR 500: Internal Server Error. when I wget your stylesheet
which kind of tells us a lot. (what I've been doing to date is that I go to the page I like. Right mouse- and
look at View Page Info using Firefox and go to the "Links" tab. In the "Links" tab I look for stylesheets and
then right-mouse and do copy.

In your case it is a stylesheet of ...http://www.idevlop.com/admin/loginstyle.php (as is everyone's in CMSMS
I guess including mine other than your domain name etc.)

Now what I do next is use wget to get the stylesheet (I use this a lot to learn about people's CSS code !)
but on your site I get "500 Internal Server Error"  (you're running an Apache/1.3.37 Server)

e.g.
\wget\wget http://www.idevlop.com/admin/loginstyle.php
--17:59:49--  http://www.idevlop.com/admin/loginstyle.php
          => `loginstyle.php'
Resolving www.idevlop.com... 213.186.33.2
Connecting to www.idevlop.com[213.186.33.2]:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
17:59:49 ERROR 500: Internal Server Error.

...which can't be any more generic but looks like you're going to have to track that with Web logging.

One thing I have noticed with "missing" stylesheets for Admin interface is that I have found on one of my
bizarrely ancient hosting accounts is that if new modules are added BUT the initial module startup and
various require/require_once etc etc where various stuff is pulled in MUST have a full path name e.g.

require 'classes/module/class.AlbumAdmin.php';

will fail BUT for my older hosting account it MUST have the full path name e.g.,

require dirname(__FILE__).DIRECTORY_SEPARATOR.'classes/module/class.AlbumAdmin.php';

i.e. just stick in "dirname(__FILE__).DIRECTORY_SEPARATOR." wherever it complains.

Now to see where it complains it sometimes takes a bit of looking around but I find if I go to
the Admin -> Modules.

Re: Announcing CMS Made Simple 1.1.2

Posted: Sat Sep 08, 2007 9:33 pm
by Nullig
@openmtl

Thanks... that was the problem. I changed the query and it works perfectly, now.

Nullig

Re: Announcing CMS Made Simple 1.1.2

Posted: Tue Oct 02, 2007 3:34 am
by calguy1000
Yeah, the "LIMIT x OFFSET y" stuff was introduced to solve some postgres compatibility issues (postgres doesn't support "LIMIT x,y" queries).  Unfortunately, older versions of mysql don't support "LIMIT x OFFSET Y" queries.... ugh

The proper solution is to use the adodb function SelectLimit(), which (crosses fingers and toes) should solve all three problems (postgress, old mysql, and new mysql). 

After a couple of iterations, SelectLimit is now used in News 2.5.1 (included in 1.2beta2).