sNews 1.7 (current stable version) > Patches/fixes

PATCHES - Admin's Extra VIEW links for 'ALL' and 'Page Only'


UPDATE: The patches published here on April 13, 2010 caused more complications than they were worth so they have been replaced with a simpler solution. This simpler patch has been included in the current Official sNews 1.7 Download as since the end of May, 2010.

The Problem:

We recently discovered a bug in the Administration panel for the default sNews 1.7 package.
When we click the VIEW link for an Extra assigned to 'ALL' or 'PAGES' groups, we get an "Error 404" page - because the link is missing a category sef title in the URL. This does not occur with Extras assigned to 'Uncategorized' or those assigned to other categories and sub-categories.

The quickest way to fix this is to remove the VIEW link altogether for extras listed within the 'ALL' or 'PAGES' groups.

Search your snews.php file - deep down in the // ARTICLES - ADMIN LIST function - for these strings:

--- Code: ---<?php

echo '<p>'.$order_input.'<strong title="'.date(s('date_format'), strtotime($r['date'])).'">
'.$r['title'].'</strong> '.l('divider').'
<a href="'._SITE.$row['seftitle'].'/'.$r['seftitle'].'/">'.l('view').'</a> ';


--- End code ---

and replace them with the following (excluding the php-tags):

--- Code: ---<?php

echo '<p>'.$order_input.'<strong title="'.date(s('date_format'), strtotime($r['date'])).'">
'.$r['title'].'</strong> ';


--- End code ---

Why did we remove the VIEW link for these 2 extras groups?
I did manage to make them work properly but doing so required far too many modifications to make it work.
It also required some changes to the way extras were handled in drop-down choices.
During the testing period, those changes were found to cause greater confusion for those users who were already used to handling the way they are now.


[0] Message Index

Go to full version