osCmax v2.5 User Manual
Results 1 to 2 of 2

Use of undefined constant "TOP" (2.0.15)

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. ...

      
  1. #1
    JRR
    JRR is offline
    Member
    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    52
    Rep Power
    3


    Default Use of undefined constant "TOP" (2.0.15)

    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. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Use of undefined constant "TOP" (2.0.15)

    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


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    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 Documentation

Similar Threads

  1. I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page?
    By lithband in forum osCmax v2 Customization/Mods
    Replies: 7
    Last Post: 05-27-2010, 04:20 AM
  2. "Create account" leading to "Advanced search"???
    By Steelwork in forum osCmax v2 Installation issues
    Replies: 14
    Last Post: 02-08-2010, 07:31 AM
  3. Replies: 0
    Last Post: 11-09-2009, 08:15 AM
  4. Hide "Add to Cart" and disable "Buy Now" for manufacturer v1.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 10-31-2008, 02:03 AM
  5. Remove "QTPRO" for "Option Type Feature"
    By adam71o in forum osCmax v2 Customization/Mods
    Replies: 3
    Last Post: 01-10-2007, 09:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •