I have a problem in my dev Magento store in that I can not save a new customer or edit an existing customer. I get the "Please Wait" box forever. The animation in the box moves a frame or two every so often but otherwise doesn't do anything. If I refresh the page it loads successfully but the changes have not been applied. I get no errors in the logs or on the page. All the other questions people have posted about this are either not related to customers or throw errors. This does nothing....it just sits there. I think it's failing on the validation, but I don't understand why. It doesn't even work when I try to hit the "Save" button without making any changes.
I did recently delete some 35000 customers that were imported from our main store, so I figured that might have something to do with it even though it was working since then and only broke recently. To test I imported an older copy of the database but I continue to have the same problem. At this point I have to imagine it's a file and not a database issue, but despite reverting all recent changes, nothing has helped.
Does anyone have any suggestions on debugging this and/or have you run into this before?
Thanks!
This was the first result on Google when searching "save customer account freeze magento" so I figured I'd include my findings here.
Running Magento CE 1.9.1 but this probably applies to most any installation. For my situation, the customer I was trying to modify had an extremely large address book (well over 100 addresses). Due to Magento's mechanism of validating every Form on the "Edit Customer" page, the browser determined that script execution was taking too long and killed the page.
My solution was to delete a bunch of the addresses with the customer's consent.
Add a few breakpoints in the various Form javascript class to see what the hold up is. For me it was a dead giveaway when the validator was attempting to process thousands of elements.
Related
A website has 250 products and i need to get the quantity for those products. The problem is that the quantity is not displayed unless i submit a form. Now i am able to submit that form but the problem is that after 10-20 products scraped there is like a bottleneck where that website returns this message:
Sorry, we have too many customers, please come back later.
So basically it's clear that i'm sending too many requests. But if i'm using a usleep between requests the time for the scrape is like 15 minutes...i guess the server is delaying the answer to my requests.
So basically my question is: what can i do to submit that form without getting stopped or delayed?
So basically my question is: what can i do to submit that form without getting stopped or delayed?
have your own local cached copy of all the products, and have a daemon or cronjob that is constantly (but slowly) updating your own local cache, which should make your cache as close to up-to-date as possible without hitting the rate limit. and whenever you need to quickly inspect all 250 products, use your own local cache, not the live version. PS: the rate-limit is probably on a per-ip basis, if the update speed of 1 IP is insufficient, you can probably just keep adding more IPs for the cache-updater until the cache update speed is acceptable.. (.. and if you're looking for a cheap place to get more IP's, i can recommend https://cloudatcost.com/developer-cloud - or if you're looking for something free, you can try the torproject https://www.torproject.org/ - but many websites blocks tor exit nodes)
I have been looking everywhere for an answer but can't find anything that helps.
I have a magento 1.7.2 install, and some customers can't login into their account area, the website just hangs. They don't get no error or anything. It was that bad that it brought down a whole server when multiple customers were logging in at the same time.
I have since moved on to a new server an it still happens, but doesn't crash the server.
The only way I can get round the issue is resetting the customer password in the admin - but i need to know what is causing it.
Note, this is standard Magento 1.7.2 login system - no customer modules etc. It only happens on some customers too, as many can log in fine.
Ok, it appeared that my cron wasn't triggering the log cleaner in magento. There were stupid amount of data in tables such as log_visitor, log_visitor_url. I believe this was slowing down the performance of my magento site causing the login to hang in some cases.
I followed this tutorial to TRUNCATE various tables - and I have noticed a difference at login.
http://www.crucialwebhost.com/kb/magneto-log-and-cache-maintenance-script/
Hope this helps someone in a similar situation.
it might be something related to cart, try this fix:
UPDATE quote set is_active = 1 where is_active = 0;
I am helping develop a web application for one of the departments in the company I work for.
I was asked to look into a way to log off every user that might be on the application at once, so that if updates to the Web App are pushed out, people aren't working with an old version of it.
My problem is that as I am not very savvy with PHP, JQuery, AJAX, etc. which is what we're using, I have not known exactly what to look for.
We have a timer script running every couple seconds in the background, so I was thinking that I could add an admin button that updated a field in the database which this script could check every so often, and if the field was set, the logoff script could be executed. But this seems like a hack to work around the issue.
The guy I'm working with suggested I look into custom SESSION handlers.
What do you guys think? Any ideas?
Any help would be appreciated. Even if it's an idea on what to start searching for.
Thanks in advance!
EDIT: I should mention that this is a one-page web app. The user is not following any links or leaving the page.
Make an entry for logged in users in your database of choice, maybe memcached if performance is a criteria.
Use a custom Session save handler which stores the sessions in database or file. When you want to destroy all sessions, you can clear the storage (be it database, or file).
Start from - http://php.net/manual/en/function.session-set-save-handler.php
What I ended up doing was the following:
I added a field into one of out database tables and checked its value every time our browser tick came through (about every minute or so). If the field is set when the tick comes through, their page is refreshed, thus logging them off the application and destroying their session (We destroy the session when someone leaves the page).
The users cannot log back in until that field has been reverted to '0'
The admin account can change that field with the click of a button. Therefore their field in the database remains as a '0'
It might be kind of a hack, but it's what I could come up with even after everyone's help. The only issue is that it takes a bit to log everyone off. Problems of pulling vs pushing I guess.
And yes, an email will be sent out some time before logging everyone off so they don't lose work.
Thank you all for your help!
This is a common problem about sharing data.
As i am building a system that allow user share their mailing list to their colleague.
I suspect there is a problem when userA open the page ,
userB open the same page and edit the data,
after that user A edit the data and submit and the changes of userB will be cancel.
As i am using PHP , is their any way to prevent this kind of error??? Thank you.|
Are there any coding example provided in php /jquery??? Thanks a lot
Make editions log, so user A will update conent ver. 123 to ver. 124 , user B will try too to update ver. 123 in his own way, but on server there is already ver. 124, so you will show message to user B, that content was recently modified by another user.
This principe is used in SVN for example.
There are a few solutions.
The simplest would be to have a "lock" field on a database which is set to true when someone is looking at a page, and refuses to let anyone else enter the page while it is locked. This isn't a great idea because it's difficult to capture when someone has left the page, so the page might remain locked forever.
You can get around that problem by using a little AJAX call that sends a message to the server to lock the page every ten seconds or so, and the page locking has a thirty-second time limit.
Perhaps the best method (although this depends on the system) is to use AJAX to dynamically reload components of the page when they are edited by another user (and to put a message next to them when they are being edited), and to warn both users if they are editing the same field at the same time.
I used to have a "Buy Now" button that would go through PayPal, and then, through the button's advanced option, I redirected the users to a "Success" page that would give the serial for the product they purchased.
Obviously, this page had to get confirmation from PayPal, through the variables PayPal gave it, in order to know that a payment had actually been processed, and not only some person typing the page's URL in his browser to get a serial.
I did this only in PHP, without downloading any API, using, as far as I can remember, $_POST or $_SERVER variables from PayPal. There were a couple of nested "if"s, but in the end, it worked fine.
Now I've been Googling for an hour trying to find the code I used. All I find is framework downloads and bloated APIs, while I really only need to know these things:
Did the order process?
What is the email of the buyer?
I have a blank PHP file waiting for suggestions. In dummy-pseudo-code, it would go around the lines of:
<?php
$serial = ...;
if ($paypal_succeeded)
{
echo($serial);
}
?>
Please don't tell me this is impossible, I know I already did it, I just lost my old code.
Thanks!
I don't have any experience with this sort of thing, but google showed me a few possible relevant links here, here, and here.
The main page for this was https://www.paypal.com/ipn