This is a discussion on Use of undefined constant "TOP" (2.0.15) within the osCMax v2 Installation issues forums, part of the osCMax v2.0 Forums category; I'm getting this error message to my PHP error log whenever I move from one manufacturer to another under admin. ...
| |||||||
| Register | FAQ | Donate | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| I'm getting this error message to my PHP error log whenever I move from one manufacturer to another under admin. PHP Notice: Use of undefined constant TOP - assumed 'TOP' in /usr/www/users/flip/catalog/admin/includes/boxes/catalog.php on line 34 (35, 36, 37, ..., 45, 46, 47) Here's line 34 (35, 36, ... 47 similar, all have TOP added): $contents[] = array('text' => tep_admin_files_boxes(FILENAME_CATEGORIES, BOX_CATALOG_CATEGORIES_PRODUCTS, TOP) . Now 'TOP' was added to admin/includes/boxes/catalog.php in the newest release of OSCMax 2.0.15 - no 'TOP' in 2.0.4 boxes/catalogl.php - and it is linked to admin/includes/functions/general.php but darned if I can see where (its late - I'm tired), the supposedly relevant line is: $sub_boxes = '<a href="' . tep_href_link($filename) . '" class="menuBoxContentLink" target="_' . $target_window . '">' . $sub_box_name . '</a><br>'; When I deleted all the "TOP"s then I get this error message: PHP Warning: Missing argument 3 for tep_admin_files_boxes(), called in /usr/www/users/flip/catalog/admin/includes/boxes/catalog.php on line 34 (35, 36...46, 47) and defined in /usr/www/users/flip/catalog/admin/includes/functions/general.php on line 50 PHP Notice: Undefined variable: target_window in /usr/www/users/flip/catalog/admin/includes/functions/general.php on line 56 Here is line 50 from catalog.php: function tep_admin_files_boxes($filename, $sub_box_name, $target_window) { And here is line 56 from catalog.php: $sub_boxes = '<a href="' . tep_href_link($filename) . '" class="menuBoxContentLink" target="_' . $target_window . '">' . $sub_box_name . '</a><br>'; So is it this a real error or is it just a minor problem that isn't hurting anything? John :-#)# Last edited by JRR; 03-17-2010 at 11:21 PM. |
|
#2
| ||||
| ||||
| Minor issue. This is a warning that will be addressed in future releases. The current workaround is to disable the warnings (which is the default configuration of osCMax that you must have changed or your config is not obeying). In admin/includes/application_top.php, you need this line (line 18 error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); Or you could just change the constant definition in the affected files by changing TOP to 'TOP' whic is the actual fix to this. Yes, just add the single quotes around TOP in the files/lines that are throwing the error.
__________________ Michael Sasek osCMax Developer *** Do not PM me requesting paid help. The only paid work I do is for AABox Web Hosting customers *** Stay Up To Date with everything osCMax: Free osCMax Newsletters - Security notices, New Releases, osCMax News osCMax on Twitter - Up to the minute info as it happens. Know it first. osCMax User Manual - osCMax Templates - Advanced Template Tutorial |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page? | lithband | osCMax v2 Customization/Mods | 7 | 05-27-2010 04:20 AM |
| "Create account" leading to "Advanced search"??? | Steelwork | osCMax v2 Installation issues | 14 | 02-08-2010 07:31 AM |
| most of my items are "Flat-rate", but how can I also offer "Free-Shipping" on just a few specific ones?? | mac007 | osCMax v2 Customization/Mods | 0 | 11-09-2009 08:15 AM |
| Hide "Add to Cart" and disable "Buy Now" for manufacturer v1.0 | michael_s | New osCommerce Contributions | 0 | 10-31-2008 02:03 AM |
| Remove "QTPRO" for "Option Type Feature" | adam71o | osCMax v2 Customization/Mods | 3 | 01-10-2007 09:32 AM |