Jump to content
WebFlake
  • 0

Rss latest files feed error


SceneFile

Question

I've upgraded to latest ipb 4.1.6.1 and I have the problem that on my downloads section when clicking the latest files rss feed, I get a PHP error. 

It redirects to the path: http://mywebsiteurl.com/files.xml (not using my real url) with the error

Fatal error: Class 'IPS\Xml\Rss' not found in /home/senaxxps4/public_html/applications/downloads/modules/front/downloads/browse.php on line 153

While this is the original file out of the updated release and also the themes are not modified. Anyone familiar how to fix this?

 

 

Edited by SceneFile
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 1
5 minutes ago, SceneFile said:

I see the reference to the class, but I don't see the class defined. But this could be done in a different file. 

Please see above for a reply I made.

Quote

I think there is a IPS bug on this.

As I have the same, nothing uploaded clicking on it gives the error.

Possible because of nulled but not sure.

 

VAEfvMI.png

Liked what i posted remember to feed me a cookie ->
Or you can add a cookie to myCookieJar

Link to comment
Share on other sites

  • 1
1 minute ago, SceneFile said:

Ah so this is currently a bug with the nulled release? If you have the same then it might be because of the nulled release. A buddy of mine has: http://www.playstationhax.it/forum/files.xml and works perfectly on latest version (non-nulled). 

As I said i belive its due a nulled release :)

  • Upvote 1

VAEfvMI.png

Liked what i posted remember to feed me a cookie ->
Or you can add a cookie to myCookieJar

Link to comment
Share on other sites

  • 0
20 minutes ago, SceneFile said:

I've upgraded to latest ipb 4.1.6.1 and I have the problem that on my downloads section when clicking the latest files rss feed, I get a PHP error. 

It redirects to the path: http://mywebsiteurl.com/files.xml (not using my real url) with the error

Fatal error: Class 'IPS\Xml\Rss' not found in /home/senaxxps4/public_html/applications/downloads/modules/front/downloads/browse.php on line 153

While this is the original file out of the updated release and also the themes are not modified. Anyone familiar how to fix this?

 

 

Hi SceneFile.

Have you tried edit the RSS feed in AdminCP directly after a upgrade ? Just to see if this grabs any effect.

VAEfvMI.png

Liked what i posted remember to feed me a cookie ->
Or you can add a cookie to myCookieJar

Link to comment
Share on other sites

  • 0
3 minutes ago, Cookie Monster said:

Hi SceneFile.

Have you tried edit the RSS feed in AdminCP directly after a upgrade ? Just to see if this grabs any effect.

Thanks for taking time to answer. But yeah, I forgot to mention that in my opening post. I've tried to disable, Save, and enable it again, with no luck. I've also checked the error log and system log but there is nothing registered. 

Link to comment
Share on other sites

  • 0

Can you post me the content of your file located

 /home/senaxxps4/public_html/applications/downloads/modules/front/downloads/browse.php

Please use the code tag when posting this (its the <>)

I think there is a IPS bug on this.

As I have the same, nothing uploaded clicking on it gives the error.

Possible because of nulled but not sure.

VAEfvMI.png

Liked what i posted remember to feed me a cookie ->
Or you can add a cookie to myCookieJar

Link to comment
Share on other sites

  • 0
<?php
/**
 * @brief		Browse Files Controller
 * @author		<a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
 * @copyright	(c) 2001 - SVN_YYYY Invision Power Services, Inc.
 * @license		http://www.invisionpower.com/legal/standards/
 * @package		IPS Social Suite
 * @subpackage	Downloads
 * @since		08 Oct 2013
 * @version		SVN_VERSION_NUMBER
 */

namespace IPS\downloads\modules\front\downloads;

/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
	header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
	exit;
}

/**
 * Browse Files
 */
class _browse extends \IPS\Dispatcher\Controller
{
	/**
	 * Route
	 *
	 * @return	void
	 */
	protected function manage()
	{
		if ( isset( \IPS\Request::i()->currency ) and in_array( \IPS\Request::i()->currency, \IPS\nexus\Money::currencies() ) and isset( \IPS\Request::i()->csrfKey ) and \IPS\Request::i()->csrfKey === \IPS\Session\Front::i()->csrfKey )
		{
			$_SESSION['currency'] = \IPS\Request::i()->currency;
		}
		
		if ( isset( \IPS\Request::i()->id ) )
		{
			try
			{
				$this->_category( \IPS\downloads\Category::loadAndCheckPerms( \IPS\Request::i()->id, 'read' ) );
			}
			catch ( \OutOfRangeException $e )
			{
				\IPS\Output::i()->error( 'node_error', '2D175/1', 404, '' );
			}
		}
		else
		{
			$this->_index();
		}
	}
	
	/**
	 * Show Index
	 *
	 * @return	void
	 */
	protected function _index()
	{
		/* Add RSS feed */
		if ( \IPS\Settings::i()->idm_rss )
		{
			\IPS\Output::i()->rssFeeds['idm_rss_title'] = \IPS\Http\Url::internal( 'app=downloads&module=downloads&controller=browse&do=rss', 'front', 'downloads_rss' );
		}
		
		/* Get stuff */
		$featured = iterator_to_array( \IPS\downloads\File::featured( 4, '_rand' ) );
		$new = \IPS\downloads\File::getItemsWithPermission( array(), NULL, 14 );
		$highestRated = \IPS\downloads\File::getItemsWithPermission( array( array( 'file_rating > ?', 0 ) ), 'file_rating DESC, file_reviews DESC', 14 );
		$mostDownloaded = \IPS\downloads\File::getItemsWithPermission( array( array( 'file_downloads > ?', 0 ) ), 'file_downloads DESC', 14 );
		
		/* Online User Location */
		\IPS\Session::i()->setLocation( \IPS\Http\Url::internal( 'app=downloads', 'front', 'downloads' ), array(), 'loc_downloads_browsing' );
		
		/* Display */
		\IPS\Output::i()->sidebar['contextual'] = \IPS\Theme::i()->getTemplate( 'browse' )->indexSidebar( \IPS\downloads\Category::canOnAny('add') );
		\IPS\Output::i()->title		= \IPS\Member::loggedIn()->language()->addToStack('downloads');
		\IPS\Output::i()->output	= \IPS\Theme::i()->getTemplate( 'browse' )->index( $featured, $new, $highestRated, $mostDownloaded );
	}
	
	/**
	 * Show Category
	 *
	 * @param	\IPS\downloads\Category	$category	The category to show
	 * @return	void
	 */
	protected function _category( $category )
	{
		$_count = \IPS\downloads\File::getItemsWithPermission( array( array( \IPS\downloads\File::$databasePrefix . \IPS\downloads\File::$databaseColumnMap['container'] . '=?', $category->_id ) ), NULL, 1, 'read', NULL, 0, NULL, FALSE, FALSE, FALSE, TRUE );

		if( !$_count )
		{
			/* Show a 'no files' template if there's nothing to display */
			$table = \IPS\Theme::i()->getTemplate( 'browse' )->noFiles( $category );
		}
		else
		{
			/* Build table */
			$table = new \IPS\Helpers\Table\Content( 'IPS\downloads\File', $category->url(), NULL, $category );
			$table->classes = array( 'ipsDataList_large' );
			
			if ( \IPS\Application::appIsEnabled( 'nexus' ) and \IPS\Settings::i()->idm_nexus_on )
			{
				$table->filters = array(
					'file_free'	=> "( ( file_cost='' OR file_cost IS NULL ) AND ( file_nexus='' OR file_nexus IS NULL ) )",
					'file_paid'	=> "( file_cost<>'' OR file_nexus>0 )",
				);
			}
			$table->title = \IPS\Member::loggedIn()->language()->pluralize(  \IPS\Member::loggedIn()->language()->get('download_file_count'), array( $_count ) );
		}

		/* Online User Location */
		$permissions = $category->permissions();
		\IPS\Session::i()->setLocation( $category->url(), explode( ",", $permissions['perm_view'] ), 'loc_downloads_viewing_category', array( "downloads_category_{$category->id}" => TRUE ) );
				
		/* Output */
		\IPS\Output::i()->title		= $category->_title;

		\IPS\Output::i()->contextualSearchOptions[ \IPS\Member::loggedIn()->language()->addToStack( 'search_contextual_item', FALSE, array( 'sprintf' => array( \IPS\Member::loggedIn()->language()->addToStack( 'category' ) ) ) ) ] = array( 'type' => 'downloads_file', 'nodes' => $category->_id );
		\IPS\Output::i()->sidebar['contextual'] = \IPS\Theme::i()->getTemplate( 'browse' )->indexSidebar( \IPS\downloads\Category::canOnAny('add'), $category );
		\IPS\Output::i()->output	= \IPS\Theme::i()->getTemplate( 'browse' )->category( $category, (string) $table );
	}

	/**
	 * Show a category listing
	 *
	 * @return	void
	 */
	protected function categories()
	{
		/* Online User Location */
		\IPS\Session::i()->setLocation( \IPS\Http\Url::internal( 'app=downloads&module=downloads&controller=browse&do=categories', 'front', 'downloads_categories' ), array(), 'loc_downloads_browsing_categories' );
		
		\IPS\Output::i()->title		= \IPS\Member::loggedIn()->language()->addToStack('__app_downloads');
		\IPS\Output::i()->output	= \IPS\Theme::i()->getTemplate( 'browse' )->categories();
	}
	
	/**
	 * Latest Files RSS
	 *
	 * @return	void
	 */
	protected function rss()
	{
		if( !\IPS\Settings::i()->idm_rss )
		{
			\IPS\Output::i()->error( 'rss_offline', '2D175/2', 403, 'rss_offline_admin' );
		}

		$document = \IPS\Xml\Rss::newDocument( \IPS\Http\Url::internal( 'app=downloads&module=downloads&controller=browse', 'front', 'downloads' ), \IPS\Member::loggedIn()->language()->get('idm_rss_title'), \IPS\Member::loggedIn()->language()->get('idm_rss_title') );
		
		foreach ( \IPS\downloads\File::getItemsWithPermission() as $file )
		{
			$document->addItem( $file->name, $file->url(), $file->desc, \IPS\DateTime::ts( $file->updated ), $file->id );
		}
		
		/* @note application/rss+xml is not a registered IANA mime-type so we need to stick with text/xml for RSS */
		\IPS\Output::i()->sendOutput( $document->asXML(), 200, 'text/xml' );
	}
}

I see the reference to the class, but I don't see the class defined. But this could be done in a different file. 

Link to comment
Share on other sites

  • 0
34 minutes ago, Cookie Monster said:

I think there is a IPS bug on this.

As I have the same, nothing uploaded clicking on it gives the error.

Possible because of nulled but not sure.

Ah so this is currently a bug with the nulled release? If you have the same then it might be because of the nulled release. A buddy of mine has: http://www.playstationhax.it/forum/files.xml and works perfectly on latest version (non-nulled). 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...