Results 1 to 10 of 13

Hybrid View

  1. #1
    Join Date
    Mar 2004
    Posts
    136
    Plugin Contributions
    0

    Default PHP warnings in logs directory

    ZC 1.5.6c
    PHP 7.3

    After posting another thread titled "Hundreds of Thousands of MYdebug logs" I realized afterwards that the PHP warning in those errors is pertinent.

    This is the error: "PHP Warning: Use of undefined constant SEARCH_DEFAULT_TEXT - assumed 'SEARCH_DEFAULT_TEXT' (this will throw an Error in a future version of PHP) in /usr/www/users/xxxxxx/store/includes/templates/template_default/sideboxes/tpl_search.php on line 17."

    The site was upgraded to ZC 1.5.6c from ZC 1.5.4 I believe. My client hired someone else to do the upgrade because I was not comfortable doing the upgrade for her. I did however upgrade the PHP version to 7.3 for compatibility issues she was having with her version of WordPress and related plugins.

    I'm not sure how to proceed here but am hoping this is a minor issue to fix.

  2. #2
    Join Date
    Mar 2004
    Posts
    136
    Plugin Contributions
    0

    Default Re: PHP warnings in logs directory

    ZC v1.5.6c
    PHP 7.3

    PHP Warning: Use of undefined constant SEARCH_DEFAULT_TEXT

    I found a thread on GitHub that mentioned this issue and it suggested checking to see if sideboxes/search was turned ON in admin -> tools -> layout boxes controller. Sure enough it was. I turned it off and the MYdebug errors ceased.

    But now I won't see any error logs at all? That can't be good. And of course there won't be a search function anymore in the store in the left column. So how is that a fix?

    Here is that thread in GitHub.
    https://github.com/zencart/zencart/issues/2704
    https://github.com/zencart/zencart/s...H_DEFAULT_TEXT
    Last edited by cnymike; 19 Feb 2020 at 09:03 PM.

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

    Default Re: PHP warnings in logs directory

    In includes/languages/english/YOUR_TEMPLATE/header.php
    do you have

    define('SEARCH_DEFAULT_TEXT', 'search here');
    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
    Mar 2004
    Posts
    136
    Plugin Contributions
    0

    Default Re: PHP warnings in logs directory

    I have this...

    // header Search Button/Box Search Button
    define('HEADER_SEARCH_BUTTON','Search');
    define('HEADER_SEARCH_DEFAULT_TEXT', 'Enter search keywords here');

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

    Default Re: PHP warnings in logs directory

    So that would be a "no." :)
    Go ahead and add the line I showed you.
    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.

  6. #6
    Join Date
    Mar 2004
    Posts
    136
    Plugin Contributions
    0

    Default Re: PHP warnings in logs directory

    Yes, that would be a no.

    My Custom template had old code in it. Your code has fixed the issue. Thank you.

 

 

Similar Threads

  1. v156 PHP 7.3 preg_xxxxx Warnings
    By mc12345678 in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 28 Jun 2019, 01:41 PM
  2. Replies: 38
    Last Post: 1 Nov 2018, 09:28 PM
  3. v154 dist_configure.php error on logs directory path
    By strelitzia in forum Bug Reports
    Replies: 5
    Last Post: 3 Feb 2015, 02:10 AM
  4. PHP warnings
    By LEP in forum General Questions
    Replies: 4
    Last Post: 6 Jun 2006, 10:31 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