Keyword

K2Model Error - Still

  • GBpilot Man
  • GBpilot Man's Avatar Topic Author
  • Offline
  • New Member
More
7 years 8 months ago - 7 years 8 months ago #157156 by GBpilot Man
K2Model Error - Still was created by GBpilot Man
Edit 1 8/22/2016: Additional information.

I created a new install of Joomla and the o1nly item I installed was the JCE Editor. When I installed K2 it went to a screen and gave me a com_k2 error and I could not go to any other place in the administrator. I renamed the /plugins/system/k2 directory and could then get back into the administrator. When I check the install I see this error. So what is going on here? I've heard a lot about K2 and coming from another big CMS it appears like it will give me much of the functionality of that CMS but i can not get installed.

Warning

ERROR: operator does not exist: ` character varying LINE 1: SELECT id FROM #__modules WHERE `module` = 'mod_k2_quick... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.SQL=SELECT id FROM #__modules WHERE `module` = 'mod_k2_quickicons'

Original:

I am running Joomla 3.6.2 and attempted to install K2 latest version 2.7.1 from the Extensions-?Mange->update menu. K2 appeared to install but when I refreshed the site I got a 500 error and the Apache err_log shows this error.

"Class K2Model not found in /home/.....public_html/plugins/system/k2/k2.php on line 430."

I have only JCE and the Akeeba Backup installed, no other plugins or extensions installed. I can get the site back up by removing the plugins/system/k2 directory and I see com_k2 entries in the component menu and the K2 modules are installed.

From what research I did this seems to be a common issue but I found no solutions ,just suggestions but none work.

Note that I can not access either my Joomla administrator pages or the site until I delete the K2 directory. I then go in and clean out all the K2 stuff. I've tried reinstalling but get the same issue.

After I delete the k2 directory I can get back to the Extensions install page and I see this error.

ERROR: operator does not exist: ` character varying LINE 1: SELECT id FROM #__modules WHERE `module` = 'mod_k2_quick... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.SQL=SELECT id FROM #__modules WHERE `module` = 'mod_k2_quickicons'

If I try and uninstall everything uninstalls except com_k2 and I get this error.

JFolder: :delete: Path is not a folder. Path: /home/l1049hoadmin/public_html/administrator/components/com_k2
JFolder: :delete: Path is not a folder. Path: /home/l1049hoadmin/public_html/components/com_k2
Component Uninstall: Can't uninstall. Please remove manually.

If I create the directories it then gives me this

JInstaller: :Install: Can't find XML setup file.
Component Uninstall: Can't uninstall. Please remove manually.

So first how do I clean it out of my system and get rid of the com_k2 that's left. I've reinstalled and renamed the plugin k2 directory which lets me get back into the admin for the site. As soon as I rename the plugin k2 directory I cannot use my site. If i rename it again I can uninstall all of K2 but the com_k2. Even if I rename the directory back the com_k2 uninstall complains about no XML file but it's there. There is a com_k2 mod listed in the database table extensions and I could delete it from there.

Second, how do I get it to install without taking the site offline?

Thanks.
Last edit: 7 years 8 months ago by GBpilot Man.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 8 months ago #157180 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2Model Error - Still
Please try the following:

a) Clear Joomla!'s /tmp folder
b) Manually remove the /components/com_k2 and administrator/components/com_k2 folders as well as K2's modules located in the /modules folder.
c) Remove all K2's db tables (if there are any). K2's tables are easily indentified by the #__k2_xxx prefix.
d) Now your site will be healthy and you will have a restore point.

Download K2 from getk2.org/downloads/?f=K2_v2.7.1.zip and upload it to your site.

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

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

  • GBpilot Man
  • GBpilot Man's Avatar Topic Author
  • Offline
  • New Member
More
7 years 8 months ago #157199 by GBpilot Man
Replied by GBpilot Man on topic K2Model Error - Still
I will give it a try soon.

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

  • GBpilot Man
  • GBpilot Man's Avatar Topic Author
  • Offline
  • New Member
More
7 years 8 months ago #157200 by GBpilot Man
Replied by GBpilot Man on topic K2Model Error - Still
What about the plugins folder k2 stuff? I've renamed the directory so I could access the site.

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

  • GBpilot Man
  • GBpilot Man's Avatar Topic Author
  • Offline
  • New Member
More
7 years 8 months ago #157201 by GBpilot Man
Replied by GBpilot Man on topic K2Model Error - Still

Krikor wrote: Please try the following:

a) Clear Joomla!'s /tmp folder
b) Manually remove the /components/com_k2 and administrator/components/com_k2 folders as well as K2's modules located in the /modules folder.
c) Remove all K2's db tables (if there are any). K2's tables are easily indentified by the #__k2_xxx prefix.
d) Now your site will be healthy and you will have a restore point.

Download K2 from getk2.org/downloads/?f=K2_v2.7.1.zip and upload it to your site.


a) Joomla /tmp had only a index.html in it. Left that
b) No k2 items in /components or /administrator/components but /plugins/system had a k2 folder that I renamed.
c) Done - found stuff for comments, etc. Deleted via pgAdminIII (I run postgreSQL)

Downloaded from the link.

Uploaded and installed. I got the same issue - Clas K2Model not found and I can not go off this error page until I delete the plugins/system/k2 directory.

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

  • GBpilot Man
  • GBpilot Man's Avatar Topic Author
  • Offline
  • New Member
More
7 years 8 months ago - 7 years 8 months ago #157203 by GBpilot Man
Replied by GBpilot Man on topic K2Model Error - Still

