hunter69 Posted July 9, 2009 Share Posted July 9, 2009 I am getting into the final stretch and I am finding alot of last minute problems. My biggest problem right now is that When you go top my site ( http://rodonatrappingsupplies.com/ ) You can't create an account. If you click on account it asks for existing or new and when you click to make a new account you just get a blank page! Did I somehow erase a file? what should I be looking for? I can't test the check out because you have to have an account to check out. please help! Link to comment Share on other sites More sharing options...
germ Posted July 9, 2009 Share Posted July 9, 2009 <right click> View source Page down to the bottom: <b>Fatal error</b>: Call to undefined function tep_decode_html_entities() in <b>/home2/rodonat/public_html/includes/form_check.js.php</b> on line <b>107</b><br /> If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
hunter69 Posted July 9, 2009 Author Share Posted July 9, 2009 Ok,, I now know how to check for an error report on a page that is not working. Thanks, believe me or not but I think I am learning a bit. Now How do I decifer this error message to know what is wrong? "Call to undefined function" sounds to me like the program does not no what it should do after I click on the link? Is this correct? Or should I be looking elswhere to decifer this? Link to comment Share on other sites More sharing options...
hunter69 Posted July 9, 2009 Author Share Posted July 9, 2009 If I am on the right track, the error would be in the form_checks.js file and if so this is a copy of that file <?php /* $Id: form_check.js.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ ?> <script language="javascript"><!-- var form = ""; var submitted = false; var error = false; var error_message = ""; function check_input(field_name, field_size, message) { if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) { var field_value = form.elements[field_name].value; if (field_value.length < field_size) { error_message = error_message + "* " + message + "\n"; error = true; } } } function check_radio(field_name, message) { var isChecked = false; if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) { var radio = form.elements[field_name]; for (var i=0; i<radio.length; i++) { if (radio[i].checked == true) { isChecked = true; break; } } if (isChecked == false) { error_message = error_message + "* " + message + "\n"; error = true; } } } function check_select(field_name, field_default, message) { if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) { var field_value = form.elements[field_name].value; if (field_value == field_default) { error_message = error_message + "* " + message + "\n"; error = true; } } } function check_password(field_name_1, field_name_2, field_size, message_1, message_2) { if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) { var password = form.elements[field_name_1].value; var confirmation = form.elements[field_name_2].value; if (password.length < field_size) { error_message = error_message + "* " + message_1 + "\n"; error = true; } else if (password != confirmation) { error_message = error_message + "* " + message_2 + "\n"; error = true; } } } function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) { if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) { var password_current = form.elements[field_name_1].value; var password_new = form.elements[field_name_2].value; var password_confirmation = form.elements[field_name_3].value; if (password_current.length < field_size) { error_message = error_message + "* " + message_1 + "\n"; error = true; } else if (password_new.length < field_size) { error_message = error_message + "* " + message_2 + "\n"; error = true; } else if (password_new != password_confirmation) { error_message = error_message + "* " + message_3 + "\n"; error = true; } } } function check_form(form_name) { if (submitted == true) { alert("<?php echo JS_ERROR_SUBMITTED; ?>"); return false; } error = false; form = form_name; error_message = "<?php echo JS_ERROR; ?>"; <?php if (ACCOUNT_GENDER == 'true') echo ' check_radio("gender", "' . tep_decode_html_entities(ENTRY_GENDER_ERROR) . '");' . "\n"; ?> check_input("firstname", <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_FIRST_NAME_ERROR); ?>"); check_input("lastname", <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_LAST_NAME_ERROR); ?>"); <?php if (ACCOUNT_DOB == 'true') echo ' check_input("dob", ' . ENTRY_DOB_MIN_LENGTH . ', "' . tep_decode_html_entities(ENTRY_DATE_OF_BIRTH_ERROR) . '");' . "\n"; ?> check_input("email_address", <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_EMAIL_ADDRESS_ERROR); ?>"); check_input("street_address", <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_STREET_ADDRESS_ERROR); ?>"); check_input("postcode", <?php echo ENTRY_POSTCODE_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_POST_CODE_ERROR); ?>"); check_input("city", <?php echo ENTRY_CITY_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_CITY_ERROR); ?>"); <?php if (ACCOUNT_STATE == 'true') echo ' check_input("state", ' . ENTRY_STATE_MIN_LENGTH . ', "' . tep_decode_html_entities(ENTRY_STATE_ERROR) . '");' . "\n"; ?> check_select("country", "", "<?php echo tep_decode_html_entities(ENTRY_COUNTRY_ERROR); ?>"); check_input("telephone", <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_TELEPHONE_NUMBER_ERROR); ?>"); check_password("password", "confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_PASSWORD_ERROR); ?>", "<?php echo tep_decode_html_entities(ENTRY_PASSWORD_ERROR_NOT_MATCHING); ?>"); check_password_new("password_current", "password_new", "password_confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo tep_decode_html_entities(ENTRY_PASSWORD_ERROR); ?>", "<?php echo tep_decode_html_entities(ENTRY_PASSWORD_NEW_ERROR); ?>", "<?php echo tep_decode_html_entities(ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING); ?>"); if (error == true) { alert(error_message); return false; } else { submitted = true; return true; } } //--></script> Am I on the right track? Link to comment Share on other sites More sharing options...
germ Posted July 9, 2009 Share Posted July 9, 2009 At the end of /includes/functions/general.php add this code: //// // Decode an HTML entity string to be used with the javascript alert() function // The html_entity_decode() PHP function is not implemented prior PHP 4.3.0 function tep_decode_html_entities($string) { if (PHP_VERSION >= "4.3.0") { return html_entity_decode($string); } else { $trans_tbl = get_html_translation_table(HTML_ENTITIES); $trans_tbl = array_flip($trans_tbl); return strtr($string, $trans_tbl); } } Add it just BEFORE the closing PHP tag: ?> Backup before editing. You break it - You bought it. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
hunter69 Posted July 9, 2009 Author Share Posted July 9, 2009 That took Care of it!!! Thank you Very much!! Now I am off to look for more bugs!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.