Keyword

Javascript error

  • Tina Valencia
  • Tina Valencia's Avatar Topic Author
  • Offline
  • New Member
More
9 years 2 days ago #147834 by Tina Valencia
Javascript error was created by Tina Valencia
Hi,

I have an error at the edit form in frontend:

Uncaught TypeError: $K2('#extraFieldsContainer select').chosen({ is not a function

This is causing some problems saving new items and I don't know how to solve this.

Does anybody know the cause of this?


I'm using Joomla! 3.3.6, K2 2.6.8, and Jomsocial 4.0.8


Thank you!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 days ago #147853 by Krikor Boghossian
Replied by Krikor Boghossian on topic Javascript error
Hello Tina,

Please update to K2 2.6.9. Also by default the chosen library is not used in the front-end. Can you try with a different template?

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

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

  • Tina Valencia
  • Tina Valencia's Avatar Topic Author
  • Offline
  • New Member
More
9 years 2 days ago #147861 by Tina Valencia
Replied by Tina Valencia on topic Javascript error
Hi Krikor,

Thanks for your response.

The update have solved the error but now I have another one:

Uncaught TypeError: Cannot read property 'removeEvents' of null
parent.$('sbox-overlay').removeEvents('click');


I need this template because it integrates jomsocial + k2.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 days ago #147867 by Krikor Boghossian
Replied by Krikor Boghossian on topic Javascript error
Replace the line indicated in the error and the next one, with the 4 highlighted lines here: (line 528 so you have to scoll down)
github.com/joomlaworks/k2/blob/master/media/k2/assets/js/k2.js#L528-L533

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

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

  • Tina Valencia
  • Tina Valencia's Avatar Topic Author
  • Offline
  • New Member
More
9 years 1 day ago - 9 years 1 day ago #147894 by Tina Valencia
Replied by Tina Valencia on topic Javascript error
Hi Krikor, thanks for your help.

I have changed the lines you told me and then the first error has returned:
$K2('#extraFieldsContainer select').chosen({
.chosen is not a function

This is at line 188.
Last edit: 9 years 1 day ago by Tina Valencia.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 day ago #147899 by Krikor Boghossian
Replied by Krikor Boghossian on topic Javascript error
In the stock K2 files, there is no reference to chosen.
Which file is producing the error?

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

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

  • Tina Valencia
  • Tina Valencia's Avatar Topic Author
  • Offline
  • New Member
More
9 years 1 day ago - 9 years 1 day ago #147902 by Tina Valencia
Replied by Tina Valencia on topic Javascript error
Hi Krikor,

I'm not sure. I'm going crazy looking for that file. Here I send you a screenshot, maybe you can help me.

It seems like is itemform.php file which is using .chosen function, but I can't find it.

Last edit: 9 years 1 day ago by Tina Valencia.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 day ago #147908 by Krikor Boghossian
Replied by Krikor Boghossian on topic Javascript error
I can see code which belongs to 3rd party K2 plugins so this was not developed by us.

Try commenting out lines 171 - 174.

Since this is not something we developed, you should address this issue to the template's developer.

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