Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2022
    Location
    Chennai
    Posts
    26
    Plugin Contributions
    0

    help question Undefined constant TOPMOST_CATEGORY_PARENT_ID

    Dear Friends,

    We are currently using Zen Cart 1.5.8 under PHP 8.1.9 Version at www.celextel.com.

    We are getting Blank Page when we try to change the Currency in any Product Info Page.

    Example URL:
    https://www.celextel.com/?currency=I..._id=76&cPath=5

    Debug Log File is showing the following Logs:
    [03-Nov-2022 11:08:45 Asia/Kolkata] PHP Fatal error: Uncaught Error: Undefined constant "TOPMOST_CATEGORY_PARENT_ID" in /home/xxxx/public_html/includes/functions/functions_categories.php:186
    Stack trace:
    #0 /home/xxxx/public_html/includes/classes/usu.php(907): zen_get_parent_categories()
    #1 /home/xxxx/public_html/includes/classes/usu.php(715): usu->get_full_cPath()
    #2 /home/xxxx/public_html/includes/classes/usu.php(642): usu->get_category_name()
    #3 /home/xxxx/public_html/includes/classes/usu.php(387): usu->get_product_name()
    #4 /home/xxxx/public_html/includes/classes/usu.php(226): usu->parse_parameters()
    #5 /home/xxxx/public_html/includes/classes/observers/UsuObserver.php(55): usu->href_link()
    #6 /home/xxxx/public_html/includes/classes/traits/NotifierManager.php(87): UsuObserver->update()
    #7 /home/xxxx/public_html/includes/functions/html_output.php(18): base->notify()
    #8 /home/xxxx/public_html/includes/init_includes/init_currencies.php(39): zen_href_link()
    #9 /home/xxxx/public_html/includes/autoload_func.php(40): require_once('/home/xxxx/...')
    #10 /home/xxxx/public_html/includes/application_top.php(237): require('/home/xxxx/...')
    #11 /home/xxxx/public_html/index.php(25): require('/home/xxxx/...')
    #12 {main}
    thrown in /home/xxxx/public_html/includes/functions/functions_categories.php on line 186
    We have not made changes to any of these Files.

    We do not find Configuration Setting for the following in DB:
    TOPMOST_CATEGORY_PARENT_ID

    Please guide us as to what to do in this regard.

    Thanks,

    Lakshmanan
    Last edited by celextel108; 3 Nov 2022 at 07:10 AM.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,713
    Plugin Contributions
    123

    Default Re: Undefined constant TOPMOST_CATEGORY_PARENT_ID

    Does this issue go away when you turn off Ultimate SEO URLs?
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Sep 2022
    Location
    Chennai
    Posts
    26
    Plugin Contributions
    0

    Default Re: Undefined constant TOPMOST_CATEGORY_PARENT_ID

    Quote Originally Posted by swguy View Post
    Does this issue go away when you turn off Ultimate SEO URLs?
    Yes, you are correct. Pages are seen when Ultimate SEO URLs are disabled.

    Thanks,

    Lakshmanan

  4. #4
    Join Date
    Sep 2022
    Location
    Chennai
    Posts
    26
    Plugin Contributions
    0

    Default Re: Undefined constant TOPMOST_CATEGORY_PARENT_ID

    Dear @swguy,

    Please suggest a solution to this issue as we would like to use Ultimate SEO URLs also.

    Thanks,

    Lakshmanan

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,713
    Plugin Contributions
    123

    Default Re: Undefined constant TOPMOST_CATEGORY_PARENT_ID

    Working on it! You can track the issue here:

    https://github.com/zencart/zencart/issues/4939
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #6
    Join Date
    Sep 2022
    Location
    Chennai
    Posts
    26
    Plugin Contributions
    0

    Default Re: Undefined constant TOPMOST_CATEGORY_PARENT_ID

    Quote Originally Posted by swguy View Post
    Working on it! You can track the issue here:

    https://github.com/zencart/zencart/issues/4939
    Okay, thanks.

  7. #7
    Join Date
    Sep 2022
    Location
    Chennai
    Posts
    26
    Plugin Contributions
    0

    Default Re: Undefined constant TOPMOST_CATEGORY_PARENT_ID

    Thanks scottcwilson for the solution through Pull Request.

    First two files of Zen Cart 1.5.8 already has got the code mentioned by you,

    Our website with Ultimate SEO URLs enabled is working fine now after adding the code mentioned by you in the following third file:
    includes/init_includes/init_non_db_settings.php
    // Shared - Storefront and Admin
    'TOPMOST_CATEGORY_PARENT_ID' => 0,
    Thanks,

    Lakshmanan
    Last edited by celextel108; 4 Nov 2022 at 06:31 AM.

  8. #8
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,713
    Plugin Contributions
    123

    Default Re: Undefined constant TOPMOST_CATEGORY_PARENT_ID

    Thanks for confirming @ Lakshmanan! Added to the 1.5.8 known bug list.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. v156 Undefined constant ipn_main_handler
    By ianhg in forum General Questions
    Replies: 6
    Last Post: 20 Jul 2020, 09:15 AM
  2. v156 Undefined constant MODULE_PAYMENT_AUTHORIZENET_AIM_CURRENCY
    By PanZC2020 in forum Bug Reports
    Replies: 1
    Last Post: 27 Feb 2019, 09:01 PM
  3. Undefined constant text
    By TheOracle in forum Bug Reports
    Replies: 6
    Last Post: 11 May 2007, 04:19 AM
  4. Undefined Notice: Use of undefined constant
    By TheOracle in forum Bug Reports
    Replies: 0
    Last Post: 6 May 2007, 06:33 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR