Fatal error: Call to a member function get() (Joomla 1.5.11)

This forum is for reporting bugs in Joomla!. Please don't report problems with extensions in here.
Forum rules
Forum Rules
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
nithinalex
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Jun 04, 2009 9:18 am
Location: India

Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by nithinalex » Thu Jun 04, 2009 9:44 am

After upgrading from Joomla 1.5.10 to 1.5.11 .. I am getting this error when trying to access "Add Entry" Menu of Sobi2 Directory component :(

Fatal error: Call to a member function get() on a non-object in /........../plugins/editors/fckeditor.class.php on line 953

I checked every file of upgrade patch to revert this error and when I removed these new code from /plugins/editors-xtd/image.php ( Line no: 51-62 ), the error is not showing :eek: ???

$params =& JComponentHelper::getParams('com_media');
$ranks = array('publisher', 'editor', 'author', 'registered');
$acl = & JFactory::getACL();
for($i = 0; $i < $params->get('allowed_media_usergroup', 3); $i++)
{
$acl->addACL( 'com_media', 'popup', 'users', $ranks[$i] );
}
//Make sure the user is authorized to view this page
$user = & JFactory::getUser();
if (!$user->authorize( 'com_media', 'popup' )) {
return;
}
:pop
I tested the site... till now didn't find any other error by removing the above code... Am I doing wrong thing.. Developers of Joomla 1.5.11 plz help me......

Confused whether I have to revert the site to Joomla1.5.10 ???

nithinalex
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Jun 04, 2009 9:18 am
Location: India

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by nithinalex » Thu Jun 04, 2009 10:46 am

It is not only for FCK Editor.. getting the same error for other editor.....

User avatar
ot2sen
Joomla! Master
Joomla! Master
Posts: 10424
Joined: Thu Aug 18, 2005 9:58 am
Location: Hillerød - Denmark
Contact:

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by ot2sen » Thu Jun 04, 2009 11:18 am

Hi nithinalex,

A new parameter setting was introduced in configuration for 1.5.11, for decide users of which level can access the Media Manager.

Try having a look at Global Configuration->Tab 'System' where you in the 'Media Settings' can see a new option to set 'Minimum User Level for Media Manager'. This is default set to Author, and it looks like your example would require a minimum set to 'Registered' to work properly.

Anyway, this should not return a Fatal error when settings mean you are not allowed to access, but instead should return a meaningfull system error/notice.
This is being looked into.
Ole Bang Ottosen
Dansk frivillig Joomla! support websted - joomla.dk
OpenTranslators Core Team opentranslators.org

nithinalex
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Jun 04, 2009 9:18 am
Location: India

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by nithinalex » Thu Jun 04, 2009 1:30 pm

Thank u for the reply....

But that menu "Add Entry" of Sobi2 Directory is set for Anonymous Entries. Can I remove the above code from that image.php file.... Will it affect the stability or will create any other issues?? If so I will be forced to revert back to Old version Joomla! 1.5.10

tiraporn
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu May 11, 2006 6:06 am

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by tiraporn » Mon Jun 08, 2009 5:47 pm

We have the same problem in Docman upload file after upgrading to 1.5.11. Changing the permission in Global Config for Media Manager to Registered fix the problem for us.

Thanks for your work around.

Amenhotep
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Jan 09, 2009 5:20 pm

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by Amenhotep » Wed Jun 10, 2009 8:37 pm

Almost the same thing.

I can't edit users as it gets me this fatal error message in:

public_html/administrator/components/com_users/views/user/tmpl/form.php on line 143

kolibri
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Jun 16, 2009 9:31 am

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by kolibri » Tue Jun 16, 2009 10:39 am

Almost same thing too:

After upgrading from Joomla 1.5.10 to 1.5.11 .. I am getting this error when trying to register as new user from frontend

Fatal error: Call to a member function get() on a non-object in /........../plugins/editors/fckeditor.class.php on line 953

The error is not only with FCK Editor.. getting the similar error for other editor (Tinymce).....

The hint:

"Try having a look at Global Configuration->Tab 'System' where you in the 'Media Settings' can see a new option to set 'Minimum User Level for Media Manager'. This is default set to Author, and it looks like your example would require a minimum set to 'Registered' to work properly."

did not work. :(

So I need some help!

Do I need to downgrade to Joomla 1.5.10 ! How can I do this on easiest way?

nithinalex
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Jun 04, 2009 9:18 am
Location: India

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by nithinalex » Thu Jun 18, 2009 10:04 am

I think the Quick solution in not to downgrade :D .... but to remove the above code which set Minimum User Level for Media Manager'. I Removed the above code in my website. If u know PHP, use netbeans and search the above code which I posted before..... Rem: Try in localhost or backup site.

kolibri
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Jun 16, 2009 9:31 am

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by kolibri » Thu Jun 18, 2009 10:16 am

thanks, but I am a php dummy.

I did following to investigate and help myself:

- made a download of the live site "Joomla 1.5.11 with CB 1.2.1." and tested it local with Apache 2.0.59 environment

- the error (Registration Page doesn´t work) suprisingly did not occur in this local environment.

- to repair the live site I made a downgrade to Joomla 1.5.10. This was successful. The Registration Page works fine again now.

Thread with same topic is

http://www.joomlapolis.com/component/op ... catid,100/

suem
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Jan 31, 2008 6:33 pm

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by suem » Fri Jun 19, 2009 10:37 pm

I'm getting a similar message in the user details page in the back end:

"Fatal error: Call to a member function authorize() on a non-object in /..../administrator/components/com_users/views/user/tmpl/form.php on line 143"

I tried the downgrade method described in the link in the previous post, but it didn't solve it forthis problem, strangely enough...

Fortunately I have a backup of the way things were, but it's going to be fiddly fixing up the live site.

Several other sites have upgraded to 1.5.11 without this problem, so I'm wondering if it's related to the extensions on this particular site - but that's just JEvent...

Sue

brianmycroft
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Feb 18, 2009 2:28 pm

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by brianmycroft » Mon Jun 22, 2009 3:27 pm

Similar problem in trying to access a user in the the User Manager.
I have upgraded to Joomla 1.5.11

FATAL ERROR: Call to a member function authorize() on a non-object in /home/viva2466/public_html/administrator/components/com_users/views/user/tmpl/form.php on line 143

I can delete users but cannot change the permissions of a user

2nd POST
I placed a full compressed copy of Joomla 1.5.10 into the root directory of my website, where Joomla lives and decompressed it. Voila! I am now back to running Joomla 1.5.10 and the problem is gone.

However I am concerned because whatever security concerns 1.5.11 was designed to correct are no longer protected.

jackie7
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Jul 18, 2008 2:03 am

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by jackie7 » Tue Jun 23, 2009 6:22 pm

What has happened with this? I just upgraded and got the same error..... and did remove those lines from the image.php file and still getting the same error....... help!

User avatar
airton
Joomla! Ace
Joomla! Ace
Posts: 1369
Joined: Sun Nov 04, 2007 1:12 am
Location: Brazil
Contact:

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by airton » Tue Jun 23, 2009 6:30 pm

Hi,

Please, try to upload the full J1.5.11 install package, except the installation folder, and see if it corrects the issue. I have upgraded a number of sites so far without any issues. Sounds like something wrong with the uploading of the upgrade package.

Please, keep us informed of your findings.
Airton Torres
Joomla Bug Squad http://groups.google.com/group/joomlabugsquad
Community website - http://community.joomla.org
Unsolicited support PMs will be deleted and the user added to the foes list.

jackie7
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Jul 18, 2008 2:03 am

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by jackie7 » Tue Jun 23, 2009 7:12 pm

whew -
I was torn between reverting to 1.5.10 or taking your probably more sensible advice to do the full install, then found this link - and this did it for me, thankfully -
setting the MediaManager to Registered did not fix this -
changing the files as detailed in this link did.

Thank you to the wizard who wrote this link:
http://forum.mosets.com/showthread.php?p=42405

Next time I upgrade I'll use the full install in case that's the issue -

cmaples
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Jun 12, 2009 9:14 pm

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by cmaples » Tue Jun 23, 2009 7:36 pm

I've had this problem all day today, and I've installed 1.5.8 to 1.5.11 several times, and I've found a simple thing it's narrowed down to in my case.....the 'Add Attachments' component comes with a plugin that adds buttons to the editor....turn this plugin off, and things are good again.....dunno....Hope that helps.

EDIT:

I also should mention that all the above fixes did not help me, and that a local MAMP on MacOS test environment does not have this problem for me.
Last edited by cmaples on Tue Jun 23, 2009 8:13 pm, edited 2 times in total.

User avatar
airton
Joomla! Ace
Joomla! Ace
Posts: 1369
Joined: Sun Nov 04, 2007 1:12 am
Location: Brazil
Contact:

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by airton » Tue Jun 23, 2009 7:44 pm

Hi,

Thanks for posting the solution to this.

That thread points to another topic here in this forum about the same issue and there we can see there is a bug report in the tracker to solve this in the next release. Here's the link to the tracker item: http://joomlacode.org/gf/project/joomla ... m_id=16597

Regards,
Airton Torres
Joomla Bug Squad http://groups.google.com/group/joomlabugsquad
Community website - http://community.joomla.org
Unsolicited support PMs will be deleted and the user added to the foes list.

suem
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Jan 31, 2008 6:33 pm

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by suem » Wed Jun 24, 2009 7:56 am

I got mine fixed by
1. backing everything up
2. knocking out all the Joomla folders (because my installation has lots of stuff provided by the hosting)
3. copying all the full-package 1.5.11 files and folders
4. reinstating configuration.php
5. reinstating my template folder in templates

Maybe there's something missing from the upgrade pakage...

Sue

nithinalex
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Jun 04, 2009 9:18 am
Location: India

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by nithinalex » Mon Jul 06, 2009 6:04 am

Problem is solved in the latest Joomla version Joomla 1.5.12

User avatar
cjcrun
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Feb 11, 2007 11:58 pm
Location: Emerald Beach NSW AU
Contact:

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by cjcrun » Mon Jul 13, 2009 3:54 am

I upgraded from 1.5.10 to 1.5.12 using the upgrade package, had the same Fatal error in com_users/views/user/tmpl/form.php lie 143.

Installed the complete 1.5.12 FULL version (minus install, config and installation), users now working...but I lost editor in both instances front-end and backend.

I was previously already using Tiny MCE 3.2.something...when I upgraded, (although the plugin is enabled, tiny MCE 3.2. is default in config, and after re-saving user defaults as TinyMCE 3.2), editor still doesn't show...

FAST SOLUTION
re-installed TINY MCE 3!!!
http://groups.google.com/group/joomlabu ... ae0d?pli=1

set it to default, made it extended mode (parameters) set parameters>advanced accordingly

lga1983
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Jul 16, 2009 1:42 pm
Contact:

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by lga1983 » Thu Jul 16, 2009 1:50 pm

cjcrun wrote: FAST SOLUTION
re-installed TINY MCE 3!!!
http://groups.google.com/group/joomlabu ... ae0d?pli=1

set it to default, made it extended mode (parameters) set parameters>advanced accordingly
EXCELLENT!!!! you were a great help!!!Thank you very much :-)

mikef
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Apr 28, 2008 3:38 am

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by mikef » Tue Sep 08, 2009 5:50 pm

I finally fixed this problem by a partial reinstall:

1. Make a copy of the administrator directory at your website. IMPORTANT
2. Download 1.5.14-Stable-Full_Install.zip to your computer.
3. Unzip the file to get the complete file structure.
4. Create administrator.zip only from the administrator directory on your computer.
5. Test unzipping on your computer to be sure that the "administrator" directory is recreated on unzipping.
6. Uploade administrator.zip to your website
7. Extract administrator.zip on your website the top of your joomla install so that files are updated in the website administrator directory.

It should be fixed.

IMPORTANT
Be sure to make a copy of your administrator directory to something like administrator_old.
If you just try to replace the administrator directory completely without copying over the old files with the current ones from 1.5.14 and leaving unaffected files alone, your site will be broken. There are files in the administrator tree that have been added by components, plugins, etc. and need to remain.

User avatar
norman kaui
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 119
Joined: Sun Oct 16, 2005 2:26 am
Location: Honolulu, Hawaii
Contact:

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by norman kaui » Wed Oct 14, 2009 5:54 am

mikef wrote:I finally fixed this problem by a partial reinstall:

1. Make a copy of the administrator directory at your website. IMPORTANT
2. Download 1.5.14-Stable-Full_Install.zip to your computer.
3. Unzip the file to get the complete file structure.
4. Create administrator.zip only from the administrator directory on your computer.
5. Test unzipping on your computer to be sure that the "administrator" directory is recreated on unzipping.
6. Uploade administrator.zip to your website
7. Extract administrator.zip on your website the top of your joomla install so that files are updated in the website administrator directory.

It should be fixed.

IMPORTANT
Be sure to make a copy of your administrator directory to something like administrator_old.
If you just try to replace the administrator directory completely without copying over the old files with the current ones from 1.5.14 and leaving unaffected files alone, your site will be broken. There are files in the administrator tree that have been added by components, plugins, etc. and need to remain.
Thanks this worked! :)
Please read forum rules regarding signatures: http://forum.joomla.org/viewtopic.php?t=65

