Keyword

k2.backend.js issue in frontend

  • Elisabetta
  • Elisabetta's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 weeks ago #165181 by Elisabetta
k2.backend.js issue in frontend was created by Elisabetta
Hello to everyone and sorry if I have not been able to find the solution.

I have a problem by inserting an article via frontend.
The tabs above do not work and in fact, in console I see this error:
Uncaught TypeError: Cannot read property 'noConflict' of undefined
at k2.backend.js

at this line:
var $K2 = $.noConflict();

I've also tried disabling "JCH Optimize" and "jQuery Easy".
but the error remains.
Any suggestions?

Thank you,
Elisabetta

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 weeks ago #165183 by Krikor Boghossian
Replied by Krikor Boghossian on topic k2.backend.js issue in frontend
Hello Elisabetta,

jQuery is not being loaded in your site.
Is it enabled in K2's parameters?

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

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

  • Elisabetta
  • Elisabetta's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 weeks ago - 7 years 2 weeks ago #165188 by Elisabetta
Replied by Elisabetta on topic k2.backend.js issue in frontend
Hi and thanks for reply.
My site loads jquery from Joomla framework while it is disabled in k2.
This is not a new site, exists since 2012 and has always worked. something changed after I updated Joomla and K2 a few months ago. Unfortunately I didn't have time to look at the problem right away.
However, thanks to your suggestion, I noticed that something changes in the popup that opens in front end to insert the article.
In the head doesn't load the same things that are on the pages:
like this google.load ("jquery", "1.6.1");
Can this help?
Thanks again

EDIT: I think the change is due to itemform.php that now points to the backend file in Administrator and so it is out of the frontend theme, isn't it?
Last edit: 7 years 2 weeks ago by Elisabetta.

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

More
7 years 2 weeks ago #165189 by JoomlaWorks
Replied by JoomlaWorks on topic k2.backend.js issue in frontend
Indeed that file has been updated to reflect the UI changes in the backend. If you had simply copied the file from /components/com_k2/templates without changing its content, simply delete the file itemform.php that exists inside YOUR template.

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

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

  • Elisabetta
  • Elisabetta's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 weeks ago #165192 by Elisabetta
Replied by Elisabetta on topic k2.backend.js issue in frontend
Hi I have already tried (I've removed all k2 override) but the result does not change even allowing it to load the original file.
As I wrote, I see that the popup loses some lines of code in the head (probably also something jquery)

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 weeks ago #165199 by Krikor Boghossian
Replied by Krikor Boghossian on topic k2.backend.js issue in frontend
Which jQuery version is currently being loaded?
Is it loaded before all other scripts?

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

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

  • Elisabetta
  • Elisabetta's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 weeks ago #165229 by Elisabetta
Replied by Elisabetta on topic k2.backend.js issue in frontend
Hi, thanks for replay.

Here is what I have at this time on this popup:
imgur.com/a/4h1WC

while the frontend side is different: I've jQuery 1.12.4
It works all properly, even jquery and without console errors

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 weeks ago #165254 by Krikor Boghossian
Replied by Krikor Boghossian on topic k2.backend.js issue in frontend
It is normal not to load the entire site in the popup since a lot of the content is not needed.
Strange enough, the order is correct.
JQuery before all other scripts etc..

Can you try replacing that line with:
var $K2 = jQuery.noConflict();

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

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

  • Elisabetta
  • Elisabetta's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 weeks ago #165272 by Elisabetta
Replied by Elisabetta on topic k2.backend.js issue in frontend
Thanks Krikor.
Ok, at least something change ...
I'm attaching the screenshot
imgur.com/f709a9Y

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 1 week ago #165288 by Krikor Boghossian
Replied by Krikor Boghossian on topic k2.backend.js issue in frontend
Yes, this means that the script is being executed.
Which version of Joomla! are you using, and can you share a screenshot of the order that the scripts are being loaded?

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