Can't view Fabrik main page on backend (Fix)

Bauer

Well-Known Member
I cannot open the 'Home' page for Fabrik on the Joomla admin backend. (The sub-menu items are displayed and working, so it is easy to overlook the bug.) And I suppose this same error would be triggered when using other feed-related Fabrik code.

I reported this error months ago - and have seen 2 other posts since, also alerting to this error - all which have gotten zero responses. This error will happen for anyone using php 7.

Since Joomla 3.6 the error message (as shown below) has been added to clarify the problem (in line 641 of SimplePie.php) - but the reason for the error is still the same. (You can't pass args to the ___construct function in php v7.+).

Backtrace from fatal error 'Passing parameters to the constructor is no longer supported. Please use set_feed_url(), set_cache_location(), and set_cache_location() directly.' at /home/mydomain/public_html/libraries/vendor/simplepie/simplepie/library/SimplePie.php 641:

This function is still being included in Joomla 3.6 despite the fact that it will trigger this error if any args are passed to the function.
factory.php .\libraries\joomla - Line 369 (Function defined here)

In my Joomla project, it is only referenced in 3 places - 2 of them by Fabrik.
Name - Path
home.php .\administrator\components\com_fabrik\controllers - Line 57
home.php .\administrator\components\com_fabrik\models - Line 85
factory.php .\libraries\legacy\simplepie - Line 37

The fix is to change the line...
$rssDoc = JSimplepieFactory::getFeedParser('http://feeds.feedburner.com/fabrik', 86400);
...to...
$rssDoc = new SimplePie();
$rssDoc->set_feed_url('http://feeds.feedburner.com/fabrik');
$rssDoc->set_cache_duration(86400);
$rssDoc->init();

Another suggestion would be to move the 'Stats' tab on the Fabrik admin 'home' page (protostar template - in ./administrator/components/com_fabrik/views/home/tmpl/bootstrap.php) to the last tab. Because if anything in the Fabrik log that gets displayed in that tab has any 'messed up' html (and there's a good chance it will, mine always does) - then it will trash the javscript and freeze the remaining tabs (ie. prevent the content inside them from being displayed).
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top