Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 35
  1. #21
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    Quote Originally Posted by DrByte View Post
    It's hard to shoot-from-the-hip when its quite unclear what the landscape is.

    Start with a fresh install of Zen Cart. Does that work without errors? Great.
    Start adding in your customizations until it breaks. There's where you need to look.

    Similar can be done by comparing your site's code against an uncustomized copy of original Zen Cart code.
    ...yeah the fresh one runs fine. I spent a day mashing, then a day debugging, so I should probably try this next day.

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

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    Quote Originally Posted by mc12345678 View Post
    What issue is it now that you are trying to resolve? Still the logging of duplicate defines? White page on admin? That strict reporting is on or is it that you want strict reporting? Something else?
    I was flying blind until I added strict reporting to the top of application_top.php

  3. #23
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    Well I'd like to note what can to some appear to be an obvious issue. In the previous listing of debug entries, the first entry has:

    Code:
    #1  require(C:\xampp\htdocs\path\to\includes\autoload_func.php) called at [C:\xampp\htdocs\path\to\admin\includes\application_top.php:172]
    What this indicates is that includes/autoload_func.php was asked to be loaded by admin/includes/application_top.php at line 172...

    Problem is... in a new ZC install of version 1.5.7, admin/includes/application_top.php only has 37 lines...

    So.... would have to explain how that discrepancy exists in order for anyone to identify what might next need to be done specifically from that point... right now, sure seems like everything is different/changed.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    thanks for all the help everyone, I have it mostly working in the admin. I had to update some add-on autoloaders. and avoid a few files. Dr. Byte's advice of slowly adding things until it breaks helped a lot!

    also leaving application_top.php as the 157 version (:

  5. #25
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    What version of Zen Cart? 1.5.7c

    Is it a new install or an upgrade? New

    What the addons/contributions you have installed? DisplayLogs (zc_plugins) and one I am developing (zc_pluggins)

    What customization's have you made? In a nutshell, I have cloned configuration.php as the framework of my plugin. It reads and displays close to 100 options I have added for downloading and preparing .csv or .xml datafeeds for integration into the catalog. It also has image management, sitemap tools, mass product mover and backup tools.

    What type of server are you using? Apache 2

    Are you installing locally? Yes

    What operating system? Ubuntu 21.04 LAMP stack (individually installed...not a package)

    What version of PHP is installed on the server? 7.4

    What version of MySQL is installed on the server? Mariadb 8

    What you were doing when your problem occurred? It happens randomly when I exit my plugin to go and look at other admin settings and visa versa.

    What are the steps to reproduce the problem? I don't know...happens randomly.

    Have you attempted to fix the problem? I have not because there are, in fact, duplicate constant definitions ... especially between responsive classic and the original zc files. You can verify, as I did, by looking up each of the duplicate constants by using the admin developers tool.

    What steps have you taken? None, other than reporting this. None of the duplicate definitions are from my plugin. So, I do not think it is connected to my plugin...could be wrong though. I just don't know...

    This is the report from DisplayLogs:

    HTML Code:
    [29-Sep-2021 09:01:55 America/New_York] Request URI: /index.php?main_page=index&cPath=3_4, IP address: 192.168.1.14
    #1 require_once(/includes/languages/english/index.php) called at [/includes/modules/require_languages.php:29]
    #2 require(/includes/modules/require_languages.php) called at [/includes/modules/pages/index/header_php.php:123]
    #3 require(/includes/modules/pages/index/header_php.php) called at [/index.php:35]
    --> PHP Notice: Constant TEXT_MAIN already defined in /includes/languages/english/index.php on line 9.
    
    [29-Sep-2021 09:01:55 America/New_York] Request URI: /index.php?main_page=index&cPath=3_4, IP address: 192.168.1.14
    #1 require_once(/includes/languages/english/index.php) called at [/includes/modules/require_languages.php:29]
    #2 require(/includes/modules/require_languages.php) called at [/includes/modules/pages/index/header_php.php:123]
    #3 require(/includes/modules/pages/index/header_php.php) called at [/index.php:35]
    --> PHP Notice: Constant TEXT_GREETING_GUEST already defined in /includes/languages/english/index.php on line 13.
    
    [29-Sep-2021 09:01:55 America/New_York] Request URI: /index.php?main_page=index&cPath=3_4, IP address: 192.168.1.14
    #1 require_once(/includes/languages/english/index.php) called at [/includes/modules/require_languages.php:29]
    #2 require(/includes/modules/require_languages.php) called at [/includes/modules/pages/index/header_php.php:123]
    #3 require(/includes/modules/pages/index/header_php.php) called at [/index.php:35]
    --> PHP Notice: Constant TEXT_GREETING_PERSONAL already defined in /includes/languages/english/index.php on line 18.
    
    [29-Sep-2021 09:01:55 America/New_York] Request URI: /index.php?main_page=index&cPath=3_4, IP address: 192.168.1.14
    #1 require_once(/includes/languages/english/index.php) called at [/includes/modules/require_languages.php:29]
    #2 require(/includes/modules/require_languages.php) called at [/includes/modules/pages/index/header_php.php:123]
    #3 require(/includes/modules/pages/index/header_php.php) called at [/index.php:35]
    --> PHP Notice: Constant TEXT_INFORMATION already defined in /includes/languages/english/index.php on line 20.
    
    [29-Sep-2021 09:01:55 America/New_York] Request URI: /index.php?main_page=index&cPath=3_4, IP address: 192.168.1.14
    #1 require_once(/includes/languages/english/index.php) called at [/includes/modules/require_languages.php:29]
    #2 require(/includes/modules/require_languages.php) called at [/includes/modules/pages/index/header_php.php:123]
    #3 require(/includes/modules/pages/index/header_php.php) called at [/index.php:35]
    --> PHP Notice: Constant HEADING_TITLE already defined in /includes/languages/english/index.php on line 53.

  6. #26
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,688
    Plugin Contributions
    9

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    lets attempt a process of deduction:

    • you have new clean version of 157c
    • you are developing a plugin for said version
    • you are getting duplicate notice errors on your "clean" install
    • no one else seems to be reporting this problem
    • you are deducing that the problem is with the base ZC.
    • hmmm....


    my guess is that something in your plugin is loading /includes/languages/english/index.php a second time.

    merely a guess....

    while unreleased versions of ZC definitely have problems with loading language files; i'm reasonably confident v157c does it properly.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #27
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    You can use your admin's Tools :: Developers ToolKit to search all catalog-side files for TEXT_GREETING_PERSONAL. That will tell you where those additional definitions are present.

  8. #28
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    Quote Originally Posted by lat9 View Post
    You can use your admin's Tools :: Developers ToolKit to search all catalog-side files for TEXT_GREETING_PERSONAL. That will tell you where those additional definitions are present.
    hmmm...developer tools searches was mentioned in my initial report. None of the reported duplicates are related to my plugin.

    I looked to see if /includes/languages/english/index.php is being called a second time.

    application_top.php, footer.php and application_bottom are the only external required files...just as it is in configuration.php (what my plugin is based on).

    I also use Zencart\FileSystem\FileSystem to extract relative and absolute file paths within my filenames.php file.

    Keep in mind, this is a zc_plugins add on that I am working on.

    Maybe I will see a pattern for when it is happening so I can pinpoint where to look.

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

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    if you want to test my hypothesis, at the top of includes/languages/english/index.php

    you can add something like:

    PHP Code:
    trigger_error('hey!!!'); 
    then you can examine the resulting log file to see if hey!!! is in there multiple times.

    the log file should also show the load order at that point, ie how it called twice.

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

  10. #30
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: 1.5.6 > 1.5.7 define constants going crazy?

    Quote Originally Posted by carlwhat View Post
    if you want to test my hypothesis, at the top of includes/languages/english/index.php

    you can add something like:

    PHP Code:
    trigger_error('hey!!!'); 
    then you can examine the resulting log file to see if hey!!! is in there multiple times.

    the log file should also show the load order at that point, ie how it called twice.

    best.
    Done...waiting to see if anything happens.

    Oh, I did have this sanitizing method enabled but have disabled to see if that is causing it.

    PHP Code:
    //MIKE - OVERRIDES TO MAKE OFF SITE IMAGES WORK
    //SEE https://docs.zen-cart.com/dev/code/admin_sanitization/admin_sanitization/
    //init_sanitize.php ALSO HAS products_previous_image REMOVED FROM FILE_DIR_REGEX SANITIZING SINCE IMAGES ARE HTTP LINKS RATHER THAN FILES
    $sanitizer AdminRequestSanitizer::getInstance();
    $group = array('products_previous_image' => array('sanitizerType' => 'PRODUCT_URL_REGEX''method' => 'both'));
    $sanitizer->addComplexSanitization($group); 
    Thanks for your help.

 

 
Page 3 of 4 FirstFirst 1234 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