Keyword

JModel vs K2Model - fatal error

More
11 years 11 months ago - 11 years 11 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.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
11 years 11 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
11 years 11 months ago - 11 years 11 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
11 years 8 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
10 years 7 months ago - 10 years 7 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
10 years 7 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.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum