Jump to content

Bit of a glitch


brantics

Recommended Posts

Hi there, I have a store that using

CubeCart Version
6.0.12
PHP Version
5.4.43
MySQL Version
5.6.32-78.1-log

currently, I'm reluctant to upgrade it myself as it's had some custom work done to it but it's been erroring when it goes to the payment page. My client sent me this:

I click to go to Checkout – in theory I’m going to the screen to opt for Internet Banking or Paypal and it’s BLANK!!!
Try going back and forward again and then it’s lost your sale so you cannot do anything!
L
I’ve had the complaint I’d say 9 times in the last 10 days…..

Will upgrading it fix the problem or is it a server glitch?

image003.jpg

Link to comment
Share on other sites

Perhaps we can find the exact cause of the problem.

If this just started happening (ten days ago), then we may be able to blame your hosting company if they changed anything in the environment.

We ask that you allow CubeCart to log errors to an error_log. Work through the checkout steps until you get the blank page.

Then we should be able to focus on what to do by examining the contents of the error_log.

Link to comment
Share on other sites

I've had a look at the error log and this is a repeating error, it worked ok for me but this same error (and the only error) has come up repeatedly since early July (it's probably only just been brought to the attention of my client:

12 Jul 2016, 10:19 [Exception] /home5/louisew5/public_html/scrapaholics.co.nz/includes/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:83 - Syntax error in template "string:

Thank You {$DATA.first_name}!

)}

 

">

" - Unexpected ")"">

there are some  other errors, all from August 10th for various products. I'll check my hosts log and see if anything has been changed

10 Aug 2016, 14:36 File: [seo.class.php] Line: [621] "SELECT COUNT(id) AS Count FROM `emp_CubeCart_seo_urls` WHERE `path` = 'Aleene's Leather & Suede Glue' AND `type` = 'prod' AND `item_id` <> 10052;" - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Leather & Suede Glue' AND `type` = 'prod' AND `item_id` <> 10052' at line 1

I'm with bluehost and can't find anything regarding any upgrades they've done

 

Link to comment
Share on other sites

Ok, let's work on the first error. This error is being generated at the point in the checkout process where CubeCart wants to email the admins that a new order has been created. It is a known error and has been fixed in CC610+.

In admin, Email Templates, Admin: Order Received, click the flag of the language your store is using. On the new page, on the HTML Content tab, switch the Editor to Source mode.

Carefully and meticulously, make edits as described below:

Find all occurances that have this general structure:

{if !empty({$BILLING.company_name})}

What is inside the !empty parentheses can be anything. The thing to look for are nested braces.

Remove the inner braces:

{if !empty($BILLING.company_name)}

There may be other stuff after the parentheses. Delete it so that there is only one pair of parentheses enclosing the above general structure.

There are many occurrences of that structure in the template.

Repeat for the Plain Text Content tab.

Repeat for all other email templates.

There is a quicker way by using an external database utility such as phpMyAdmin. There, you can simply edit the contents of the table columns quickly.

The corruption has occurred only on those templates that you have edited. Probably early July. But all templates need fixing.

Link to comment
Share on other sites

ok so I did it all and it seemed to be working again (and it's been updated to the latest version), but this morning this:

 

I’ve had another customer tell me they cannot get to the Check out – they get a blank screen…
I’ve tested here on my Windows 10 PCs and I get the same result – blank screen
I’ve also tested on my Samsung phone and I get to the Check out window!
So this ongoing complaint seems to be an issue with the page not building at all for Windows??!!

Link to comment
Share on other sites

Please examine the error_log.

If you get to the checkout pages on your phone, then maybe there is something to viewing on a small device (mobile factors). But that does not seem right.

(It's odd. The first time I tried visiting your site, I got Server Not Found. Maybe an Internet glitch.)

Then, on product pages (because of a multi-part seo path) I am getting:
 

404 Not Found: http://www.scrapaholics.co.nz/classes-and-kits/classes/SpryAssets/SpryValidationTextField.css
404 Not Found: http://www.scrapaholics.co.nz/classes-and-kits/classes/SpryAssets/SpryValidationRadio.css

In the main.php template of your skin (Mican), the links cannot be relative:

From:

<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationRadio.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationRadio.css" rel="stylesheet" type="text/css" />

To:

<script src="{$STORE_URL}/SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="{$STORE_URL}/SpryAssets/SpryValidationRadio.js" type="text/javascript"></script>
<link href="{$STORE_URL}/SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="{$STORE_URL}/SpryAssets/SpryValidationRadio.css" rel="stylesheet" type="text/css" />

Since Cubecart is running a CC5 skin, a separate Mobile skin is involved (if a mobile skin is installed and enabled).

So, maybe there is an issue with the Mican skin. Hopefully the error_log will show us what to look for.

 

I am able to get to the 2. Checkout step of checking out.

What step are you getting a blank screen?

 

Link to comment
Share on other sites

Were you quoting someone in that earlier post? "I’ve tested here on my Windows 10 PCs and I get the same result – blank screen"

Regardless of who is experiencing a blank screen, PHP should log any problem to the error_log.

Unless there is no error with CubeCart and, yes, in fact, WinX's browser has a problem rendering the HTML/JS in some respect.

Link to comment
Share on other sites

It was my client who owns the store's comment. I've just run through a test order from my Android tablet and it's all looking fine, links are working and the checkout was fine. So frustrating to try and narrow it down. It's gone 9pm here so so I'll check the error log again in the morning

Link to comment
Share on other sites

Thank You {$DATA.first_name}!

)}" - Unexpected ")"">
Yesterday, 09:51 [Exception] /home5/louisew5/public_html/scrapaholics.co.nz/includes/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:82 - Syntax error in template "string:

Thank You {$DATA.first_name}!

)}" - Unexpected ")"">
14 Dec 2016, 13:34 [Exception] /home5/louisew5/public_html/scrapaholics.co.nz/includes/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:82 - Syntax error in template "string:

Thank You {$DATA.first_name}!

)}" - Unexpected ")"">
14 Dec 2016, 13:04 [Exception] /home5/louisew5/public_html/scrapaholics.co.nz/includes/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:53 - Syntax error in template "string:

{$DATA.first_name}{$DATA.last_name}{i..." on line 53 "

{if !empty($DATA.ship_method)}{$DATA.ship_method|replace:'_':' '}:{if !empty($DATA.ship_product)} {$DATA.ship_product){/if}{else}Shipping:{/if}

errors that have cropped up... I'm assuming somewhere there'll be a wrong ) instead of an } but don't know where

Link to comment
Share on other sites

another issue I've just discovered is that the mican template isn't showing up properly on my partner's windows pc. It's the mican template but not the one I've customised yet appears fine on my son's  pc... wtf...

The mican skin I'm using says it's compatible with cubecart 6 too...

Link to comment
Share on other sites

The email templates that start with Thank You ($DATA.first_name} is the Cart:Order Confirmed template. So, there is at least that template that needs fixing. Both the HTML and Plain Text Contents tabs, for several occurrences each.

The Mican skin is compatible with CC6, except that the new features that CC6 provides isn't capable of being shown by Mican. But that's not a problem.

If you wish, we can take this to email where we can attach screenshots and other stuff. Send a PM with your email address.

 

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.

×
×
  • Create New...