Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Pages: [1] 2 3

Author Topic: [STICKY] Bug report  (Read 19693 times)

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
[STICKY] Bug report
« on: October 30, 2006, 07:34:28 PM »

Content Editor

when I press the BR button, it puts in a
 tag -- this is good and working

When I press the Break button, it puts in tags which doesn't do anything, even if I wrap it around content.

When I manually place in [break] I get the original article break and read more etc
Logged
Of all the things I have lost, it is my mind that I miss the most.

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
[STICKY] Bug report
« Reply #1 on: October 31, 2006, 08:01:03 AM »

Quick fix
Find this code inside function js() [snews.php file] and add the blue part:
Quote
// JAVASCRIPT FUNCTIONS
function js() { ?>
...
...
// basic html textarea editor
function tag(tag) {
var src = document.getElementById("txt");
if(tag == 'break') {start = "[break]"; end = "";}
else if(tag == 'br') {start = ""; end = "
";}
...
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
[STICKY] Bug report
« Reply #2 on: November 01, 2006, 02:31:40 AM »

Settings not saving.
admin>site>settings>contents>

 'Display Pagination on articles' checkbox does not update.
Logged
Of all the things I have lost, it is my mind that I miss the most.

Armen

  • Sr. Member
  • ****
  • Karma: 41
  • Posts: 338
    • http://www.funnydays.ru
[STICKY] Bug report
« Reply #3 on: November 01, 2006, 07:09:35 AM »

-------  1  -------

Here's a big one:

When from "Admin" -> "Settings" I changed "Home SEF" from "page" to "pages"
settings were saved successfully. But then I tried to get the
"http://site.com/pages/some_page/" nothing displays! Not even "Nothing here yet" string.

Even when from Admin Panel I select "View Pages" and then click "View"
on any of existing ones nothing happens, the page just refreshes itself,
not viewing the desired page.

Then I returned to "Admin" and changed the SEF back to "page" and... Everything works...

ADDED: I guess you can't use "pages",  "articles", "sitemap", for the home SEF, because when I changed it to, for example "pagez", everything worked fine.

The same in RC2. Just checked. RC1's got that too.

-------  2  -------

After changing smth in "Admin" -> "Settings" the page does not refresh itself after applying changes.

-------  3  -------

Guys, I know that timed self.updatePreview() is a unique feature of sNews, but it kills me!
Even if I change the timer to 5 seconds, after the refresh "CTRL+Z" does not work!
RC1, RC2, RC3... I think everyone needs to be able to UNDO smth, but this JS Refresh solution...

Why don't implment sevir's OnClick preview solution? I've tried it for myself and it's just great!
You click the preview when you NEED it! And "CTRL+Z" works (unless you press the preview
button, of course).

The solution is here: sevir's OnClick

I think it's time to call self.updatePreview() a bug. Just because it's not rational at all. It's a serious issue.
Logged
Now ogres, oh, they're much worse. They'll make a suit from your freshly peeled skin. They'll shave your liver, squeeze the jelly from your eyes... Actually, it's quite good on toast.

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
[STICKY] Bug report
« Reply #4 on: November 01, 2006, 08:59:22 AM »

settings checkboxes malfunction and page refresh issue fix:

find this inside function processing() and add the blue line
Quote
function processing() {
...
case 'save_settings':
...
...
notification('','','');
echo '';
}
break;
case 'changeup':
...
I don't have any problems with self update preview javascript behaviour, and my ctrl+z works quite fine (that's the reason why I cannot find your error)
Quote
function startPreview() {window.self.setInterval("updatePreview()", 1000);}
but you're probably right about that - let's wait for Luka to wake up and decide on that, okay?

[thanks to Sevir for a different solution :) ]
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

Armen

  • Sr. Member
  • ****
  • Karma: 41
  • Posts: 338
    • http://www.funnydays.ru
[STICKY] Bug report
« Reply #5 on: November 01, 2006, 09:27:38 AM »

Thank you, Mika.

I, personally, use Opera to browse the Internet, but when using IE, UNDO doesn't work after preview auto-refresh.

Now let's wait for Luka =)
Logged
Now ogres, oh, they're much worse. They'll make a suit from your freshly peeled skin. They'll shave your liver, squeeze the jelly from your eyes... Actually, it's quite good on toast.

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
[STICKY] Bug report
« Reply #6 on: November 01, 2006, 10:11:13 AM »

page refreshes when saved, but still doesn't seem to update the " Display Pagination on articles" field.

Much fiddling, and recall that the previous RC had the previous field do the same, so...
in
function processing()  below  case 'save_settings':
Quote
This
$display_pagination = $_POST['display_pagination'] == 'on' ? 'True' : '';

becomes

$display_pagination = $_POST['display_pagination'] ;
now it works!!
Logged
Of all the things I have lost, it is my mind that I miss the most.

Armen

  • Sr. Member
  • ****
  • Karma: 41
  • Posts: 338
    • http://www.funnydays.ru
[STICKY] Bug report
« Reply #7 on: November 01, 2006, 10:33:53 AM »

... or you can find this string

Code: [Select]
html_input('checkbox', 'display_pagination', 'dpag', '', l('a_display_pagination'), '', '', '', '', (s('display_pagination') == 'on' ? 'ok' : ''), '', '', '', '', '');and replace it with:

Code: [Select]
html_input('checkbox', 'display_pagination', 'dpag', '', l('a_display_pagination'), '', '', '', '', (s('display_pagination') == 'True' ? 'ok' : ''), '', '', '', '', '');But philmoz' way is better, I think =) Voia cleaning!
Logged
Now ogres, oh, they're much worse. They'll make a suit from your freshly peeled skin. They'll shave your liver, squeeze the jelly from your eyes... Actually, it's quite good on toast.

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
[STICKY] Bug report
« Reply #8 on: November 01, 2006, 12:21:49 PM »

yes, that extra code philmoz found was leftover from my testing and should be removed
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
[STICKY] Bug report
« Reply #9 on: November 03, 2006, 10:12:14 AM »

Category without  a world published article still shows category name in listing if an article is assigned for future publishing in that category.
Which means, if you are launching a new category tomorrow, and have 1 or more articles assigned to that category, but set to be auto published tomorrow, the category name is published on the site, but without any content.

need to make sure that the category is not listed until at least one article is published.

In // DISPLAY CATEGORIES need to change
Quote
$calc_num_query = "SELECT * FROM ".db('prefix')."articles WHERE position = 1 AND category = $r[id] ";
by adding the blue part.
Quote
$calc_num_query = "SELECT * FROM ".db('prefix')."articles WHERE position = 1 AND category = $r[id] AND published = 1";
Logged
Of all the things I have lost, it is my mind that I miss the most.

Elvino

  • Newbie
  • *
  • Karma: 0
  • Posts: 44
    • http://www.elvino.it/
[STICKY] Bug report
« Reply #10 on: November 03, 2006, 05:12:34 PM »

No localization title article in admin.
change line 1138 :
Code: [Select]
html_input('text', 'title', 'at', $frm_title, 'Title', '', 'onchange="genSEF(this,document.forms[\'post\'].seftitle)"', 'onkeyup="genSEF(this,document.forms[\'post\'].seftitle)"', '', '', '', '', '', '', '');with
Code: [Select]
html_input('text', 'title', 'at', $frm_title, l('title'), '', 'onchange="genSEF(this,document.forms[\'post\'].seftitle)"', 'onkeyup="genSEF(this,document.forms[\'post\'].seftitle)"', '', '', '', '', '', '', '');

Elvino

  • Newbie
  • *
  • Karma: 0
  • Posts: 44
    • http://www.elvino.it/
[STICKY] Bug report
« Reply #11 on: November 03, 2006, 05:26:24 PM »

Contact form and comment form is not xhtml 1 strict standards compliance

line 682 - 696 :
Code: [Select]
// CONTACT FORM
function contact() {
if ($_POST['contactform'] == '') {
echo '

'.l('contact').'

';
html_input('form', '', 'post', '', '', '', '', '', '', '', '', '', 'post', db('website'), '');
html_input('text', 'name', 'name', '', '* '.l('name'), 'text', '', '', '', '', '', '', '', '', '');
html_input('text', 'email', 'email', '', '* '.l('email'), 'text', '', '', '', '', '', '', '', '', '');
html_input('text', 'weblink', 'weblink', '', l('url'), 'text', '', '', '', '', '', '', '', '', '');
html_input('textarea', 'message', 'message', '', '* '.l('message'), '', '', '', '', '', '5', '5', '', '', '');
echo '

';
html_input('hidden', 'ip', 'ip', $_SERVER['REMOTE_ADDR'], '', '', '', '', '', '', '', '', '', '', '');
html_input('hidden', 'time', 'time', time(), '', '', '', '', '', '', '', '', '', '', '');
html_input('submit', 'contactform', 'contactform', l('submit'), '', '', '', '', '', '', '', '', '', '', '');
echo '

';
}
change with:
Code: [Select]
// CONTACT FORM
function contact() {
if ($_POST['contactform'] == '') {
echo '

'.l('contact').'

';
html_input('form', '', 'post', '', '', '', '', '', '', '', '', '', 'post', db('website'), '');
html_input('text', 'name', 'name', '', '* '.l('name'), 'text', '', '', '', '', '', '', '', '', '');
html_input('text', 'email', 'email', '', '* '.l('email'), 'text', '', '', '', '', '', '', '', '', '');
html_input('text', 'weblink', 'weblink', '', l('url'), 'text', '', '', '', '', '', '', '', '', '');
     echo '

';
html_input('textarea', 'message', 'message', '', '* '.l('message'), '', '', '', '', '', '5', '5', '', '', '');
     echo '

';
html_input('hidden', 'ip', 'ip', $_SERVER['REMOTE_ADDR'], '', '', '', '', '', '', '', '', '', '', '');
html_input('hidden', 'time', 'time', time(), '', '', '', '', '', '', '', '', '', '', '');
html_input('submit', 'contactform', 'contactform', l('submit'), '', '', '', '', '', '', '', '', '', '', '');
echo '

';
}
equal modification for comment form

Elvino

  • Newbie
  • *
  • Karma: 0
  • Posts: 44
    • http://www.elvino.it/
[STICKY] Bug report
« Reply #12 on: November 03, 2006, 06:03:24 PM »

other bugs

in the text of the mail contacts sent from the page are the tag



from "Admin" -> "Settings" :

dont change title website and meta tag description if the phrases within the form are equal.

dont change the article number for page, if the number of articles for page is equal to the number of articles RSS


I would add various title them for the pages contacts, site map, archive...  :P

Armen

  • Sr. Member
  • ****
  • Karma: 41
  • Posts: 338
    • http://www.funnydays.ru
[STICKY] Bug report
« Reply #13 on: November 03, 2006, 06:33:23 PM »

Bravo, Elvino!

You've really dug up sNews thoroughly!
Logged
Now ogres, oh, they're much worse. They'll make a suit from your freshly peeled skin. They'll shave your liver, squeeze the jelly from your eyes... Actually, it's quite good on toast.

Luka

  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 36
  • Posts: 1716
    • http://www.snewscms.com
[STICKY] Bug report
« Reply #14 on: November 03, 2006, 09:00:07 PM »

Thanks for the report, I'm watching this thread to correct the bugs.
Logged
Pages: [1] 2 3