Keyword

JModel vs K2Model - fatal error

  • Vio Stepanov
  • Vio  Stepanov's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #104359 by Vio Stepanov
JModel vs K2Model - fatal error was created by Vio Stepanov
joomla 1.7
k2 updated to version 2.6.0, and immediately there was an error -

Fatal error: Cannot make static method JModel::addIncludePath() non static in class K2Model in /home/pxxxxx/www/mysite.com/administrator/components/com_k2/models/model.php on line 40

in the backend, we can not act, constantly displays the indicated error, my site is dead, what to do? Help!

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #104360 by Lefteris
Replied by Lefteris on topic Re: JModel vs K2Model - fatal error
Hi. K2 only supports Joomla! 1.5, 2.5 and 3.0. Other versions of Joomla! are not supported in K2. 2.6. You should update Joomla! to 2.5 or go back to K2 2.5.7.

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #104361 by coen
Replied by coen on topic Re: JModel vs K2Model - fatal error
Same error here.
We cannot do anything!

Please help in how to reach our backoffice again
What can we do?

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #104362 by Lefteris
Replied by Lefteris on topic Re: JModel vs K2Model - fatal error
The release announcement states clearly that K2 2.6 is only compatible with Joomla! 1.5, 2.5 and 3.0 only. Try to go back to K2 2.5.7. If you have no admin access place the package contentns using FTP.

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #104363 by coen
Replied by coen on topic Re: JModel vs K2Model - fatal error
Hi, can you please give some more details how to fix this or how to get access to the backoffice? Our site is now offline and as we have no access to our backoffice we cannot deinstall the component. What should we change through FTP? We don't have K2 2.5.7.

Thanks in advance!

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #104364 by Gregwh
Replied by Gregwh on topic Re: JModel vs K2Model - fatal error

Lefteris Kavadas wrote: Hi. K2 only supports Joomla! 1.5, 2.5 and 3.0. Other versions of Joomla! are not supported in K2. 2.6. You should update Joomla! to 2.5 or go back to K2 2.5.7.


The error I get as soon as I logon to the backend is:

"Model Class cpanelModelCpanel not found in file"

....which is odd. I dont use cPanel to administer the backend of my K2 site. This error has ONLY occurred ever since I updated to the latest K2. I had updated to the latest Joomla, version 2.5.7, the week before K2 was updated.

While this error doesnt stop me administering in the backend in K2 or even in Joomla, it is a definite worry.

To the person who cannot get to the backend of their site any longer, you might contact your site hosting agent. I host my own stuff as a reseller through Hostgator. They keep automatic updates and can revert your site to an earlier version if needed. Your hosting agent may be able to do the same for you.

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #104365 by Gregwh
Replied by Gregwh on topic Re: JModel vs K2Model - fatal error

Lefteris Kavadas wrote: The release announcement states clearly that K2 2.6 is only compatible with Joomla! 1.5, 2.5 and 3.0 only. Try to go back to K2 2.5.7. If you have no admin access place the package contentns using FTP.


PS,

There was no announcement about compatibility when I updated. There was only the notice on the Joomla panel that there was an update to be had. You click on it and it says K2 and that is that. There was no notice at all.

I am using Joomla 2.5.7.

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #104366 by coen
Replied by coen on topic Re: JModel vs K2Model - fatal error
Hello,

Where can I find K2 2.5.7? Do I just need to exchange the files in the component directory?

thnx

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #104367 by Lefteris
Replied by Lefteris on topic Re: JModel vs K2Model - fatal error
For anyone using Joomla! 1.6/1.7 and getting this error the K2 2.5.7 package can be found at getk2.org/downloads/?f=K2_v2.5.7.zip

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #104368 by coen
Replied by coen on topic Re: JModel vs K2Model - fatal error
Thnx. So how to proceed? Do we need to look for the individual K2 files in the public HTML directory and replace them?

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago - 12 years 7 months ago #104369 by Lefteris
Replied by Lefteris on topic Re: JModel vs K2Model - fatal error
NOTE - This is only for Joomla! 1.6. and 1.7 users who accidentally installed K2 2.6

There are several ways but unfortuanetlly non of them is very easy. You can extract the package in your computer and then look at the files. You need to replace the 2.6. files with the files of 2.5.7 package. You are going to need FTP access to your server for this. An important thing to remember is that the plugins files need their own directory. This means for example that the file of the 2.5.7 package /plugins/system/k2.php needs to be placed at /plugins/system/k2/k2.php. Before you place the files make sure to backup in case you delete any wrong files. After finishing you will probably be able to access your administration. If so install the K2 2.5.7 again through the installer.

UPDATE: Another possible solution would probably be to just remove (or rename) the file /plugins/system/k2/k2.php. I have not tested yet but this should give you admin access again so you can install the K2 2.5.7.

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #104370 by coen
Replied by coen on topic Re: JModel vs K2Model - fatal error
Hi, renaming the file solved the whole problem. We are back online!

Ευχαριστώ!

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago - 12 years 6 months ago #104371 by AdrianK
Replied by AdrianK on topic Re: JModel vs K2Model - fatal error
Error in

administrator/components/com_k2/models/model.php ?

than you can change a line and get back to the backend

else if (version_compare(JVERSION, '2.5', 'ge'))

to

else if (version_compare(JVERSION, '2.5', 'le'))

update joomla

and alter this line back to

else if (version_compare(JVERSION, '2.5', 'ge'))

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #104372 by mc
Replied by mc on topic Re: JModel vs K2Model - fatal error

Lefteris Kavadas wrote: NOTE - This is only for Joomla! 1.6. and 1.7 users who accidentally installed K2 2.6

There are several ways but unfortuanetlly non of them is very easy. You can extract the package in your computer and then look at the files. You need to replace the 2.6. files with the files of 2.5.7 package. You are going to need FTP access to your server for this. An important thing to remember is that the plugins files need their own directory. This means for example that the file of the 2.5.7 package /plugins/system/k2.php needs to be placed at /plugins/system/k2/k2.php. Before you place the files make sure to backup in case you delete any wrong files. After finishing you will probably be able to access your administration. If so install the K2 2.5.7 again through the installer.

Hi Lefteris Kavadas,

Thank you for this solution. This helped to restore me website.
If I may make a simple suggestion... on your download page, there is just one download option. with the text "DOWNLOAD K2 for Joomla! 1.5, 2.5 & 3.0, v2.6.3 (GNU/GPL) / Released January 30th, 2013"
Most extensions for 1.5 work in 1.7, so if there is an alternate package for Joomla 1.6/1/7, why not have a second download option displayed for those users running Joomla 1.6/1/7?

So then on your K2 Doownload page, you would have:
"DOWNLOAD K2 for Joomla! 1.5, 2.5 & 3.0, v2.6.3 (GNU/GPL) / Released January 30th, 2013"
"DOWNLOAD K2 for Joomla! 1.6 & 1.7, v2.5.7 (GNU/GPL) / Released January 30th, 2011"

Just a helpful suggestion.
Thanks again for your help

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago - 11 years 3 months ago #104373 by Alexey Yaksuhin
Replied by Alexey Yaksuhin on topic Re: JModel vs K2Model - fatal error
If you think that problem is gone - no ;)
I have Joomla 2.5.18 + K2 2.5.7 + JoomSEF 4.5.1 + PHP 5.2.17
When i try to update K2 even to 2.6.0-2.6.7 - I have same error.
PHP Fatal error: Cannot make static method JModel::addIncludePath() non static in class K2Model in /home/****/*****/www/administrator/components/com_k2/models/model.php on line 0
And site go down compleatly (and back end too). Only rename of plugins/system/k2/k2.php allow me go to backend.

BUT, if i use PHP 5.3.6-13 on another hosting - than no problem, everything works fine.

So is it possible get problem only in PHP version? Or it something else?
Because
Joomla 2.5.18 + K2 2.6.7 + PHP 5.2.17 = working
Joomla 2.5.18 + K2 2.6.7 + JoomSEF 4.5.1 + PHP 5.3.6 = working
Joomla 2.5.18 + K2 2.6.7 + JoomSEF 4.5.1 + PHP 5.2.17 = site completely down

Any ideas?

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #104374 by Lefteris
Replied by Lefteris on topic Re: JModel vs K2Model - fatal error
@Alexei Yakushin

You should not get this error in K2 2.6.7. The JModel::addIncludePath() is static in Joomla! 2.5 and is also declared static in K2Model. So, something else is wrong:

1. K2 is not updating properly. Ensure that your server permissions are fine and that you can install/update extensions without problem.
2. Maybe JoomSEF is overriding some core Joomla! classes and is causing all this.

Probably it is number 2 since the same setup works without JoomSEF.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum