wp-e-commerce / WP-e-Commerce

WP eCommerce - The most popular independent eCommerce platform for WordPress
https://wpecommerce.org
GNU General Public License v2.0
215 stars 216 forks source link

If wpsc-user-log.php is already in active theme, new actions (which are required), are not utilized. #359

Closed JustinSainton closed 11 years ago

JustinSainton commented 11 years ago

This is a problem. If the user has already moved wpsc-user-log.php to their active theme, the new 'wpsc_user_profilesection' . $current_tab action is not utilized. This means that a large, large portion of users won't be able to access Customer Details or Downloads (or, very likely, other tabs plugins may have added).

We need to figure out how to maintain back compat here.

JustinSainton commented 11 years ago

This was introduced originally in PR #27, finally in PR #73. Committed in e8fb235e2cf12928ae2fa8a83046c656f06523fd

JustinSainton commented 11 years ago

Thoughts on this:

I'm making some assumptions, they are as follows:

We can get the last few versions (I'd guess not much has changed in this file, aside from this change, in awhile) and get the md5 hash of them. Save those to an array, check the md5 hash of the active theme file and work some magic.

Need to figure out if this is a decent idea (feels like maybe the easiest way to go about it.) and if it is, what to put in the nag exactly for people that have modified the file.

JustinSainton commented 11 years ago

Checking each major release between 3.8 and 3.8.10, we have 5 distinct hashes.

This code:

$versions = array( 
    '3.8'   => md5( wp_remote_retrieve_body( wp_remote_get( 'http://plugins.svn.wordpress.org/wp-e-commerce/tags/3.8/wpsc-theme/wpsc-user-log.php' ) ) ),
    '3.8.1' => md5( wp_remote_retrieve_body( wp_remote_get( 'http://plugins.svn.wordpress.org/wp-e-commerce/tags/3.8.1/wpsc-theme/wpsc-user-log.php' ) ) ),
    '3.8.2' => md5( wp_remote_retrieve_body( wp_remote_get( 'http://plugins.svn.wordpress.org/wp-e-commerce/tags/3.8.2/wpsc-theme/wpsc-user-log.php' ) ) ),
    '3.8.3' => md5( wp_remote_retrieve_body( wp_remote_get( 'http://plugins.svn.wordpress.org/wp-e-commerce/tags/3.8.3/wpsc-theme/wpsc-user-log.php' ) ) ),
    '3.8.4' => md5( wp_remote_retrieve_body( wp_remote_get( 'http://plugins.svn.wordpress.org/wp-e-commerce/tags/3.8.4/wpsc-theme/wpsc-user-log.php' ) ) ),
    '3.8.5' => md5( wp_remote_retrieve_body( wp_remote_get( 'http://plugins.svn.wordpress.org/wp-e-commerce/tags/3.8.5/wpsc-theme/wpsc-user-log.php' ) ) ),
    '3.8.6' => md5( wp_remote_retrieve_body( wp_remote_get( 'http://plugins.svn.wordpress.org/wp-e-commerce/tags/3.8.6/wpsc-theme/wpsc-user-log.php' ) ) ),
    '3.8.7' => md5( wp_remote_retrieve_body( wp_remote_get( 'http://plugins.svn.wordpress.org/wp-e-commerce/tags/3.8.7/wpsc-theme/wpsc-user-log.php' ) ) ),
    '3.8.8' => md5( wp_remote_retrieve_body( wp_remote_get( 'http://plugins.svn.wordpress.org/wp-e-commerce/tags/3.8.8/wpsc-theme/wpsc-user-log.php' ) ) ),
    '3.8.9' => md5( wp_remote_retrieve_body( wp_remote_get( 'http://plugins.svn.wordpress.org/wp-e-commerce/tags/3.8.9/wpsc-theme/wpsc-user-log.php' ) ) ),
    '3.8.10' => md5( wp_remote_retrieve_body( wp_remote_get( 'http://plugins.svn.wordpress.org/wp-e-commerce/tags/3.8.10/wpsc-theme/wpsc-user-log.php' ) ) )
);

echo '<pre>' . print_r( array_unique( $versions ), 1 );

produces this result:

Array
(
    [3.8] => 1526bcf18869f9ea2f4061f528a1a21a
    [3.8.4] => 1d17c7fb086e2afcf942ca497629b4c9
    [3.8.8] => f9549ba1b1956c78f96b1551ab965c13
    [3.8.9] => 4d0bcba88d211147399e79661cf3b41d
    [3.8.10] => 09e2cb9c753587c9228a4e9e8008a82f
)

Forthcoming patch will do an md5_file check and see if it is in this array.

JustinSainton commented 11 years ago

Tested and works well if A) Has file and has changed, B) Has file and has not changed, C) Does not have file. See 3810d7679e2eec1c8dee791cc4906dac57069fb3 and 59f043e212931a9f4c79b223f04a904e8286567b. Would love some more test coverage on this.

JustinSainton commented 11 years ago

Closing. Bugs? New ticket please.

baymro commented 11 years ago

Hi, I have replace the old Kassyopea: wpsc-user-log.php by 3.811 wpsc-user-log.php. But the bug is still there. Can you help me? I can show you the admin and passport. my website: www.baymro.com Appreciated.

Perry

JustinSainton commented 11 years ago

You may need to Flush Theme Cache, under Settings > Store > Presentation

baymro commented 11 years ago

Thank you. Yes, I clicked Flush Theme Cache, but the warning is still there. Can you help me? I can show you the admin and password by email. my website: www.baymro.com Appreciated.

Perry

gwmiller04476 commented 11 years ago

I'm having the same problem. I have the warning and the login/register form has disappeared from my checkout page. I looked at the "instruction" page the link in the warning took me to, but it was no help to me at all. I need to get this fixed!

JustinSainton commented 11 years ago

Is the bug still there, or just the warning? The warning goes away when you click the "Hide this warning" link.

gwmiller04476 commented 11 years ago

It's still there. On the checkout page, there is no place to log in or register as there was before I updated.

JustinSainton commented 11 years ago

The checkout page would not have been modified at all if you are making the changes suggested in the documentation. I would check to confirm on your Settings > Store > Checkout area that you still have the "Require user registration" option checked.

Thanks,

M. Justin Sainton Zao Web Design, LLC Principal / Project Manager http://www.zaowebdesign.com (c) 971.222.6330 (f) 1.413.723.0396

On Sun, May 12, 2013 at 3:58 PM, gwmiller04476 notifications@github.comwrote:

It's still there. On the checkout page, there is no place to log in or register as there was before I updated.

— Reply to this email directly or view it on GitHubhttps://github.com/wp-e-commerce/WP-e-Commerce/issues/359#issuecomment-17787005 .

gwmiller04476 commented 11 years ago

I did that to no effect. However, the problem seems to have resolved itself - a little creepy, really, but I'll settle for that as long as my site is working.

minir53 commented 10 years ago

Hi There. I am also having a big problem. the warning and the login/register form has disappeared from my checkout page as well. I looked at the "instruction" page in the link in the warning took me to, but it was no help to me at all because I am not good enough in html programming.

Do you have any idea where my problem is? i really need my shop working again, I dont know for how long its not working already. Please help.

Poikilos commented 6 years ago

If anyone comes to this issue looking for more info about manual steps that may be needed (the warning message's solution link is broken, but the first link goes to this issue), the manual changes to wpsc-user-log.php may not be needed anymore with later versions according to comments at (people say to click "ignore" on the message or that later version "finally works": https://wpecommerce.org/wp-e-commerce-plugin/wpec-3-8-11-1-weve-fixed-your-stuff/. Here is the error that may lead people here:

(click to show error) > You are currently using WPeC 3.13.1. We introduced a regression in WPeC 3.8.10 which affects your customer user account page. We have included a fix for a [bug on the User Account management page](https://github.com/wp-e-commerce/WP-e-Commerce/issues/359). We are able to fix this automatically on most sites, but it appears that you have made changes to your wpsc-user-log.php page. For that reason, we have some [simple instructions](http://docs.wpecommerce.org/documentation/3-8-11-user-logs) for you to follow to resolve the issue. We are sorry for the inconvenience.

I have no way to test whether this is causing a problem, since my customer only uses WP eCommerce for display purposes (for products that can be ordered in bulk), and has the cart features hidden and the prices at $0.00 and same color as background (on purpose and not related to issue). If manual steps are still needed in the case of this error message, someone here please explain what the manual steps are since the second link above ("simple instructions") is broken. Otherwise, please confirm manual steps are not needed.