Guest Posted June 29, 2007 Posted June 29, 2007 I seem to be having an issue that has not been discussed before, at least within the first dozen pages of a forum search. I'm just getting into using product options, and what I'm running into is that whenever I edit or delete anything on the product options screen, the script freezes for a while, and then the PHP file itself is given to the browser instead of the OUTPUT of the php file. (i.e.- I get a message asking what software I want to open the PHP file in, suggesting the default editor). When this happens, I cannot access any other CubeCart pages and I have to close my browser and re-open it again. With a bit of testing, I found that the changes are made relatively quickly, and I can close the browser immediately after clicking the 'edit' or 'delete' button and reopen it again and see the changes made. The problem does not happen when ADDING product options, attributes, or values. Just when editing or deleting. Until yesterday, I had no mods installed that affected product options, and when I noticed the problem, I uploaded a default options.php file to admin/products/options.php from the latest distribution package. The fresh file produced the same results. I'm using a Linux server with PHP 4.4.7 and MySQL 4.1. Everything else in my CubeCart system is working fine. My browser is Firefox on a Fedora Core OS system. Does anyone have a suggestion for something to try? EDIT: Looking into the options.php file itself, it seems that when something is edited or deleted, there is a line such as: header("Location: ".urldecode($_GET['redir'])); that's not involved when ADDing something. Is it possible that the urldecode function is causing a problem? Quote
Guest Rikki Posted June 30, 2007 Posted June 30, 2007 I seem to be having an issue that has not been discussed before, at least within the first dozen pages of a forum search. I'm just getting into using product options, and what I'm running into is that whenever I edit or delete anything on the product options screen, the script freezes for a while, and then the PHP file itself is given to the browser instead of the OUTPUT of the php file. (i.e.- I get a message asking what software I want to open the PHP file in, suggesting the default editor). When this happens, I cannot access any other CubeCart pages and I have to close my browser and re-open it again. With a bit of testing, I found that the changes are made relatively quickly, and I can close the browser immediately after clicking the 'edit' or 'delete' button and reopen it again and see the changes made. The problem does not happen when ADDING product options, attributes, or values. Just when editing or deleting. Until yesterday, I had no mods installed that affected product options, and when I noticed the problem, I uploaded a default options.php file to admin/products/options.php from the latest distribution package. The fresh file produced the same results. I'm using a Linux server with PHP 4.4.7 and MySQL 4.1. Everything else in my CubeCart system is working fine. My browser is Firefox on a Fedora Core OS system. Does anyone have a suggestion for something to try? EDIT: Looking into the options.php file itself, it seems that when something is edited or deleted, there is a line such as: header("Location: ".urldecode($_GET['redir'])); that's not involved when ADDing something. Is it possible that the urldecode function is causing a problem? Could be down to your browser. I know IE does that sometimes when I am doing things, a restart of the PC usually helps or loading up Fire Fox instead. Its like a common problem with the latest phpMyadmin that causes Page Cannot Be Displayed errors, I use firefox and it works fine. R Quote
Guest Posted June 30, 2007 Posted June 30, 2007 Thanks for the suggestion Rikki. I currently use Firefox on a Linux machine. What's strange is that I don't run into that problem ANYWHERE else, and it's consistent - EVERY time I try to edit or delete an option, the same thing happens, but never when adding options (or attributes, or values)... Quote
Guest estelle Posted July 7, 2007 Posted July 7, 2007 Alan, do you have a very large number of products using product options in your store? I seem to remember a problem quite some time ago, not sure if it was ever fixed, where there was a "SELECT * ..." within the options page that was using a massive amount of memory in stores with a large number of products. Perhaps its was never fixed, and it perhaps it is causing the problem you describe. ... Looking at the code, perhaps this line might be the problem: $query = "SELECT * FROM ".$glob['dbprefix']."CubeCart_options_bot INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON product = productId ORDER BY name, option_id, value_id ASC"; [uNTESTED] You could try changing it to: $query = "SELECT assign_id, name, option_id, value_id, option_price, option_symbol, product FROM ".$glob['dbprefix']."CubeCart_options_bot INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON product = productId ORDER BY name, option_id, value_id ASC"; Quote
Guest Posted July 7, 2007 Posted July 7, 2007 I'll check to see if that works. I only have about 25 products in my store, and only 3 of them are using options at this time, so it doesn't seem like a lot to me. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.