waterbarry
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Jul 22, 2009 9:45 pm

Re: Fatal error: Call to a member function get() (Joomla 1.5.11)

Post by waterbarry » Tue Oct 27, 2009 12:49 am

Thank you so much for this post... can't believe that update caused the site to crash. ;) :D

ramlaltr
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Aug 02, 2011 12:40 pm

Re: Fatal error: Call to a member function get() (Joomla 1.5

Post by ramlaltr » Tue Aug 02, 2011 12:46 pm

hi am a newbee in joomla!!!

i have the doubt in joomla how to call the sidebar functions??
anybody can help me

Reg
Ram

Kotsolis
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 192
Joined: Mon Oct 27, 2008 6:38 pm

Re: Fatal error: Call to a member function get() (Joomla 1.5

Post by Kotsolis » Tue Dec 20, 2011 8:14 pm

I need a quick solution here. Half of my site's menus don't open. They show a blank page which this error
Fatal error: Call to a member function get() on a non-object in /home/gameworl/public_html/plugins/content/gameworld.php on line 32

So gameworld.php file is this:

=====================================

<?php
defined('_JEXEC') or die('Restricted access');

jimport('joomla.plugin.plugin');

// load HighSlide
if (JRequest::getCmd('view') == 'article' || JRequest::getCmd('view') == 'Review') {
$document = JFactory::getDocument();
$document->addScript('/plugins/content/highslide/highslide-full.min.js');
$document->addScriptDeclaration('hs.graphicsDir="/plugins/content/highslide/graphics/";hs.showCredits=false; hs.allowSizeReduction=false; hs.Expander.prototype.onDrag = function() {return false;}');

$document->addStylesheet('/plugins/content/highslide/highslide.css');
}

class plgContentGameworld extends JPlugin
{

function onBeforeContentSave( &$article, $isNew ) {
$article->introtext = JString::trim($article->introtext);
if (JString::substr($article->introtext, 0, 3) == '<p>' && JString::substr($article->introtext, 0, -4) != '</p>') {
$article->introtext .= '</p>';
// remove first </p>
$article->fulltext = JString::str_ireplace('</p>', '', $article->fulltext, 1);
}
}

function onPrepareContent(&$article, &$params, $limitstart) {
// prepare comments counts
if (JRequest::getCmd('option') == 'com_content') {
$now = mktime();
// cache for 4 hours
if ($params->get('comments_time') + 14400 < $now) {
$db = JFactory::getDBO();

if (preg_match("/reviews\/([^\/]*)\/([0-9]*)-/", $article->text, $matches)) {
$query = "SELECT COUNT(`commentId`) FROM #__simplereview_comments WHERE `reviewId` = '".$matches[2]."'";
} else {
$query = "SELECT COUNT(`id`) FROM #__comment WHERE `contentid` = '".$article->id."'";
}
$db->setQuery($query);
$comments = $db->loadResult();

// update current params
$params->set('comments', (int)$comments);
$params->set('comments_time', $now);

// update original params
$attribs = new JParameter($article->attribs);
$attribs->set('comments', (int)$comments);
$attribs->set('comments_time', $now);

$query = 'UPDATE #__content SET `attribs`='.$db->quote($attribs->toString()).' WHERE id='.$article->id;
$db->setQuery($query);
$db->query();
}
}

// Add author info to Reviews
if (JRequest::getCmd('option') == 'com_simple_review' && JRequest::getCmd('view') == 'Review') {
$article->text = JString::str_ireplace("<div class='reviewContentBody'", $this->onBeforeDisplayContent($article, $params, $limitstart)."<div class='reviewContentBody'", $article->text);
}

if (JRequest::getCmd('view') == 'article' || JRequest::getCmd('view') == 'Review') {
// if ($_SERVER['REMOTE_ADDR'] == '86.57.158.98') {

if (JString::strpos($article->text, '<img ') !== false) {
preg_match_all('/<img([^>])*>/', $article->text, $matches);

if (isset($matches[0][0])) {
$replaces = array();
foreach($matches[0] as $img) {
preg_match_all('/src="([^"]*)"/', $img, $src);

$src = isset($src[1][0]) ? $src[1][0] : '';

if (/*JString::strpos($img, '[spam].com') === false
||*/
JString::strpos($img, 'authorThumb') !== false || JString::strpos($img, 'float:') !== false || JString::strpos($img, 'reviewThumbnail') !== false || JString::strpos($img, 'galleryxml') !== false || JString::strpos($img, '{sr_') !== false
) {
} else {
$replaces[$img] = '<a href="'.$src.'" class="highslide" onclick="return hs.expand(this)">'.$img.'</a>';
}
}

if (sizeof($replaces)) {
$article->text = strtr($article->text, $replaces);
}

}
}
// }
}

$article->text = strtr($article->text, array(
' PC' => ' <a href="/format/pc">PC</a>',
' Playstation 3' => ' <a href="/format/ps3">Playstation 3</a>',
' PS3' => ' <a href="/format/ps3">PS3</a>',
' Xbox 360' => ' <a href="/format/xbox360">Xbox 360</a>',
' Wii U' => ' <a href="/format/wii2">Wii U</a>',
' Wii' => ' <a href="/format/wii">Wii</a>',
' 3DS' => ' <a href="/format/3ds">3DS</a>',
' PSP' => ' <a href="/format/psp">PSP</a>',
' PS2' => ' <a href="/format/ps2">PS2</a>',
' Mac' => ' <a href="/format/mac">Mac</a>',

'(PC' => '(<a href="/format/pc">PC</a>',
'(Playstation 3' => '(<a href="/format/ps3">Playstation 3</a>',
'(PS3' => '(<a href="/format/ps3">PS3</a>',
'(Xbox 360' => '(<a href="/format/xbox360">Xbox 360</a>',
'(Wii U' => '(<a href="/format/wii2">Wii U</a>',
'(Wii' => '(<a href="/format/wii">Wii</a>',
'(3DS' => '(<a href="/format/3ds">3DS</a>',
'(PSP' => '(<a href="/format/psp">PSP</a>',
'(PS2' => '(<a href="/format/ps2">PS2</a>',
'(Mac' => '(<a href="/format/mac">Mac</a>',
));



}

function onAfterDisplayTitle(&$article, &$params, $limitstart) {
global $mainframe;

return '';
}

function onBeforeDisplayContent(&$article, &$params, $limitstart) {
global $mainframe;

// change link to review
if (JRequest::getCmd('option') !== 'com_simple_review' && isset($article->introtext) && isset($article->readmore_link) && JString::strpos($article->introtext, '>Review<') !== false) {
preg_match_all('/<a href="([^"]+)"/', $article->introtext, $review);
if (isset($review[1][0])) {
$article->readmore_link = $review[1][0];
}
}

$html = '';
$created_by = 0;

if (JRequest::getCmd('option') == 'com_content' && JRequest::getCmd('view') == 'article') {
$created_by = $article->created_by;
}

if (JRequest::getCmd('option') == 'com_simple_review' && JRequest::getCmd('view') == 'Review') {
$id = JRequest::getInt('id');
$db = JFactory::getDBO();
$query = 'SELECT createdByID FROM #__simplereview_review WHERE reviewID='.$id;
$db->setQuery($query, 0, 1);
$created_by = $db->loadResult();
}

if ($created_by) {

ob_start();

$author = JFactory::getUser($created_by);
if ($author) {
$data = $this->_getData($author->username);
if ($data) {
JFActory::getDocument()->addScriptDeclaration('
function imContact(address) {
var app = document.getElementById("objMessengerApp");
if (app.MyStatus) {
try { app.InstantMessage(address); } catch (e) {}
} else {
alert(\'Windows Live email address: \'+address);
}
return false;
}');

?>
<div class="author">
<a href="<?php echo $data['link'];?>" class="avatar"><img src="<?php echo $data['image'];?>" align="left" alt="" class="authorThumb" /></a>
<b><a href="<?php echo $data['link'];?>"><?php echo $author->name;?></a> <?php if ($data['pos']) echo '(', $data['pos'], ')';?></b>
<p><?php echo htmlspecialchars(nl2br($data['desc']), ENT_COMPAT, 'UTF-8');?></p>
<div class="aLinks">
<?php echo $data['email'] ? '<a class="aEmail" href="mailto:'.$data['email'].'">Email</a>' : null;?>
<?php echo $data['facebook'] ? '<a class="aFacebook" href="'.$data['facebook'].'" target="_blank">Facebook</a>' : null;?>
<?php echo $data['live'] ? '<a class="aLive" href="#" onclick="return imContact(\''.$data['live'].'\')" target="_blank">Windows Live</a><object classid="clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28" codetype="application/x-oleobject" id="objMessengerApp" width="0" height="0" style="position:absolute;top:-10000"></object>' : null;?>
<?php echo $data['skype'] ? '<a class="aSkype" href="callto://'.$data['skype'].'/" target="_blank">Skype</a>' : null;?>
</div>
</div>
<?php
// remove author from article's meta
$params->set('show_author', false);
}
}

?>
<div class="social">
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_counter addthis_pill_style"></a>
<div class="at300b" style="margin-left:10px;"><g:plusone expr:href='data:post.url' size='medium'/></div>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_wi ... "></script>
</div>
<?php
JFactory::getDocument()->addScript('http://apis.google.com/js/plusone.js');

$html = ob_get_contents();
ob_end_clean();
}

return $html;
}

function onAfterDisplayContent(&$article, &$params, $limitstart) {
global $mainframe;

return '';
}

function _getData($username) {
$i = 1;

while(isset($this->params->_registry['_default']['data']->{'user'.$i.'_username'})) {
if (JString::strtolower($this->params->_registry['_default']['data']->{'user'.$i.'_username'}) == JString::strtolower($username)) {
return array(
'username' => $this->params->_registry['_default']['data']->{'user'.$i.'_username'},
'email' => $this->params->_registry['_default']['data']->{'user'.$i.'_email'},
'facebook' => $this->params->_registry['_default']['data']->{'user'.$i.'_facebook'},
'live' => $this->params->_registry['_default']['data']->{'user'.$i.'_live'},
'skype' => $this->params->_registry['_default']['data']->{'user'.$i.'_skype'},
'link' => $this->params->_registry['_default']['data']->{'user'.$i.'_link'},
'image' => $this->params->_registry['_default']['data']->{'user'.$i.'_image'},
'desc' => $this->params->_registry['_default']['data']->{'user'.$i.'_desc'},
'pos' => $this->params->_registry['_default']['data']->{'user'.$i.'_pos'},
);
}
$i++;
}
return false;
}


}

=====================================

Any solution? :-\

User avatar
airton
Joomla! Ace
Joomla! Ace
Posts: 1369
Joined: Sun Nov 04, 2007 1:12 am
Location: Brazil
Contact:

Re: Fatal error: Call to a member function get() (Joomla 1.5

Post by airton » Tue Jan 10, 2012 9:49 pm

Your problem is that the $params variable being passed to the onPrepareContent() function is not an object (or is null), so the $params->get(...) statement fails with the error message.

I don't have all the files for your plugin (xml file, etc) so I'm working on a wide guess here. I'm guessing that the comments_time parameter is one of the parameters you set for the plugin, correct? If so, try changing the onPrepareContent function starting on line 27 like this. Change from:

Code: Select all

	function onPrepareContent(&$article, &$params, $limitstart) {
		// prepare comments counts
		if (JRequest::getCmd('option') == 'com_content') {	
			$now = mktime();
			// cache for 4 hours
			if ($params->get('comments_time') + 14400 < $now) {
				$db = JFactory::getDBO();
to:

Code: Select all

	function onPrepareContent(&$article, &$params, $limitstart) {
		// prepare comments counts
		if (JRequest::getCmd('option') == 'com_content') {	
			$now = mktime();

			// Get plugin info
			$plugin =& JPluginHelper::getPlugin('content', 'gameworld');

		 	$pluginParams = new JParameter( $plugin->params );

			// cache for 4 hours
			if ($pluginParams->get('comments_time') + 14400 < $now) {
				$db = JFactory::getDBO();
Again, I don't have all files from your plugin and I can't test it, so go ahead and, if it fails, just revert the changes.

Hope it helps,
Airton Torres
Joomla Bug Squad http://groups.google.com/group/joomlabugsquad
Community website - http://community.joomla.org
Unsolicited support PMs will be deleted and the user added to the foes list.


Locked

Return to “Joomla! 1.5 Bug Reporting”