jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => Bugs => Topic started by: ColinM on 13.07.2015 14:07:30

Title: most_recently_downloaded module Error - [Fixed in 3.2.35!!!]
Post by: ColinM on 13.07.2015 14:07:30
most_recently_downloaded module Error

This error occurs on first loading of Most_Recently_Downloaded module if another jD module such as  jDownloads Latest or jDownloads Top has not been loaded before it.

Fatal error: Call to a member function setState() on a non-object in <mysite>/modules/mod_jdownloads_most_recently_downloaded/helper.php on line 32
Lines 31 and 32 are:
       // Set application parameters in model
       $logs_model->setState('params', $appParams);
---------------------------------------------------------------------------------------------
Also line 44 in mod_jdownloads_most_recently_downloaded.php looks incorrect
Present Code is
$cat_id          = trim($params->get( 'cat_id' ) );
Think this should be something like
$cat_id          = $params->get( 'cat_id', array() );

$cat_id then has the actual ids of the selected categories or zero if none selected.
-------------------------------------------------------------------------------------

last_downloaded_files module should be removed if it exists!!

Colin
Title: Re: most_recently_downloaded module Error - [Fixed in 3.2.35!!!]
Post by: Arno on 18.07.2015 11:56:27
Hi Colin,
Quotelast_downloaded_files module should be removed if it exists!
this module was not published, so i think only you can have this. ;)

QuoteFatal error: Call to a member function setState() on a non-object in <mysite>/modules/mod_jdownloads_most_recently_downloaded/helper.php on line 32
Fixed!
Quote$cat_id = trim($params->get( 'cat_id' ) );
Fixed!