Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35
  1. #1
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default 1.5.6 > 1.5.7 define constants going crazy?

    So I'll get 2 already define's comment out the 2nd definitions,

    then get a long list of undefines?

    Any clue where to look?

  2. #2
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    Quote Originally Posted by wolfderby View Post
    So I'll get 2 already define's comment out the 2nd definitions,

    then get a long list of undefines?

    Any clue where to look?
    There were a lot of modifications done to constant definitions over the last several versions. In many cases, overrideable defines were taken to the "core" language which depending on which side of the store you are looking at makes it a little more difficult to revise the verbiage without out right creating a new define in many cases.

    Best thing to do is to look at the load sequence for language related information... This "actually" starts (a little non-descriptively) in:
    includes/init_includes/init_templates.php

    There are comments in that file that may apply to your question...

    Here, the load sequence (in Zen Cart 1.5.7) is:
    template's language override file
    core language's file
    includes/modules/YOUR_TEMPLATE/extra_definitions.php file (making it where these do not override existing definitions)
    typically then includes/modules/pages/YOUR_PAGE in loading the appropriate includes/modules/YOUR_TEMPLATE/require_languages.php
    *note* that where /YOUR_TEMPLATE is used that there may be no text and the default will be loaded.

    As far as "clearing" duplicate definitions, somewhat more appropriate would be to ignore the duplicate definitions at this time. In coming versions, the language defines will be through the use of an array where generally speaking a define wouldn't be used but instead the "current" definition would be maintained until it is overridden with yet another define. This concept would work to place the majority of definitions likely at the onset and be replaced by some override. Currently, in the case of a later definition, the first rules and the later is ignored... This also would in a way reverse the above sequence to where the more "permanent" definition would be first with overridden versions to come later/last. Note to override a definition that is either of the first two files above, the define would need to be placed in some file that will load in advance of either of those two; however, there is no earlier language specific loader...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    Code:
    [26-Jan-2021 21:25:37 Europe/Berlin] Request URI: /path/to/admin/index.php?cmd=login&camefrom=index.php, IP address: 127.0.0.1
    #1  define() called at [C:\xampp\htdocs\path\to\admin\includes\languages\english\extra_definitions\drawer_counter.php:11]
    #2  require_once(C:\xampp\htdocs\path\to\admin\includes\languages\english\extra_definitions\drawer_counter.php) called at [C:\xampp\htdocs\path\to\includes\classes\ResourceLoaders\LanguageLoader.php:66]
    #3  Zencart\LanguageLoader\LanguageLoader->loadFilesFromDirectory() called at [C:\xampp\htdocs\path\to\includes\classes\ResourceLoaders\LanguageLoader.php:44]
    #4  Zencart\LanguageLoader\LanguageLoader->loadLanguageExtraDefinitions() called at [C:\xampp\htdocs\path\to\includes\classes\ResourceLoaders\LanguageLoader.php:23]
    #5  Zencart\LanguageLoader\LanguageLoader->loadLanguageDefines() called at [C:\xampp\htdocs\path\to\admin\includes\init_includes\init_languages.php:47]
    #6  require_once(C:\xampp\htdocs\path\to\admin\includes\init_includes\init_languages.php) called at [C:\xampp\htdocs\path\to\includes\autoload_func.php:37]
    #7  require(C:\xampp\htdocs\path\to\includes\autoload_func.php) called at [C:\xampp\htdocs\path\to\admin\includes\application_top.php:37]
    #8  require(C:\xampp\htdocs\path\to\admin\includes\application_top.php) called at [C:\xampp\htdocs\path\to\admin\login.php:8]
    #9  require(C:\xampp\htdocs\path\to\admin\login.php) called at [C:\xampp\htdocs\path\to\admin\index.php:11]
    --> PHP Warning: Constant BOX_TOOLS_DRAWER_COUNTER already defined in C:\xampp\htdocs\path\to\admin\includes\languages\english\extra_definitions\drawer_counter.php on line 11.
    Last edited by wolfderby; 27 Jan 2021 at 12:09 PM.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    So, I'm not familiar with that plugin. As far as the admin side of defines, I didn't go into that review in my earlier response.

    As far as the log issue, is the define on line 11 for BOX_TOOLS_DRAWER_COUNTER duplicated elsewhere in the file or is perhaps the file located in both the core file directory *and* in the plugins/admin directory?

    Otherwise, it is possible to disable tracking of "issues" such as this by accessing: configuration->Logging->Report All Errors picking either or each Admin/Store: and changing to IgnoreDups.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    I think I had to nuke the forest by uninstalling xampp apparently you can't just move the folder. ...who knew?

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,491
    Plugin Contributions
    88

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    Quote Originally Posted by wolfderby View Post
    Code:
    [26-Jan-2021 21:25:37 Europe/Berlin] Request URI: /path/to/admin/index.php?cmd=login&camefrom=index.php, IP address: 127.0.0.1
    #1  define() called at [C:\xampp\htdocs\path\to\admin\includes\languages\english\extra_definitions\drawer_counter.php:11]
    #2  require_once(C:\xampp\htdocs\path\to\admin\includes\languages\english\extra_definitions\drawer_counter.php) called at [C:\xampp\htdocs\path\to\includes\classes\ResourceLoaders\LanguageLoader.php:66]
    #3  Zencart\LanguageLoader\LanguageLoader->loadFilesFromDirectory() called at [C:\xampp\htdocs\path\to\includes\classes\ResourceLoaders\LanguageLoader.php:44]
    #4  Zencart\LanguageLoader\LanguageLoader->loadLanguageExtraDefinitions() called at [C:\xampp\htdocs\path\to\includes\classes\ResourceLoaders\LanguageLoader.php:23]
    #5  Zencart\LanguageLoader\LanguageLoader->loadLanguageDefines() called at [C:\xampp\htdocs\path\to\admin\includes\init_includes\init_languages.php:47]
    #6  require_once(C:\xampp\htdocs\path\to\admin\includes\init_includes\init_languages.php) called at [C:\xampp\htdocs\path\to\includes\autoload_func.php:37]
    #7  require(C:\xampp\htdocs\path\to\includes\autoload_func.php) called at [C:\xampp\htdocs\path\to\admin\includes\application_top.php:37]
    #8  require(C:\xampp\htdocs\path\to\admin\includes\application_top.php) called at [C:\xampp\htdocs\path\to\admin\login.php:8]
    #9  require(C:\xampp\htdocs\path\to\admin\login.php) called at [C:\xampp\htdocs\path\to\admin\index.php:11]
    --> PHP Warning: Constant BOX_TOOLS_DRAWER_COUNTER already defined in C:\xampp\htdocs\path\to\admin\includes\languages\english\extra_definitions\drawer_counter.php on line 11.
    The files in the extra_definitions languages' sub-directory are auto-loaded; no need to re-load them.

  7. #7
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    hmmm now I'm stuck w/ "WARNING: An Error occurred, please refresh the page and try again."

  8. #8
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    admin's working, but front-end isn't throwing errors?

  9. #9
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    So I was running into an each function error w/ php 8 (which my xampp only had) so I rolled my localhost/xampp back to the php my server has, and now I'm getting that ("WARNING: An Error occurred, please refresh the page and try again.") error...

    Going to keep hacking away

    my first goal's going to be to reestablish a working copy of my live site

    then to see if I can get the merged 1.5.6 > 1.5.7 working
    Last edited by wolfderby; 27 Jan 2021 at 11:51 PM.

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    Quote Originally Posted by wolfderby View Post
    hmmm now I'm stuck w/ "WARNING: An Error occurred, please refresh the page and try again."
    https://docs.zen-cart.com/user/troub...rror_occurred/
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. v153 Please Help Im Going Crazy!!
    By NinerFaithful in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 8 Nov 2015, 03:23 AM
  2. Dang site is going crazy
    By r1formetoo in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 4 May 2009, 10:49 PM
  3. Going Crazy - Please Help!
    By mkmcgrath23 in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 9 Dec 2007, 12:38 AM
  4. Okay im going crazy
    By spjutulf in forum General Questions
    Replies: 10
    Last Post: 21 Jan 2007, 11:25 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