Results 1 to 5 of 5
  1. #1
    Join Date
    May 2007
    Posts
    124
    Plugin Contributions
    0

    Default 1.5.6c new install, PHP Notice:Constant TEXT_GV_REDEEM already defined

    25-Dec-2019 19:45:27 UTC] Request URI: /admin/display_logs.php, IP address: 101.20.166.42
    #1 define() called at [/home/teerific/public_html/admin/includes/languages/english.php:87]
    #2 require(/home/teerific/public_html/admin/includes/languages/english.php) called at [/home/teerific/public_html/admin/includes/init_includes/init_languages.php:53]
    #3 require(/home/teerific/public_html/admin/includes/init_includes/init_languages.php) called at [/home/teerific/public_html/includes/autoload_func.php:48]
    #4 require(/home/teerific/public_html/includes/autoload_func.php) called at [/home/teerific/public_html/admin/includes/application_top.php:171]
    #5 require(/home/teerific/public_html/admin/includes/application_top.php) called at [/home/teerific/public_html/admin/display_logs.php:35]
    --> PHP Notice: Constant TEXT_GV_REDEEM already defined in /home/teerific/public_html/admin/includes/languages/english.php on line 87.
    PHP 5.6
    Westminster_New template installed with 'Display Logs' and 'report all Errors' modules installed.
    Any suggestions
    Thanx
    Mike

  2. #2
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,690
    Plugin Contributions
    9

    Default Re: Zencart 1.5.6c new install, PHP Notice:Constant TEXT_GV_REDEEM already defined

    Quote Originally Posted by mikebr View Post
    PHP 5.6
    Westminster_New template installed with 'Display Logs' and 'report all Errors' modules installed.
    Any suggestions
    Thanx
    Mike
    definite bug in the code. you can see that code here:

    https://github.com/zencart/zencart/b...sh.php#L81-L88

    and the file that it references has the same define here:

    https://github.com/zencart/zencart/b...v_name.php#L13

    i would comment out line 87 by adding a couple of slashes to the that line. it should look like

    PHP Code:
    // define('TEXT_GV_REDEEM','Redemption Code'); 
    and you should be fine.

    as a side note, php 5.6 is end of life. would consider upgrading to 7.x

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

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

    Default Re: Zencart 1.5.6c new install, PHP Notice:Constant TEXT_GV_REDEEM already defined

    This doesn't seem like the right fix. In 1.5.7, that define is *only* in admin/includes/languages/english.php. But other changes were needed to support that, so you'd be better of just doing if !defined() in both places until 1.5.7 is released.
    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.

  4. #4
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: Zencart 1.5.6c new install, PHP Notice:Constant TEXT_GV_REDEEM already defined

    you'd be better of just doing if !defined() in both places
    Agreed, it's a chicken-egg thing for now.

    In my opinion using "Report All Errors" is essential for a pre-warning of future issues, ... but it's a long road to get a 156 site to where it does not report anything apart from Dups...something to switch on/deal with in your spare time!

    And since most things have been reported and fixed in ZC157 already, maybe it is pointless to polish 156 now in this respect...
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

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

    Default Re: Zencart 1.5.6c new install, PHP Notice:Constant TEXT_GV_REDEEM already defined

    If OP needs Report all Errors to work to debug his own stuff, he may need to make tweaks like this. But yes, I agree that if this functionality is not absolutely needed, it's better to just wait on 1.5.7. Thanks to your diligent bug reporting, Steve, we have greatly improved the code quality in 1.5.7.
    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. v155 adding constants - PHP Notice: Use of undefined constant
    By torvista in forum Contribution-Writing Guidelines
    Replies: 0
    Last Post: 4 May 2016, 07:07 AM
  2. Replies: 0
    Last Post: 10 May 2013, 04:11 PM
  3. Replies: 2
    Last Post: 31 Aug 2010, 01:32 AM
  4. Notice: Use of undefined constant
    By infocom in forum General Questions
    Replies: 2
    Last Post: 22 Apr 2010, 08:35 PM
  5. Constant already defined
    By David Allen in forum General Questions
    Replies: 3
    Last Post: 16 Apr 2008, 03:56 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR