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.

Author Topic: [Partial fix] page/article/extra originally entered without title  (Read 3314 times)

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly

Updated 14-aug-2007
bug report (1.6)
http://snewscms.com/forum/index.php?topic=4826
more info (from 1.5 forum)
http://snewscms.com/forum/index.php?topic=4796
This post will alter as a better option arises
This is caused by snews failing to apply a position to an item after an erroneous entry was made, and then failing to test and display an unpositioned item.

Partial fix only will at the very least, display as an unpublished item.
However, depending on the type of article, the publish option may still not be available.

Multiple re-edits will rectify, and prevent the need to  delve into the db with phpmyadmin.
(not satisfactory, but the article will not 'disappear into the ether')

Alter the following line in admin_articles
Code: [Select]
case 'article_view': $title = l('articles'); $subquery = "WHERE position = 1 "; break;to
Code: [Select]
case 'article_view': $title = l('articles'); $subquery = "WHERE position < 2 AND position >-1 "; break;A second alteration is also recommended. [from ruimendes]
You need to add, red text in form_articles function
Quote
Find
$edit_option = substr($r['position'], 0, 1);

and add red text
$edit_option = substr($r['position'], 0, 1) > 0 ? substr($r['position'], 0, 1) : 1;
« Last Edit: August 21, 2007, 09:17:36 pm by Phil Martin »
Logged
Of all the things I have lost, it is my mind that I miss the most.