Jump to content

V5.08 - 5.1.3 How to fix all the broken admin & front end JS stuff


Guest
 Share

Recommended Posts

Many have noticed that all kinds of things are now broken on both the front end and especially in the store's admin sections. Unfortunately, this came at the same time as the release of 5.1.3 so many people have incorrectly assumed the issue is with CubeCart. It's not specifically. The jQuery team last week released V1.8.0 of the wildly popular JavaScript framework....unfortunately, they changed some things we didn't realize they were going to change. This matters because the code we have in ALL store skins pulls the latest jQuery version from Google's content delivery network (CDN). We do this because many (if not most) computers will have this file cached on their systems already and we don't have to send it with a page request. This makes the overall page load feel quicker for your customers and is an overall good practice. The fix for your store is to force it to use the latest jQuery 1.7 file instead of the new 1.8. We'll be working to address the differences between them and make it work with the latest, but until that time, this is the best remedy.

TL/DR: Patch two files with the following to fix stuff.

In the both of the following files, you need to modify one line each:

/js/common.html -- Line 2

/admin/skins/default/templates/main.php -- Line 91

Replace this:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>



with this:




<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>

The only thing changing is the addition of the '.7' after the 1. This forces Google to send you the latest jQuery 1.7 file.

We're sorry this has been such a pain for people, but it was wholly unexpected by us. Thanks!

:w00t:

Link to comment
Share on other sites

Not sure this completly fixes it.

I had the problem with no order inventories after the weekend and Al fixed it via a support ticket but it reoccured again yesterday evening. I've checked the /admin/skins/default/templates/main.php file and it is already changed to 1.7 so I guess that was the change made by the support team to fix it when it originally occured. It's now set to 1.7 and I'm still having problems with orders being received where only the latest one shows any order inventory. As soon as a new order comes it the inventory of the previous order becomes blank.

Link to comment
Share on other sites

Having read various threads I made these changes and it does seem to have cleared a few problems up.

At the bottom of both the admin pages and the store pages I now get a blueish grey box with script in, similar to this:

PHP:

No Errors or Warnings

GET:

'_g' => 'orders'

'action' => 'edit'

'order_id' => '120816-062047-2201'

SESSION:

'__client' =>

'ip_address' => '86.138.74.23'

'useragent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1'

'session_start' => 1345195482

'session_last' => 1345195491

'currency' => 'GBP'

'admin_id' => '1'

'__system' =>

'token' => 'fad1386a8121a76cdb18a6841c1ee47b'

'__admin_data' =>

'admin_id' => '1'

'name' => 'Seddon And Black'

'username' => 'seddonandblack'

'email' => '[email protected]'

'logins' => '1059'

'super_user' => '1'

'notes' => 'This user was setup during installation.'

'browser' => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1'

'ip_address' => '86.138.74.23'

'failLevel' => '0'

'blockTime' => '0'

'lastTime' => '1345195410'

'customer_id' => '0'

'status' => '1'

This is only half of it.

Obviously I've done something wrong somewhere. Can someone advise what that may be and a possible solution? It doesn't look very good on the homepage etc!

Thanks in advance.

Joe
Link to comment
Share on other sites

Steaming North: You'll get quicker responses if you make your own thread for each issue, but I can solve this one for you: That's the debug information. You need to go to Store Settings > Advanced and set "Enable Debugging" to 'disabled'. I'm not sure what could have turned this on in the first place, so you may want to add your own IP address to the box beneath it. That way if it gets re-enabled, only people with your IP will be able to see it.

Sir William: thank you for the info!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...