sNews Forum

Previous sNews versions => sNews 1.5 RC and pre-release => sNews 1.5 preRelease => Topic started by: Mika on December 01, 2006, 06:14:14 pm

Title: Bug report
Post by: Mika on December 01, 2006, 06:14:14 pm
Please post your* bugs here.

___________
* (not ours, we're flawless :D)
Title: Bug report
Post by: Mika on December 01, 2006, 06:48:26 pm
:lol:  :lol:  :lol:  :lol: anyone else gotta bigger bugger that this one?
Title: Bug report
Post by: bramsyuur on December 01, 2006, 07:29:40 pm
Yes! I've found a bigger one!! here is...
(http://snews.bolhost.com/images/bug.gif)
 :lol:  :lol:  :lol:  :lol:  :lol:
Title: Bug report
Post by: Luka on December 01, 2006, 07:33:40 pm
LOOL :)

You can't have one topic without OT :)
Title: Bug report
Post by: Fred K on December 01, 2006, 08:41:35 pm
omfg, he's a, he's a [cue creepy music stab] ** SHAPE SHIFTER ** :lol:

Side note: Mac users might find this to be a bug, even though everyone else considers it a feature -- the default package does not contain a visible htaccess file (on Mac OS X, not Windows or Linux).
viz: (http://www.frdk.com/files/htaccessbug.jpg)
(that is how the unpacked package looks by default on a Mac OS X machine.)

Bug squashed easily by adding a copy of the file and naming it, for example, htaccess.txt
(http://www.frdk.com/files/bugsquash.jpg)

/ End of OS-specific rant /
Title: Bug report
Post by: ketut on December 02, 2006, 03:25:11 am
categories did not show! when upgrade from RC3
Title: Bug report
Post by: Sasha on December 02, 2006, 04:50:06 am
MIKA vs BUG  :D


(http://www.cssanarchy.com/MIKA.gif)
Title: Bug report
Post by: Mika on December 02, 2006, 06:38:07 am
:lol:  :lol:  :lol: Guys, the challenge area is on the left and two blocks up the hill

Ketut, could you be more specific? I don't see any problem with categories..
Title: Bug report
Post by: philmoz on December 02, 2006, 06:53:14 am
Quote from: Mika
:lol:  :lol:  :lol: Guys, the challenge area is on the left and two blocks up the hill

Ketut, could you be more specific? I don't see any problem with categories..
Same prob as Ketut...

pointing Final snews.php to use the  RC3 databse, categories are not being displayed (except 'Home')

went into admin, categories displayed, but with  (0)  articles assigned...

Viewed article list, and all are present, and editable...

Quote
// DISPLAY CATEGORIES
function categories() {
   $categorySEF = get_id('category');
   $class = $category_title == $categorySEF ? ' class="current"' : '';
   echo '<li><a'.$class.' href="'.db('website').'" title="'.s('website_title').'">'.l('home').'</a></li>';
   $query = "SELECT * FROM ".db('prefix')."categories WHERE published = 'YES' ORDER BY catorder ASC";
   $result = mysql_query($query);
   while ($r = mysql_fetch_array($result)) {
      $calc_num_query = "SELECT * FROM ".db('prefix')."articles WHERE position = 1 AND category = $r[id] AND published = 'YES'";
      $cm_result = mysql_query($calc_num_query);
      $num_rows = mysql_num_rows($cm_result);
      if (($num_rows == 0 && isset($_SESSION[db('website').'Logged_In'])) || $num_rows > 0) {
         $category_title = $r['seftitle'];
         $class = $category_title == $categorySEF ? ' class="current"' : '';
         echo '<li><a'.$class.' href="'.db('website').$category_title.'/" title="'.$r['description'].'">'.$r['name'];
         echo (s('num_categories') == 'on' ? ' ('.$num_rows.')' : '').'</a></li>';
      }
   }
}
make blue line like
Quote
$calc_num_query = "SELECT * FROM ".db('prefix')."articles WHERE position = 1 AND category = $r[id] AND published = '1'";
sql is calling for field to be set to YES but db field is numerical.

from readme html, db in final is also being set up as numerical...
Quote
CREATE TABLE articles (
   id int(11) primary key auto_increment,
   title varchar(100) default NULL,
   seftitle varchar(100) default NULL,
     `text` longtext,
     `date` datetime default NULL,
     category int(8) NOT NULL default '0',
     position int(6) default NULL,
     displaytitle char(3) NOT NULL default 'YES',
     displayinfo char(3) NOT NULL default 'YES',
     commentable varchar(5) NOT NULL default '',
     published int(3) NOT NULL default '1',
     description_meta varchar(255) default NULL,
     keywords_meta varchar(255) default NULL
);
Title: Bug report
Post by: Mika on December 02, 2006, 07:17:20 am
ups  :/  you're right - my db is slightly different so I was unable to see the error..
Title: Bug report
Post by: ketut on December 02, 2006, 08:43:24 am
thanks to all, especially philmoz
the problem was resolved.  :cool:
Title: Bug report
Post by: markuz on December 02, 2006, 09:58:52 am
When making an article to be posted in the future, the server time setting obeys the date format in the general settings. That shouldn't be that way, because some people (including me) might use only date (d.m.) and then the server time does not show time, only date. (Server time: 02.12.:42). :)

I also think that the default size for text areas could be larger, e.g. 10x50 or 10x60. 2x5 is quite small, I think...

Anyway, great to get 1.5 final so fast for testing. I use Joomla on bigger sites, but I like this CMS very much, because of it's lightness. :)
Title: Bug report
Post by: markuz on December 02, 2006, 10:02:38 am
Comment approval doesn't work. The comment stays unapproved even if approved.

Line 1287: missing 'index.php'
old: ?action=process&task=editcomment&id='.$commentid
new: index.php?action=process&task=editcomment&id='.$commentid
Title: Bug report
Post by: markuz on December 02, 2006, 11:05:19 am
Hardcoded text, line 854: echo '

Login

';
Title: Bug report
Post by: markuz on December 02, 2006, 11:15:28 am
If a article is to be published in the future, the chekbox "Enable" is not anymore checked, when you come back to edit an article.
Also it should be possible for an admin to see the article even if it waits for publishing, but now it is not.

Edit:
Oh, now I see. The checkbox actually shoudn't be checked, because the checkbox "Publish article" is unchecked.
Title: Bug report
Post by: markuz on December 02, 2006, 11:53:27 am
These strings doesn't show up anywhere:
$l['article_date'] = 'Article date (enter a higher date for future posting)';
$l['a_approve'] = 'Approve';
Title: Bug report
Post by: markuz on December 02, 2006, 12:16:16 pm
This should be at the "#settings form" -block (few lines downwards)
173: $l['contents'] = 'Contents;

This should be at the "#customize article" -block (few lines upwards)
135 :$l['enable'] = 'Enable';

These should be at the "#settings form" -block"
105: $l['login_status'] = 'Login status';
111: $l['logout'] = 'Logout';
148: $l['files'] = 'Files';

Okay. There are lots of other strings also, that are not mayby where they should be. That depends of course how do you look at things. But for a translator it would be a good thing to find all the strings, that belong together, from the same block.
Title: Bug report
Post by: Mika on December 02, 2006, 12:59:08 pm
- future posting time format
- missing article date string
fix:
Quote
function form_articles() {
...
...
if ($contents == 'article_new' || $edit_option == 1) {
      html_input('fieldset', '', '', '', '', '', '', '', '', '', '', '', '', '', ''.l('publish_date').'');
      echo '';
   }
}
comment approval doesn't work
fix
Quote
function edit_comment() {
   echo '

'.l('edit_comment').'

';
   $commentid = $_GET['commentid'];
   $query = mysql_query("SELECT * FROM ".db('prefix')."comments WHERE id='$commentid'");
   $r = mysql_fetch_array($query);
   html_input('form', '', 'post', '', '', '', '', '', '', '', '', '', 'post', 'index.php?action=process&task=editcomment&id='.$commentid, '');
...
- hardcoded "Login" string
fix:
Quote
function login() {
   if ($_SESSION[db('website').'Logged_In'] != 'True') {
      echo '

'.l('login').'

';
...
-strings doesn't show up
fix
Quote
/*delete or comment out this line from language variables*/
$l['a_approve'] = 'Approve';
Thanks for finding those, guys&gals :)
Title: Bug report
Post by: markuz on December 02, 2006, 01:26:20 pm
Missing a period before the 'html'
217: $l['file_include_extensions'] = '.php,.txt,.inc,.htm,html';
Title: Bug report
Post by: markuz on December 02, 2006, 01:34:40 pm
Function filelist() (line 1537) is not obeying the forbidden extension html, because of this substr-function:
line 1542: in_array(substr($file, -3), $extension)
Title: Bug report
Post by: Mika on December 02, 2006, 01:47:59 pm
- missing a period in $l['file_include_extensions']
don't change! see this thread: http://www.solucija.com/forum/viewtopic.php?pid=12901#p12901

- function filelist
fix:
Quote
// FILELIST FUNCTION
function filelist($mode, $path, $depth = 0) {
   $ignore = array('cgi-bin', '.htaccess', '.', '..', 'Thumbs.db');
# period added before php
   $extension = array('.php', 'html');
   $dh = @opendir($path);
   while (false !== ($file = readdir($dh))) {
# size of the elements in array changed to 4
      if(!in_array($file, $ignore) && !in_array(substr($file, -4), $extension)) {
...
Title: Bug report
Post by: Harold on December 02, 2006, 01:56:05 pm
the same as snews 1.5 RC3: message #12:Contact form and comment form is not xhtml 1 strict standards compliance
 and message #21:by writing an article: when i use a single quote - ' like this' - ,the text won't  appear after submitting.

bug report snews 1.5 RC3 (http://www.solucija.com/forum/viewtopic.php?id=2093)
Title: Bug report
Post by: markuz on December 02, 2006, 02:08:16 pm
Quote from: Mika
- missing a period in $l['file_include_extensions']
don't change! see this thread: http://www.solucija.com/forum/viewtopic.php?pid=12901#p12901
Oh, sorry. Of course. I didn't look at the function. :(
Title: Bug report
Post by: Mika on December 02, 2006, 03:27:27 pm
harold, try this and tell us did it fixed your problem

- single quote issue
fix (comments):
Quote
function comment($freeze_status) {
...
if (isset($_POST['comment'])) {
   $comment = cleanXSS($_POST['text']);
   if(!get_magic_quotes_gpc()) {$comment = addslashes($comment);}
...
fix (text):
Quote
function processing() {
...
$text = $_POST['text'];
if(!get_magic_quotes_gpc()) {$text = addslashes($text);}
...
NOTE: you should run (put this line inside an empty some-name.php file, upload to your server and run it) to check whether magic_quotes_xxx is ON or OFF

my server example:
magic_quotes_gpc   On   On
magic_quotes_runtime   Off   Off
magic_quotes_sybase   Off   Off
Title: Bug report
Post by: Mika on December 02, 2006, 03:29:30 pm
and regarding comments and contact area code validity, feel free to use elvino's solution ;)
Title: Bug report
Post by: celebro on December 02, 2006, 03:31:56 pm
RC1 -> Stable w/ Designcreativo template.

Deleting an article only removed it from from the admin panel it did not remove the links to it on the site or the entry from the database,... It was an article that was unpublished.
Title: Bug report
Post by: Mika on December 02, 2006, 03:39:02 pm
?? what version exactly?

I just deleted an article in my test site and it disappeared completely from my db..(as supposed)

edit: vitor's template and regular stable versions are the same
Title: Bug report
Post by: celebro on December 02, 2006, 03:45:05 pm
Originaly the database I had was a 1.5-RC1(shouldn't matter I think) database, but I stopped using it until stable came out,... now I went to try out the 1.5-stable w/ vitors template... there was an unpublished article I had created previously and went into the admin panel to delete it, I noticed it got removed from the admin -> articles  section, but since I had created a link to this article (kinda like a hidden page - Thank You Page to be exact) I noticed I was still able to view the article.

I fired up phpmyadmin and noticed the article was still in the database it was just not showing in the admin section.
Title: Bug report
Post by: Harold on December 02, 2006, 05:56:26 pm
Quote from: Mika
harold, try this and tell us did it fixed your problem

- single quote issue
fix (comments):
Quote
function comment($freeze_status) {
...
if (isset($_POST['comment'])) {
   $comment = cleanXSS($_POST['text']);
   if(!get_magic_quotes_gpc()) {$comment = addslashes($comment);}
...
fix (text):
Quote
function processing() {
...
$text = $_POST['text'];
if(!get_magic_quotes_gpc()) {$text = addslashes($text);}
...
NOTE: you should run (put this line inside an empty some-name.php file, upload to your server and run it) to check whether magic_quotes_xxx is ON or OFF

my server example:
magic_quotes_gpc   On   On
magic_quotes_runtime   Off   Off
magic_quotes_sybase   Off   Off
yes!!  :D  the extra lines (in blue) solved my problem. (single quotes can be used now in Articles and in Comments)

my server:
magic_quotes_gpc:  Off     Off
Title: Bug report
Post by: brauck on December 03, 2006, 02:59:59 pm
When I post an article and I give it a publish date before the date of the last article it is displayed under (before) the last article, which is right I think. However in the 'menu_articles' list it 's title is displayed as the first in the list (ergo the last posted article), which is not correct I think.
Title: Bug report
Post by: Patric Ahlqvist on December 03, 2006, 03:37:15 pm
(Brauck ! Do you still have problem with that category thingy we discussed the other day ? I have still that issue.)

Problemo for moi'o:
I have latest version running (done db upgrader on this one), and I posted a new category in which I posted an article, now that article is accessable from "rescent posts" and  "archives" but not from the visible category in the category list... And I can't seem to find a solucija for this... Might it have something to do with the upgrader ?? As I have not seen this problem posted by any othere that is running "1.5 stablesortof" :lol:

Patric.

PS. All fixes in this thread have been applied, of course ;) DS.
Title: Bug report
Post by: Mika on December 03, 2006, 04:04:00 pm
brauck's issue

fix
Quote
function menu_articles($start, $size) {
   $query = "SELECT * FROM ".db('prefix')."articles WHERE position = 1 AND published = 1 ORDER BY date DESC LIMIT $start, $size";
...
Title: Bug report
Post by: Patric Ahlqvist on December 03, 2006, 04:14:58 pm
I  tried that B-man solution to see if it did anything for me aswell... but as my thingy don't seem to be related to date issues it didn't work out...

Again I'm kind of unsure... Does my categories table have a primary key ? Does it need one ? And if not any present primary key, should I try an add one, can I remove it ? Would this have anything to do woth my problem ?
Title: Bug report
Post by: Patric Ahlqvist on December 03, 2006, 06:55:43 pm
Regarding my dilemma... I have no created and recreated categories, and they work as they should... This CSS category doesn't however. So I deleted it, and made another and posted an article in that...SAME shit again. Could it be related to the number of characters in that particular category ??? Meaning that 3 letter category don't work for some reason ?? In such case I would consider that a buggiebuggbugg...bug.

Patric.
Title: Bug report
Post by: brauck on December 03, 2006, 09:31:48 pm
Are you refering to this (http://www.solucija.com/forum/viewtopic.php?id=2377) Patric?

Edit 03-12-2006. No you don't.

I have the same problem. When you post in a category that has 3 letters (e.g. CSS or PHP) the article id-number in the db is set to 0 (zero).
The article is not showing up in the (article) list of that category, but in the list after that particularly category.
 When you edit that particularly article the delete button does not show up.
So it looks like a bug indeed.

I want to test this again with a clean install of RC4 but it's kind of late now and tomorrow I'm on an outdoor job so it will not be sooner then Tuesday.

Keep you posted.
Title: Bug report
Post by: Mika on December 03, 2006, 11:40:21 pm
I've just tested three-letter category on my fresh snews installation and found no problem. Please check your table categories and look for the primary index on column "id" - if it's not there, add it manually via phpmyadmin. This might help:
Quote
-- use it only if primary key's missing
ALTER TABLE categories
MODIFY id int(11) primary key auto_increment;
Title: Bug report
Post by: Patric Ahlqvist on December 04, 2006, 07:57:51 am
I do however think that the id is primary, and now I've found out a thing... Yesterday I persisted in testing a CSS category, that exact word as category title, and with an number of tries I did not succeed, so today I begin again but this time I try a different three letter combination, ABC, and now it works... Heh, I do not know what this is, but all other comboc seem to be working, but CSS... Perhaps a hint from above :lol:
Title: Bug report
Post by: Mika on December 04, 2006, 08:13:04 am
Yep, an evil masterplan  :lol:
Title: Bug report
Post by: markuz on December 04, 2006, 11:30:06 am
When I enter the address www.domain.com/snews (without trailing slash) I get 400 Bad request.
Title: Bug report
Post by: Mika on December 04, 2006, 11:47:10 am
Trailing slash issues have been solved in various topics so far and, afaik, it's included as solution in the last version of .htaccess file.
Title: Bug report
Post by: markuz on December 04, 2006, 11:59:42 am
Hmmm... this is my .htaccess file. I guess this is the latest?
Quote

    php_value session.use_trans_sid 0

RewriteEngine On
RewriteBase /snews
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ index.php?category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+) index.php?category=$1&title=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+)/([^/]+)/ index.php?category=$1&title=$2&commentspage=$3 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9_-]+)/([0-9]+)/ index.php?category=$1 articlespage=$2 [L]
Title: Bug report
Post by: brauck on December 04, 2006, 09:16:15 pm
Mika, the table categories was corrupt; I should have seen that by myself (stupid). Sorry  :/

And with a cat named CSS is nothing wrong; storm in a tea-cup, yeak!  :mad:
Title: Bug report
Post by: Patric Ahlqvist on December 05, 2006, 07:51:50 am
Brauck, in what way was it corrupt ?
Title: Bug report
Post by: brauck on December 05, 2006, 12:22:43 pm
Quote from: Patric
Brauck, in what way was it corrupt ?
Just like Mika suggested; id was not set as primary key and not auto_increment. That messed up the table's of course. How the column 'id' get corrupted I really don't know. Something must have gone wrong during testing, because the id of the first couple of categories I created where OK.

I did a clean db installation this morning and tried to simulate the error again, but everything went OK, including the 3 letters categories. So, it's a bit of a mystery.   :rolleyes:
Title: Bug report
Post by: Patric Ahlqvist on December 05, 2006, 12:56:03 pm
Mhm... Well I've also made a clean table set install, and everything works wonders apart from one thing:

extra category problem
Sorted out. I dare not even say what caused this, you'll think I'm an idiot... well, in that case :lol:

You know I've been doing a couple templates with some kind of "wide mode" to it when clicking eg articles, that was due to this snippet:
Quote
"contact" AND $_GET['action'] == "") {?>
Some div


"contact" AND $_GET['action'] == "") {?>




   
         




"contact" AND $_GET['action'] == "") {?>
Some div
So I removed that shit, and the extra functions was visible again, duh :lol: I should have an idiots credit for discovering it myself though, although it took a while, erhm...
Title: Bug report
Post by: Zucye on December 06, 2006, 09:46:38 pm
I dont' know if this qualifies as a bug, but is bugging me.

Why can't I change the Website Title??

Also under the same section there is an space to change "Home SEF (used as link to Home)" I am not sure what that is, but whatever I write there, nothing changes.  Likewise with the "Website Title".

Code: [Select]
Admin  >> Site - Settings >> Settings >>

Website Title: (try to change it to "Test", but sNews is still the official title)

Home SEF (used as link to Home):  I don't know what "SEF" stands for, but try to change it to "Inicio" (which means starting point) and I don't see anything different
Title: Bug report
Post by: Mika on December 06, 2006, 11:15:55 pm
Z, one thing crossed my mind regarding your title issue (http://www.solucija.com/forum/viewtopic.php?id=2330) - please re-check your db, namely, "settings" table;
- id must be int(8) auto_increment primary
- value has a length of 80 characters, is it enough for your title?
- try to edit those values manually and see what happens