Krikor wrote: Please try the following:

a) Clear Joomla!'s /tmp folder
b) Manually remove the /components/com_k2 and administrator/components/com_k2 folders as well as K2's modules located in the /modules folder.
c) Remove all K2's db tables (if there are any). K2's tables are easily indentified by the #__k2_xxx prefix.
d) Now your site will be healthy and you will have a restore point.

Download K2 from getk2.org/downloads/?f=K2_v2.7.1.zip and upload it to your site.


a) Joomla /tmp had only a index.html in it. Left that
b) No k2 items in /components or /administrator/components but /plugins/system had a k2 folder that I renamed.
c) Deleted all via pgadmin3 (I use PostgreSQL)

Downloaded from the link.

Uploaded and installed. I got the same issue - Class K2Model not found and I can not go off this error page until I delete the plugins/system/k2 directory.. I repeated the procedure twice and still get the error. The only thing that gets installed, apart from the database entries is plugins/system/k2 directory with an xml and php file.

To get my site available again I delete plugins/system/k2 directory and then I find this error on the control panel.. Not sure what #_modlules is supposed to be unless it's supposed to be the prefix for the tables.l My prefix is joomla so shouldn't that be joomla_modules instead of #_modules?

ERROR: operator does not exist: ` character varying LINE 1: SELECT id FROM #__modules WHERE `module` = 'mod_k2_quick... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.SQL=SELECT id FROM #__modules WHERE `module` = 'mod_k2_quickicons'

Edit: it appears K2 does something in it's query that PostgreSQL does not like. I can't be the only one using PostgreSQL which works fine with Joomla. I found some references to this. but not knowing what K2 is trying to do I can't fix it. From what I've read many implicit casts were removed in 8.3. PostgreSQL production is now 9.5.

blog.ioguix.net/postgresql/2010/12/11/Problems-and-workaround-recreating-casts-with-8.3+.html - creates some functions.
petereisentraut.blogspot.com/2008/03/readding-implicit-casts-in-postgresql.html - check the link to the sql function which has some casts created.

After more research it appears that #__ is supposed to be replace by joomla_ (my prefix for tables) but it's not doing it. The error references making a cast but since I'm not familiar with your code and use of the database I can go no further. The reference to creating a cast is probably PostgreSQL's best guess at how to fix it. Something else is going wrong with K2 and the database. I checked the postgresql driver in Joomla and it handles replacing the prefix properly (it incorporates a bug fix that was in earlier sqlsrv drivers.).

I'd love to use K2 but it appears there is an issue with it and PostgreSQL.
Last edit: 7 years 8 months ago by GBpilot Man.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 8 months ago #157212 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2Model Error - Still
No harm in manually removing all folders.

Under the following folders you will K2's plugins
/plugins/system
/plugins/user
/plugins/k2

Furthermore you need to make sure that the path to your /log and /tmp folder are correct and your site has proper file/ folder permissions.
They should be 644/755.

If any of these settings is wrong, then you won't be able to properly install any extensions.

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

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

  • GBpilot Man
  • GBpilot Man's Avatar Topic Author
  • Offline
  • New Member
More
7 years 8 months ago #157231 by GBpilot Man
Replied by GBpilot Man on topic K2Model Error - Still

Krikor wrote: No harm in manually removing all folders.

Under the following folders you will K2's plugins
/plugins/system
/plugins/user
/plugins/k2

Furthermore you need to make sure that the path to your /log and /tmp folder are correct and your site has proper file/ folder permissions.
They should be 644/755.

If any of these settings is wrong, then you won't be able to properly install any extensions.


I replied by email but.

There were also one under compents and administrator/components.

Permissions are 755/755 and I've installed JCE and Social Square without problems. These permissions are a little more permissive and I'm checking with cPanel to get what they want them at (I think it will be 644/755).

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 8 months ago #157235 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2Model Error - Still

I've installed JCE and Social Square without problems.


This means that it was a temporary hiccup and not a general Joomla! issue.

Now you can try installing Admin Tools which will help you solve the permissions issue.

Furthermore if an installation fails midway (server hiccup, connectivity issues, etc) you need to perform this cleanup in order to keep your site healthy.

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

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

  • GBpilot Man
  • GBpilot Man's Avatar Topic Author
  • Offline
  • New Member
More
7 years 8 months ago #157258 by GBpilot Man
Replied by GBpilot Man on topic K2Model Error - Still

Krikor wrote:

I've installed JCE and Social Square without problems.


This means that it was a temporary hiccup and not a general Joomla! issue.

Now you can try installing Admin Tools which will help you solve the permissions issue.

Furthermore if an installation fails midway (server hiccup, connectivity issues, etc) you need to perform this cleanup in order to keep your site healthy.


What is this admin tools? I really don't believe I have permission issues unless it's something that only k2 is affected by. The other extensions install correctly without issue. I really don't want to start installing other modules as bandaids.

I'm sure it's not server disconnects as the site runs well and other extensions install without issue. I've installed both by downloading via web and uploading the zip file which takes out the server disconnect possibility because the file ends up on the server correctly, then I hit install.

I'm concerned about the database message which tells me that it's looking for something it can't find.

Is there a link for the cleanup procedure? In an earlier email you said to go through the database and remove any records with k2. I've done that several times and the install still fails. I end up with only a plugins/system/k2 directory and a bunch of menu entries.

I appreciate your help but can we escalate this ticket as it seems something strange is going on here.

Thanks.

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


Powered by Kunena Forum