Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2012
    Posts
    362
    Plugin Contributions
    0

    Default [Not a bug] Fatal Error Cannot redeclare zen_js_zone_list()

    Encountered the subject error while in admin editing a product. The error log follows:
    Code:
    [15-Jun-2022 13:23:10 America/New_York] PHP Fatal error:  Cannot redeclare zen_js_zone_list() (previously declared in /path to store/includes/functions/functions_general.php:1145) in /path to admin/includes/functions/html_output.php on line 190
    I might be able to put the admin function in an if(!function_exists(zen_js_zone_list)) block but the code is different in the admin from that in the store side. I recently added the USPS Address Validation add-on which may use the function.

    Suggestions appreciated. Thank you!

    Dave

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    8,840
    Plugin Contributions
    118

    Default Re: Fatal Error Cannot redeclare zen_js_zone_list()

    This subforum is for bugs in Zen Cart. This looks like a bug with the modifications you have made.
    That Software Guy. My Store: Zen Cart Modifications
    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
    Jun 2012
    Posts
    362
    Plugin Contributions
    0

    Default Re: Fatal Error Cannot redeclare zen_js_zone_list()

    Well maybe, but I see I've got another can't redeclare function fatal error on the test server. The error log is:
    Code:
    [15-Jun-2022 13:22:12 America/New_York] PHP Fatal error:  Cannot redeclare zen_update_products_price_sorter() (previously declared in /path to admin/includes/functions/general.php:2796) in /path to store/includes/functions/functions_prices.php on line 1496
    In both cases I had the store side and admin side open in the browser in different tabs. Is this verbotten? Will this happen if a customer is browsing and I enter admin?

    A quick search for calls to the function zen_js_zone_list showed no direct calls to the function from USPS Address Validation add-in. I will try to find the steps I took to recreate the error(s).

    BTW, zc157c, php 8.0.2, mysql 8.0.28, lots of add-ins and some custom code.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    8,840
    Plugin Contributions
    118

    Default Re: Fatal Error Cannot redeclare zen_js_zone_list()

    > In both cases I had the store side and admin side open in the browser in different tabs. Is this verbotten?

    Obviously not. This works fine on an unmodified copy of Zen Cart 1.5.7d.

    If you believe you have found a bug in Zen Cart, please duplicate it on an unmodified version of Zen Cart 1.5.7d and then post repro instructions. What you are posting here is errors caused by your changes.

    If you need help fixing those, no problem - but don't post it in the Bug Reports subforum.
    That Software Guy. My Store: Zen Cart Modifications
    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. v151 Fatal error: Cannot redeclare zen_create_random_value()
    By IKZAGHET in forum General Questions
    Replies: 1
    Last Post: 17 Jan 2013, 07:43 PM
  2. v150 Fatal error: Cannot redeclare date_diff()
    By gfdesigns in forum Upgrading to 1.5.x
    Replies: 7
    Last Post: 31 Aug 2012, 08:26 PM
  3. Fatal error: Cannot redeclare process_product_name
    By nishajh in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 1 Nov 2009, 08:44 AM
  4. Cannot redeclare zen_js_zone_list()
    By doonyuen in forum General Questions
    Replies: 1
    Last Post: 3 Aug 2009, 04:40 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