Guest Posted March 16, 2007 Posted March 16, 2007 Hello all, I select 'true' in the Admin/module/STS default/'edit' to 'true' to activate and update, it returns to 'false' every time. This is a clean install of v4.4 on a clean install of the latest version of osCommerce. Installation went fine. I've quadruple checked my local files with the files online and everything's there and in the correct locations. All other osCommerce Admin features work fine--except the STS default will not change 'false' to 'true' when I update to active STS online. Default Remove Module Edit Default template (v2.0.0) Use Templates? false <----When I select 'true' in the Admin/module/STS default/'edit' to 'true' and update, it returns to 'false' every time. Code for debug output debug Files for normal template sts_user_code.php Base folder includes/sts_templates/ Template folder test Default template file sts_template.html Use template for infoboxes false <----Same here. I select 'true' in the Admin/module/STS default/'edit' to 'true' and update, it returns to 'false'. I have also tried changing from false to true in my local sts_default.php file and uploading the edit to catalog/includes/modules/sts/sts_default.php. But nothing changes. In Admin I still get default showing 'false', and my online index.php page is the same oscommerce default template. Any suggestions? I can see my new template when I url the sts_template file I created, but index.php seems to be blind to find my new template. Quote
bkellum Posted March 16, 2007 Posted March 16, 2007 You are experiencing the widely known "refresh bug" of the modules section which includes shipping, payment, etc (not just isolated to the STS modules, but all of the other modules as well). There is a simple fix: 1. Open the catalog/admin/includes/functions/compatibility.php. 2. At the end of the “do_magic_quotes_gpc” routine, add the following code reset($ar); It will end up looking like this: function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; while (list($key, $value) = each($ar)) { if (is_array($ar[$key])) { do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } } reset($ar); } 3. Do the same for the compatibility.php file located in catalog/includes/functions/compatibility.php. Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
Guest Posted March 16, 2007 Posted March 16, 2007 Hey bkellum, thanks for the rapid reply. I'll do that right now. Quote
Guest Posted March 16, 2007 Posted March 16, 2007 Thanks bkellum, That fixed it imeadiately. :thumbsup: Quote
Silvergren Posted March 21, 2007 Posted March 21, 2007 You are experiencing the widely known "refresh bug" of the modules section which includes shipping, payment, etc (not just isolated to the STS modules, but all of the other modules as well). There is a simple fix: 1. Open the catalog/admin/includes/functions/compatibility.php. 2. At the end of the “do_magic_quotes_gpc” routine, add the following code reset($ar); It will end up looking like this: function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; while (list($key, $value) = each($ar)) { if (is_array($ar[$key])) { do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } } reset($ar); } 3. Do the same for the compatibility.php file located in catalog/includes/functions/compatibility.php. Hi Bill, I looked at this and it seems mine is a little different, I don't know why, my site was built by someone else, and it does have errors and mysql problems. This is what I copied, is this normal, as you can see, I'm missing part of the [$key] in several lines... <?php /* $Id: compatibility.php,v 1.10 2003/06/23 01:20:05 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ //// // Recursively handle magic_quotes_gpc turned off. // This is due to the possibility of have an array in // $HTTP_xxx_VARS // Ie, products attributes function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; while (list($key, $value) = each($ar)) { if (is_array($value)) { do_magic_quotes_gpc($value); } else { $ar[$key] = addslashes($value); } } } // $HTTP_xxx_VARS are always set on php4 Any suggestions would be a blessing - and should I still add the reset($ar); - Thank you in advance. Quote
bkellum Posted March 21, 2007 Posted March 21, 2007 (edited) Hi Bill, I looked at this and it seems mine is a little different, I don't know why, my site was built by someone else, and it does have errors and mysql problems. This is what I copied, is this normal, as you can see, I'm missing part of the [$key] in several lines... <?php /* $Id: compatibility.php,v 1.10 2003/06/23 01:20:05 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ //// // Recursively handle magic_quotes_gpc turned off. // This is due to the possibility of have an array in // $HTTP_xxx_VARS // Ie, products attributes function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; while (list($key, $value) = each($ar)) { if (is_array($value)) { do_magic_quotes_gpc($value); } else { $ar[$key] = addslashes($value); } } } // $HTTP_xxx_VARS are always set on php4 Any suggestions would be a blessing - and should I still add the reset($ar); - Thank you in advance. You have a modified version of that file.Try this then: Open and edit /catalog/admin/modules.php Find this line: while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { Comment that line out and replaced it with this line: foreach ($HTTP_POST_VARS['configuration'] as $key => $value){ See if that works for you. Edited March 21, 2007 by bkellum Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
chinaecart Posted March 27, 2007 Posted March 27, 2007 Thanks bkellum, That fixed it imeadiately. :thumbsup: I have did the same changes as what Bill said below,but my STS V4.4 default page still can't work,I doubt there is any other changes needed in some files,please could you tell me what changes on which file(s) should be made ? Thanks! "There is a simple fix: 1. Open the catalog/admin/includes/functions/compatibility.php. 2. At the end of the “do_magic_quotes_gpc” routine, add the following code CODE reset($ar); It will end up looking like this: CODE function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; while (list($key, $value) = each($ar)) { if (is_array($ar[$key])) { do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } } reset($ar); } 3. Do the same for the compatibility.php file located in catalog/includes/functions/compatibility.php." 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.
Note: Your post will require moderator approval before it will be visible.