Forums / Upgrading to 1.5.x / Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

Started by pricediscrimination on 24 Jan 2013, 7:02 PM · Views: 2,615

Results 1 to 20 of 22
24 Jan 2013, 7:02 PM
#1
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

Hey guys, just did the dirty work after years of avoiding it. Was so tired of the PayPal free shipping error. I have a few things that still need worked out before going live.

There was a mod on here a few years ago that allowed you to customize the greeting to include the person's name. This code pulled their name in, but now it seems to be breaking everything:

<?php echo zen_customer_store_account(); ?>

Also, after the upgrade, setting Recreate Sessions to true was throwing out the Whoops! Your session has expired message without creating the new account. Then I found this thread that says to check the www. After trying to create a new account without the www, it worked. Question is why? It used to work either way before the upgrade.

24 Jan 2013, 7:26 PM
#2
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

After double checking the configure files, I changed it to remove the www for https pages. Working now. Strange that it used to work on 1.3.8.

Now the PayPal Express is not showing on the cart page but shows up on the payment page.

24 Jan 2013, 9:04 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

A session can only be started when the session cookie contains a matching domain name for the URL you're trying to access. If your SSL URL is www. and your non-SSL URL doesn't have the www. ...... or if your SSL certificate is issued to non-www but you've configured your store to USE the www. in the URL, then it'll be rejected.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Jan 2013, 9:51 PM
#4
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

DrByte:

A session can only be started when the session cookie contains a matching domain name for the URL you're trying to access. If your SSL URL is www. and your non-SSL URL doesn't have the www. ...... or if your SSL certificate is issued to non-www but you've configured your store to USE the www. in the URL, then it'll be rejected.

With HTTP set to https://www.site.com and HTTPS set to site.com, it used to work perfectly and now it isn't working in Firefox (although is in Chrome). Even cleared cookies in Firefox to no avail. Most hardcoded internal links are using www and with this weird behavior it treats the visitor as logged out when they click anything with a www in front. It is something that changed in 1.5.1?

Edit: Even to edit the includes/configure.php to both not have www, it's not working right because of the hardcoded links. I emphasize, this worked before the upgrade :yes:

24 Jan 2013, 10:35 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

Why do you have hardcoded links?

And yes, cookie handling was strengthened in 1.5 for broader compatibility and security reasons.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Jan 2013, 11:54 PM
#6
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

DrByte:

Why do you have hardcoded links?

At the beginning I probably didn't get the syntax for using the base URL so it was easier to just drop the full URL instead for any modifications.

Do you by any chance know anything about ```php
<?php echo zen_customer_store_account(); ?>


 
 and why it used to show the customer's name perfectly and now break everything?
25 Jan 2013, 12:34 AM
#7
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

DrByte:

And yes, cookie handling was strengthened in 1.5 for broader compatibility and security reasons.

Oops, I forgot to ask, does that mean it's not a problem with my upgrade and that I should simply go remove the www from all the links?

25 Jan 2013, 4:13 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

pricediscrimination:

Oops, I forgot to ask, does that mean it's not a problem with my upgrade and that I should simply go remove the www from all the links?
If you've configured your store (ie: in your configure.php file) to NOT use the www. prefix, then yes you should remove the www. prefix from any other store links you've embedded/hardcoded into your templates. Better yet remove the "http://whatever_here/" part and just leave the latter part of the URL ... that would make them "relative", as in "relative in relation to the base/root of your store URL".
Examples:
BAD: "http://your_store_domain/index.php?main_page=something"
GOOD: "index.php?main_page=something"
BAD: src="http://your_store_domain/images/picture.jpg"
GOOD: src="images/picture.jpg"

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Jan 2013, 4:18 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

pricediscrimination:

Do you by any chance know anything about ```php
<?php echo zen_customer_store_account(); ?>

> and why it used to show the customer's name perfectly and now break everything?
Apart from the fact that there's never been any zen_customer_store_account() function in official Zen Cart code, no.
I'm guessing you had that added as part of something given to you by answer to a question on the forum, or as part of a plugin you installed. Best to go back to the original source where you got it so you can fix it with full context (ie: all the related changes that were done to add that, including but not limited to a function definition for it).

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Jan 2013, 4:41 AM
#10
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

Thanks for the heads up on the links. Will follow your guidelines from now on. Just to clarify, do the HTTP and HTTPS base URLs have to match? I thought it was good SEO to be able to use both www and non-www.

As for the zen_customer_store_account() function, I think there was a thread at some point about how to make a greeting similar to Amazon that uses the customer's first name. Can't find the thread, nor anything in the plugins section (do you guys weed out old threads?) so I no choice but to get rid of it. Do you happen to know of another way to call the logged in customer's first name? (searching for a solution was unsuccessful.)

