It is currently Thu Aug 28, 2008 7:54 pm

[FIXED] - Content Finish Publishing & not authorized

Moderators: dam-man, willebil, tcp, Development

[FIXED] - Content Finish Publishing & not authorized

Postby fonny on Sat Oct 29, 2005 10:15 am

Take a newsitem and set publishing date as finished. Newsitems is no longer visible. OK sofar.

Go to the frontpage and select a Read More ... link on a newsitem.
Navigate till you arrive at the unpublished item. You now get the message :

You are not authorized to view this resource.
You need to login.

This is a longstanding bug since *4.5.1

Fonny
Last edited by Jinx on Thu Nov 24, 2005 12:16 am, edited 1 time in total.
User avatar
fonny
Joomla! Intern
Joomla! Intern
 
Posts: 78
Joined: Fri Aug 26, 2005 8:27 am
Location: Westerlo

Re: Content Finish Publishing & not authorized

Postby fonny on Sat Oct 29, 2005 11:35 am

Got it.

In components/com_content/content.php near line 1057 add twice  '. $xwhere' to the sql query.

// loads the links for Next & Previous Button
if ( $params->get( 'item_navigation' ) ) {
$query = "SELECT a.id"
. "\n FROM #__content AS a"
. "\n WHERE a.catid = $row->catid"
. "\n AND a.state = $row->state"
. "\n AND ordering < $row->ordering"
. ($access->canEdit ? '' : "\n AND a.access <= $gid" )
. $xwhere
. "\n ORDER BY a.ordering DESC"
. "\n LIMIT 1"
;
$database->setQuery( $query );
$row->prev = $database->loadResult();

$query = "SELECT a.id"
. "\n FROM #__content AS a"
. "\n WHERE a.catid = $row->catid"
. "\n AND a.state = $row->state"
. "\n AND ordering > $row->ordering"
. ($access->canEdit ? '' : "\n AND a.access <= $gid" )
. $xwhere
. "\n ORDER BY a.ordering"
. "\n LIMIT 1"
;

fonny
User avatar
fonny
Joomla! Intern
Joomla! Intern
 
Posts: 78
Joined: Fri Aug 26, 2005 8:27 am
Location: Westerlo

Re: [UNDER REVIEW] - Content Finish Publishing & not authorized

Postby deep12s on Wed Nov 23, 2005 3:05 pm

Thanks, works great!  :D
deep12s
Joomla! Apprentice
Joomla! Apprentice
 
Posts: 34
Joined: Thu Aug 25, 2005 6:54 pm

Re: [UNDER REVIEW] - Content Finish Publishing & not authorized

Postby Jinx on Thu Nov 24, 2005 12:15 am

Thanks ! I have made the change on SVN for bot 1.0 and 1.1
Johan Janssens - Lead developer
'Making good things happen'
http://www.nooku.org - content translation system for Joomla! 1.5
http://www.joomlatools.org - training, consulting and extension development
User avatar
Jinx
Joomla! Champion
Joomla! Champion
 
Posts: 6714
Joined: Fri Aug 12, 2005 12:47 am


Return to Q&T 1.5.x Resolved

Who is online

Users browsing this forum: No registered users and 2 guests