Fatal error: Call to a member function registerEvent() on a

Need help with the Administration of your Joomla! 2.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
chacomesp
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jun 16, 2011 9:31 am

Fatal error: Call to a member function registerEvent() on a

Post by chacomesp » Thu Jun 16, 2011 9:37 am

Hello,
I need help urgently. Suddlenly my website www.ccel.zobyhost.com has prompted this error:

Fatal error: Call to a member function registerEvent() on a non-object in /home/vol9/zobyhost.com/zoby_8075797/htdocs/plugins/content/pdf_embed15/pdf_embed15.php on line 3
and an advert pop-up comes out.

What can I do to wiew again my site??!!!

thank you for you help!!!

My joomla version is 1.6.3

User avatar
OOmNezar
Joomla! Ace
Joomla! Ace
Posts: 1870
Joined: Mon Sep 07, 2009 3:18 am

Re: Fatal error: Call to a member function registerEvent() o

Post by OOmNezar » Thu Jun 16, 2011 10:00 am

What is the script in that line.
Make sure that plugin pdf_embed15 compatible with Joomla 1.6 NATIVE
Disable that plugin, what happen ?
coffee & smoke just fine
OOm Nezar

chacomesp
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jun 16, 2011 9:31 am

Re: Fatal error: Call to a member function registerEvent() o

Post by chacomesp » Thu Jun 16, 2011 10:18 am

When I tried to desactivate the plugin in my administration panel suddely the ad pop-ups comes out and I get the same message. When I go back I get again into the administration page and the plugin is still activated, which means that my action has not been taken into account.

Where can I wee the script?? so I can tell you what it says.

chacomesp
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jun 16, 2011 9:31 am

Re: Fatal error: Call to a member function registerEvent() o

Post by chacomesp » Thu Jun 16, 2011 10:20 am

I found the pdf scrip:

<?php
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );
$mainframe->registerEvent( 'onPrepareContent', 'plgContentpdfembed' );

function plgContentpdfembed( &$row, &$params, $page=0 ) {

// expression to search for
$regex = "#{pdf[\=|\s]?(.+)}#s";
$regex1 = '/{(pdf=)\s*(.*?)}/i';

// find all instances of mambot and put in $matches
preg_match_all( $regex1, $row->text, $matches );

// Number of mambots
$count = count( $matches[0] );

for ($i=0; $i<$count; $i++) {
$r = str_replace( '{pdf=', '', $matches[0][$i]);
$r = str_replace( '}', '', $r);
$ex = explode('|',$r);

$ploc = $ex[0];
$w = $ex[1];
$h = $ex[2];

$replace = plg_pdfembed_replacer($ploc , $w, $h );
$row->text = str_replace( '{pdf='.$ex[0].'|'.$ex[1].'|'.$ex[2].'}', $replace, $row->text);
}
return true;
}

function plg_pdfembed_replacer($ploc , $w, $h ) {

return '<embed src="'.$ploc.'" width="'.$w.'" height="'.$h.'"/>';
}
?>

User avatar
alikon
Joomla! Champion
Joomla! Champion
Posts: 5941
Joined: Fri Aug 19, 2005 10:46 am
Location: Roma
Contact:

Re: Fatal error: Call to a member function registerEvent() o

Post by alikon » Thu Jun 16, 2011 10:25 am

that plugin code is not j1.6 compatible

Code: Select all

$mainframe->registerEvent( 'onPrepareContent', 'plgContentpdfembed' );
Nicola Galgano
i know that i don't know
www.alikonweb.it

chacomesp
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jun 16, 2011 9:31 am

Re: Fatal error: Call to a member function registerEvent() o

Post by chacomesp » Thu Jun 16, 2011 10:29 am

ok, so what should I do now to get my page working again normally?

User avatar
alikon
Joomla! Champion
Joomla! Champion
Posts: 5941
Joined: Fri Aug 19, 2005 10:46 am
Location: Roma
Contact:

Re: Fatal error: Call to a member function registerEvent() o

Post by alikon » Thu Jun 16, 2011 6:36 pm

unistall or disable it
Nicola Galgano
i know that i don't know
www.alikonweb.it

chacomesp
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jun 16, 2011 9:31 am

Re: Fatal error: Call to a member function registerEvent() o

Post by chacomesp » Mon Jun 20, 2011 8:20 am

what do you mean exactly uninstall or disable it?
the whole site? just the pdfmodule?

chacomesp
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jun 16, 2011 9:31 am

Re: Fatal error: Call to a member function registerEvent() o

Post by chacomesp » Mon Jun 20, 2011 8:47 am

PROBLEM SOLVED!!!!!!!!!!!!
I deleted the whole pdfplugin folder in my data folder in the Control Panel of the hosting service.
Now the page is again working perfeclty.

thanks all for your help.

bhavin88
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Jan 04, 2011 9:40 am

Re: Fatal error: Call to a member function registerEvent() o

Post by bhavin88 » Tue Nov 15, 2011 5:56 am

I am developing plugin for 1.7 compatible. I used
$mainframe->registerEvent( 'onContentPrepare', 'plgTesthello' );
and getting same error. If registerEvent() is not compatible with 1.6 or 1.7 then what i have to do to resolve it ?

User avatar
alikon
Joomla! Champion
Joomla! Champion
Posts: 5941
Joined: Fri Aug 19, 2005 10:46 am
Location: Roma
Contact:

Re: Fatal error: Call to a member function registerEvent() o

Post by alikon » Wed Nov 16, 2011 5:47 pm

should be

Code: Select all

$app = JFactory::getApplication();
$app->registerEvent( 'onVerify', 'plgVerify' );
Nicola Galgano
i know that i don't know
www.alikonweb.it

Technogroupe
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Jun 04, 2012 3:34 pm

Re: Fatal error: Call to a member function registerEvent() o

Post by Technogroupe » Mon Jun 04, 2012 11:38 pm

Thanks Chacomesp,

After hours, your answer solved my problem....Delete the plugin folder !


Locked

Return to “Administration Joomla! 2.5”