error:
Fatal error: Call to undefined method InstallerModelUpdate::getDisabledUpdateSites() in /home/.../domains/.../public_html/administrator/components/com_installer/controllers/update.php on line 93
Looks like your update went wrong. as the method exists and we can't reproduce your issue.
Labels |
Added:
?
|
Category | ⇒ | Updating |
Status | New | ⇒ | Information Required |
Moving to Information required
until we get feedback by @farhadst. If he can fix the issue by reset the files.
ok
instalation
templates
folder also.You can also use the Extensions
> Extension Manager
to install the latest Joomla! package - it works if upload_max_filesize
and post_max_size
(in php.ini
) are set correctly (Joomla! package is ~11MB, so you'll need a value of 16M
for both of them to be on the safe side).
@zero-24 i think u speaking about specific file, in first post i say replace admin folder and important folder but it doesn't work! :)
I guess you have also to restore/replace the libraries folder.
But the savest way i think is to replace all files as maybe also other files are not updated because of a wrong update ;)
@OctavianC i have install latest joomla package as extension manager but problem dosen't fix!
The model was found. Otherwise error message would be another.
So download file
/administrator/components/com_installer/models/update.php
open in editor and search for
public function getDisabledUpdateSites()
(line 148)
I have seen this before, and the answer is somewhat the only remaining logical conclusion,
-- the desire model file is never loaded, and it was not loaded because:
using:
JTable::getInstance('update');
-- does not guarantee that the correct file will be loaded (please take a look at the getInstance function),
instead if some other extensions has already loaded any file like
/any_extension/models/update.php
then the using: JTable::getInstance('update');
will not load any new file
If i remember correctly, this can be with doing this:
JTable::getInstance('update', $prefix='InstallerModel');
thus forcing getInstance() to load and use the correct file
I forgot to say that the /any_extension/models/update.php,
could have been loaded by a system plugin already
Are you talking model or table classes at this point? Those are two totally different things loaded in different ways.
I am guessing by looking at code, and by having possilbly the same problem in the past,
i will try to make a test run to see if it is the same case as i had experienced before, when 2 extensions tried load a model file:
//models/item.php
and the second one had failed because it used:
JTable::getInstance('item');
but by the words of 'farhadst',
Calling JTable::getInstance()
doesn't load a model class, it loads a table class. That's where I'm getting confused by your comments; you're referring to file paths that would load model classes and your JTable::getInstance('update', $prefix='InstallerModel');
line is a bad example where you're specifying a model class name while trying to load a JTable object.
If you're trying to load JTableUpdate
, then JTable::getInstance('update');
is just fine as the second param defaults to JTable
in that method. If you're trying to load InstallerModelUpdate
, then you should be calling JModelLegacy::getInstance('Update', 'InstallerModel');
and you pretty much need to specify both parameters unless you're in the context of a controller class.
@mbabker
yes you are right,
i tested,
this is called exactly:
JModelLegacy::getInstance('Update', 'InstallerModel');
so the problem must be that some 3rd party extension has already loaded a custom class file
that contains class: InstallerModelUpdate
because in this case JModelLegacy::getInstance will not try to load a file again,
and that can also explain why the function does not exist
@farhadst if you're still having issues, can you please edit administrator/components/com_installer/controllers/update.php
and just after the following lines:
// Find updates.
/** @var InstallerModelUpdate $model */
$model = $this->getModel('update');
Add the following:
$class = new ReflectionClass($model);
var_dump($class->getName());
var_dump($class->getFileName());
die();
Let me know what messages are showing up now after you click the Find Updates
button.
@OctavianC i have replace following code after this line $model = $this->getModel('update');
and this not work
@mbabker i found all update.php and rename but problem not fix
And what message are you getting now? If you're not seeing a different message (there should be some strings there instead of the Fatal Error), I'm guessing you have some PHP Code caching module on your server and it's still using the old update.php file.
Fatal error: Call to undefined method InstallerModelUpdate::getDisabledUpdateSites() in /home/.../domains/.../public_html/administrator/components/com_installer/controllers/update.php on line 96
It's still the same error - this means that the code I've supplied is not run. Either it's PHP Caching or you have added it to the wrong function ($model = $this->getModel('update');
appears in multiple lines, that's why I added the three lines so you can better identify it).
yes, i have replace code in wrong line
i get this error after correct:
public_html/plugins/system/egoltupdate/update-j3.php
and when rename this file (update-j3.php) get this error:
Warning: require_once(public_html/plugins/system/egoltupdate/update-j3.php): failed to open stream: No such file or directory in public_html/plugins/system/egoltupdate/egoltupdate.php on line 26 Fatal error: require_once(): Failed opening required 'public_html/plugins/system/egoltupdate/update-j3.php' (include_path='.:/usr/local/php5/lib/php') in /public_html/plugins/system/egoltupdate/egoltupdate.php on line 26
There you have it - you have a System Plugin that's loading a different model. You'll have to disable the plugin "Egolt Update" for this to work... you can also contact the plugin's developers and let them know about this. They'll probably need to rename some files or classes in their plugin to fix this.
Now that we can see that this is an extension and not the core of joomla (great detective work) I am closing this here
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-05-12 11:30:40 |
Closed_By | ⇒ | brianteeman |
i have disable plugin and get this error now
string(20) "InstallerModelUpdate" string(106) "public_html/administrator/components/com_installer/models/update.php"
Revert the changes you did to the update.php
file. Good luck! This issue has been resolved.
@OctavianC
after disable plugin, i have delete 3 line code
$class = new ReflectionClass($model);
var_dump($class->getName());
var_dump($class->getFileName());
die();
and error fix
thanks :)
Hello,
It's about the new method of getDisabledUpdateSites in Joomla! 3.X version which break the Egolt Update Plugin. We've solved the problem:
http://www.egolt.com/blog/256-important-update-on-all-products
Just download again and install the new version of your extension.
Thanks for the bug reporting.
Go to
System
>Global Configuration
, click on theServer
tab and setError Reporting
toDevelopment
. Save you new config and re-test theFind Updates
button. There should be an error message showing now.