25 Jan 2013, 5:23 AM
#11
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

Side note: I just realized almost every site on the internet uses www. At least all the big ones. Too bad I think the SSL is set to use non-www. :no:

25 Jan 2013, 5:46 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

pricediscrimination:

Do you happen to know of another way to call the logged in customer's first name? (searching for a solution was unsuccessful.)Zen Cart has always welcomed the customer, unless you've turned that feature off or removed its code from your template. It appears in one of two ways:
Examples on the demo site, using the built-in "Classic" template: http://www.zen-cart.net/

Welcome Guest! Would you like to log yourself in?
or
Hello Bill! Would you like to see our newest additions?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Jan 2013, 5:48 AM
#13
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

Update: I swear I changed nothing. HTTP is www and HTTPS is non-www, and suddenly it just started working without logging me out as a customer. Before when I was logged in, it would only be on a non-www page, then when clicking a regular link (which was www from the base URL in configure.php) it would act as if I was logged out.

The only thing I can think of is that I cleared the cookies this morning and Firefox only just now dealt with it. Weird!

25 Jan 2013, 5:51 AM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

pricediscrimination:

I thought it was good SEO to be able to use both www and non-www.
It's a good idea to have your site properly respond to both. Zen Cart takes care of that for you automatically if you run your store from the "root" of your site (ie: your_domain.com/index.php) and not from a subfolder (ie: your_domain.com/foldername/index.php). All it needs you to do is supply the correct SSL URL to match your SSL certificate and the correct non-SSL URL, preferably using the same choice of www or non-www. Keep it as simple as possible by not mixing it up needlessly. Your customers won't need to remember whether to use it or not, and search engines will be told to only index whatever you set for HTTP_SERVER.

If you've added your own .htaccess rewrite rules to overrule whatever Zen Cart does, then you're on your own to tweak those. Zen Cart doesn't use any such rewrites at this time.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Jan 2013, 5:52 AM
#15
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

That's good to know. I have lots of htaccess rewrites happening.

Spoke too soon about all being well! www empties the shopping cart, and non-www still has the item. Definitely a configure.php/links issue going on!
(Update, not doing it now. This is weird. Oh well I'll just let it go for now, seems ok in Chrome)

Do the cart contents have a different timeout than the overall being logged in timeout?

25 Jan 2013, 6:07 AM
#16
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

Since this thread has basically become my own personal upgrade thread (for that I am both grateful and apologetic), I might as well throw out my other <s>two</s> three questions related to upgrading from 1.3.8 to 1.5.1:

When doing the database upgrade, would it have knocked off the most recent customer and order info?

And PayPal Express isn't showing up on the shopping cart page yet a PayPal button is showing up in the checkout_payment page. Is this normal or did I probably screw something up in my shopping_cart_default when merging the files? I double checked and all seemed to be right. I always thought the PayPal in the checkout_payment was from one of the other PayPal modules, but I see I might have been wrong all this time since all I have installed at the moment is the PEC module.

Shipping estimator works flawless on shopping cart page, but when logged in, it doesn't show and fails to load the rest of the page (ie footer, etc) almost as if there is an error from pulling in the logged in person's info.

25 Jan 2013, 6:21 AM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

pricediscrimination:

When doing the database upgrade, would it have knocked off the most recent customer and order info?
Not if you followed this exact process: http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

But if you wiped out your live database by replacing it with your temporary testing copy then yes you deleted anything that wasn't in the temporary copy.

I'll let someone smarter than me tackle your other questions.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Jan 2013, 6:33 AM
#18
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

DrByte:

I'll let someone smarter than me tackle your other questions.

Much obliged, sir. You have been helping me for years.

25 Jan 2013, 6:54 AM
#19
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

pricediscrimination:

Shipping estimator works flawless on shopping cart page, but when logged in, it doesn't show and fails to load the rest of the page (ie footer, etc) almost as if there is an error from pulling in the logged in person's info.
I'll be brave and suggest that the "fails to load the rest of the page" is equally described as "a partial blank page" and thus this applies: http://www.zen-cart.com/content.php?124-blank-page

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 Feb 2013, 10:53 PM
#20
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Upgraded from 1.3.8a to 1.5.1. Whew! Now a few issues...

Hi DrByte, I have been monitoring logs as recommended by you several times. The only one that remains (for now) is this:

PHP Warning: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in /admin/includes/functions/general.php on line 39

That line contains this:

return htmlspecialchars($string, ENT_COMPAT, CHARSET, FALSE);

Searched and others said they removed the "FALSE" but I don't think they were referring to the same issue. I also saw your *Known bug with v1.3.9h and OLD versions of PHP (lower than 5.2.3)* post here but I am running PHP 5.2.17.