Keyword

Cannot save or edit from frontend NOR backend

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 10 months ago #121490 by Yiota
Could you check through your Browser's Console if you are getting any errors while in the edit form of the item?

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

  • Jennifer de Spain
  • Jennifer de Spain's Avatar Topic Author
  • Offline
  • New Member
More
10 years 10 months ago - 10 years 10 months ago #121491 by Jennifer de Spain
Replied by Jennifer de Spain on topic Re: Cannot save or edit from frontend NOR backend
I checked. There are some errors, but some of them are in the k2 javascript file. Here are screenshots:

Before the edit modal -



During edit -


None of the files that have these errors are files I uploaded. This is what I am using in my index.php:
Log in  or Create an account to join the conversation.

More
10 years 10 months ago #121492 by Odin Mayland
Replied by Odin Mayland on topic Re: Cannot save or edit from frontend NOR backend
I also can not edit items from the frontend.

Has anyone resolved this?

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

More
10 years 10 months ago - 10 years 10 months ago #121493 by Lefteris
@modernmagic

Please view my question to you in order to find the issue here:
getk2.org/community/New-to-K2-Ask-here-first/167218-Members-cant-save-items-from-frontend

@Jennifer de Spain

Your page definitely loads more than one jQuery libraries which is the reason you are getting the jQuery not defined error mostly.
Check through the Network tab of the inspector and see the all .js files that are loading and in what order.

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

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

  • Jennifer de Spain
  • Jennifer de Spain's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #121494 by Jennifer de Spain
Replied by Jennifer de Spain on topic Re: Cannot save or edit from frontend NOR backend
Hello! Sorry for the late reply! The last couple weeks were insane!

Here is a screenshot of the network inspector with a list of all the js files.

Before Clicking the Edit Button:


After clicking the Edit Button:


Thank you!

Jennifer

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #121495 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Cannot save or edit from frontend NOR backend
Hello Jeniffer

Can you send me a screenshot of the editing frame's source code?
You can also c/p the script ordering.

jQuery has to load before all other K2 scripts.

It is imporant to view the iframe's scripts since they might differ from the rest of 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.

More
10 years 9 months ago - 10 years 9 months ago #121496 by Nikos
Hello Jennifer

kunle wrote: K2 v2.6.2
Php 5.3.10
MySQL 5.5.20
Joomla 2.5.8

I'm currently building a site offline using wampserver so after installing K2 I noticed neither 'Save & Close' nor 'Save & New' buttons worked in back-end.

Then in the JS error console (using firefox browser) I noticed these errors:

Get ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js

X ReferenceError: jQuery is not defined

Get ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js

X TypeError: $K2 is not a function

Since the system is not connected to internet I guessed the 'http' header for 'googleapis' might be the cause so here's what I did that fixed it:

Navagated to K2 Parameter i.e.
Parameters > Layouts & Views > CSS & JavaScript Settings > Backend jQuery & jQuery UI handling

By default it was set to 'Load a remote copy of jQuery & UI' so I switched this to 'Load a local copy of jQuery & UI' then saved the settings. Now the 'Save & Close' and 'Save & New' buttons works fine.

Went back to JS error console (using firefox browser) refreshed the screen and
'X ReferenceError: jQuery is not defined' and
'X TypeError: $K2 is not a function' errors are not shown anymore.

As soon as my site is developed & put on a hosting server I shall switch back to 'Load a remoted copy of jQuery UI to see If the error will return.


Have you tried this solution?

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

  • Jennifer de Spain
  • Jennifer de Spain's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #121497 by Jennifer de Spain
Replied by Jennifer de Spain on topic Re: Cannot save or edit from frontend NOR backend
Hello,

Thank you for your patience. Holidays are quite demanding!

Here is the script list in the source code on the page with the edit modal:
Log in  or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #121498 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Cannot save or edit from frontend NOR backend
<script src="/components/com_k2/js/k2.js?v2.6.8&amp;sitepath=/" type="text/javascript"></script>

should load after the jQuery script. If not the scripts won't function properly.

If your template does not have a setting for this you can try an extension called jQuery Easy.

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

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