Forums / Upgrading to 1.5.x / A few errors about defines: "PHP Warning: Use of undefined constant ..."

A few errors about defines: "PHP Warning: Use of undefined constant ..."

Views: 17,876

Results 1 to 20 of 33
20 Dec 2018, 11:23 AM
#1
cvhainb avatar

cvhainb

Zen Follower

Join Date:
Sep 2008
Posts:
212
Plugin Contributions:
19

A few errors about defines: "PHP Warning: Use of undefined constant ..."

Hi there,

I had upgraded 2 sites with the latest version of zc 1.5.6 + PHP 7.3 and I see many errors. Most of errors are from the languages. There are many missing language in the new version. Error details:

tpl_checkout_success_default.php (missed define language)
Disable a category in admin (missed define langguage)
[20-Dec-2018 11:20:35 UTC] PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_GV_STATUS - assumed 'MODULE_ORDER_TOTAL_GV_STATUS' (this will throw an Error in a future version of PHP) in /home/roidseur/public_html/includes/templates/template_default/templates/tpl_site_map_default.php on line 64 (popular error when use with PHP 7.3)

I will update errors when I see a new. I am tracking on the sites.

Best Regards,

Our Site: http://zucando.com
Marketing Plugins: Marketing Modules
Free Response Templates: Responsive Templates

20 Dec 2018, 1:15 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

Working on it. Please continue reporting.

That Software Guy. My Store: Zen Cart Support
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.

20 Dec 2018, 1:25 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

Note though that it seems like in the discussion of code that these are warnings that are generated because "mistakes" were made. If execution is stopped and the logged message(s) indicate an error, then that's different but I'm in full agreement with swguy to continue reporting new logged items not otherwise identified.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Dec 2018, 1:33 PM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

This is completely wrong. The whole point of 1.5.6 was interoperability with PHP 7.2+. We should finish the job.

That Software Guy. My Store: Zen Cart Support
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.

20 Dec 2018, 1:40 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

swguy:

This is completely wrong. The whole point of 1.5.6 was interoperability with PHP 7.2+. We should finish the job.
That it was released with 7.3 causing the issues that have been identified, agree. There has been a request for quite a while for others to be trying to operate under 1.5.6 and identify issues, though I'll say that while I've been doing that the last file update I did was a few months ago and my test environment doesn't have php 7.3 currently in place, so I certainly haven't been helping from that perspective.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Dec 2018, 2:39 PM
#6
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

cvhainb:

  1. tpl_checkout_success_default.php (missed define language)
  2. Disable a category in admin (missed define langguage)
  3. [20-Dec-2018 11:20:35 UTC] PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_GV_STATUS - assumed 'MODULE_ORDER_TOTAL_GV_STATUS' (this will throw an Error in a future version of PHP) in /home/roidseur/public_html/includes/templates/template_default/templates/tpl_site_map_default.php on line 64 (popular error when use with PHP 7.3)
  1. Fixed
    https://github.com/zencart/zencart/pull/1939

  2. Fixed
    https://github.com/zencart/zencart/pull/1936

  3. Fixed
    https://github.com/zencart/zencart/pull/1937

That Software Guy. My Store: Zen Cart Support
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.

20 Dec 2018, 2:48 PM
#7
cvhainb avatar

cvhainb

Zen Follower

Join Date:
Sep 2008
Posts:
212
Plugin Contributions:
19

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

[20-Dec-2018 14:40:24 UTC] Request URI: /site-map-page, IP address: 66.249.66.84
#1 require(/home/roidseur/public_html/includes/templates/template_default/templates/tpl_site_map_default.php) called at [/home/roidseur/public_html/includes/templates/zucando_free_2018/common/tpl_main_page.php:127]
#2 require(/home/roidseur/public_html/includes/templates/zucando_free_2018/common/tpl_main_page.php) called at [/home/roidseur/public_html/index.php:97]
[20-Dec-2018 14:40:24 UTC] PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_GV_STATUS - assumed 'MODULE_ORDER_TOTAL_GV_STATUS' (this will throw an Error in a future version of PHP) in /home/roidseur/public_html/includes/templates/template_default/templates/tpl_site_map_default.php on line 64

Our Site: http://zucando.com
Marketing Plugins: Marketing Modules
Free Response Templates: Responsive Templates

20 Dec 2018, 2:50 PM
#8
cvhainb avatar

cvhainb

Zen Follower

Join Date:
Sep 2008
Posts:
212
Plugin Contributions:
19

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

I will continue to track and let you know if see anything else. Thank you so much.

Our Site: http://zucando.com
Marketing Plugins: Marketing Modules
Free Response Templates: Responsive Templates

20 Dec 2018, 3:02 PM
#9
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

That issue was fixed by change #3 above.

That Software Guy. My Store: Zen Cart Support
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.

19 Feb 2019, 5:26 PM
#10
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

swguy:

This is completely wrong. The whole point of 1.5.6 was interoperability with PHP 7.2+. We should finish the job.

Im getting loads of warning popping up when viewing cart page from your modules, 1.5.6 and php 7, do i need to move the file locations of the english defines?

[19-Feb-2019 17:23:38 UTC] Request URI: /index.php?main_page=shopping_cart, IP address: ::1
#1  ot_bigspender_discount->ot_bigspender_discount() called at [D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bs.php:67]
#2  include_once(D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bs.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php:196]
#3  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php:139]
#4  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php) called at [D:\Server\data\htdocs\index.php:97]
--> PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_BIGSPENDER_DISCOUNT_TITLE - assumed 'MODULE_ORDER_TOTAL_BIGSPENDER_DISCOUNT_TITLE' (this will throw an Error in a future version of PHP) in D:\Server\data\htdocs\includes\modules\order_total\ot_bigspender_discount.php on line 150.

[19-Feb-2019 17:23:38 UTC] Request URI: /index.php?main_page=shopping_cart, IP address: ::1
#1  ot_bigspender_discount->ot_bigspender_discount() called at [D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bs.php:67]
#2  include_once(D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bs.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php:196]
#3  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php:139]
#4  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php) called at [D:\Server\data\htdocs\index.php:97]
--> PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_BIGSPENDER_DISCOUNT_DESCRIPTION - assumed 'MODULE_ORDER_TOTAL_BIGSPENDER_DISCOUNT_DESCRIPTION' (this will throw an Error in a future version of PHP) in D:\Server\data\htdocs\includes\modules\order_total\ot_bigspender_discount.php on line 151.

[19-Feb-2019 17:23:38 UTC] Request URI: /index.php?main_page=shopping_cart, IP address: ::1
#1  ot_big_chooser->ot_big_chooser() called at [D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bc.php:5]
#2  include_once(D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bc.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php:197]
#3  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php:139]
#4  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php) called at [D:\Server\data\htdocs\index.php:97]
--> PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_BIG_CHOOSER_TITLE - assumed 'MODULE_ORDER_TOTAL_BIG_CHOOSER_TITLE' (this will throw an Error in a future version of PHP) in D:\Server\data\htdocs\includes\modules\order_total\ot_big_chooser.php on line 220.

[19-Feb-2019 17:23:38 UTC] Request URI: /index.php?main_page=shopping_cart, IP address: ::1
#1  ot_big_chooser->ot_big_chooser() called at [D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bc.php:5]
#2  include_once(D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bc.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php:197]
#3  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php:139]
#4  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php) called at [D:\Server\data\htdocs\index.php:97]
--> PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_BIG_CHOOSER_DESCRIPTION - assumed 'MODULE_ORDER_TOTAL_BIG_CHOOSER_DESCRIPTION' (this will throw an Error in a future version of PHP) in D:\Server\data\htdocs\includes\modules\order_total\ot_big_chooser.php on line 221.

[19-Feb-2019 17:23:38 UTC] Request URI: /index.php?main_page=shopping_cart, IP address: ::1
#1  ot_big_chooser->ot_big_chooser() called at [D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bc.php:5]
#2  include_once(D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bc.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php:197]
#3  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php:139]
#4  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php) called at [D:\Server\data\htdocs\index.php:97]
--> PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_BIG_CHOOSER_SORT_ORDER - assumed 'MODULE_ORDER_TOTAL_BIG_CHOOSER_SORT_ORDER' (this will throw an Error in a future version of PHP) in D:\Server\data\htdocs\includes\modules\order_total\ot_big_chooser.php on line 222.

[19-Feb-2019 17:23:38 UTC] Request URI: /index.php?main_page=shopping_cart, IP address: ::1
#1  ot_big_chooser->ot_big_chooser() called at [D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bc.php:5]
#2  include_once(D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bc.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php:197]
#3  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php:139]
#4  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php) called at [D:\Server\data\htdocs\index.php:97]
--> PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_BIG_CHOOSER_INC_TAX - assumed 'MODULE_ORDER_TOTAL_BIG_CHOOSER_INC_TAX' (this will throw an Error in a future version of PHP) in D:\Server\data\htdocs\includes\modules\order_total\ot_big_chooser.php on line 223.

[19-Feb-2019 17:23:38 UTC] Request URI: /index.php?main_page=shopping_cart, IP address: ::1
#1  ot_big_chooser->ot_big_chooser() called at [D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bc.php:5]
#2  include_once(D:\Server\data\htdocs\includes\modules\BBR_NEW\inc_bc.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php:197]
#3  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\templates\tpl_shopping_cart_default.php) called at [D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php:139]
#4  require(D:\Server\data\htdocs\includes\templates\BBR_NEW\common\tpl_main_page.php) called at [D:\Server\data\htdocs\index.php:97]
--> PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_BIG_CHOOSER_CALC_TAX - assumed 'MODULE_ORDER_TOTAL_BIG_CHOOSER_CALC_TAX' (this will throw an Error in a future version of PHP) in D:\Server\data\htdocs\includes\modules\order_total\ot_big_chooser.php on line 224.
19 Feb 2019, 5:32 PM
#11
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

These warnings are coming from my mods. You need the updates to my mods to get the PHP7 changes. Go to my store and get them.

That Software Guy. My Store: Zen Cart Support
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.

7 Mar 2019, 2:34 AM
#12
mariemeh avatar

mariemeh

New Zenner

Join Date:
Mar 2019
Location:
Montreal
Posts:
39
Plugin Contributions:
0

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

v156a and php 7.2

I get these:

PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../admin/includes/functions/extra_functions/edit_orders_functions.php on line 662.

PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPAL_TESTING - assumed 'MODULE_PAYMENT_PAYPAL_TESTING' (this will throw an Error in a future version of PHP) in .../includes/init_includes/init_header.php on line 27.

PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in .../includes/templates/template_default/templates/tpl_modules_shipping_estimator.php on line 134.

Are they all related to the same issue and is it bad for shopping cart for me to change to php 7.1 and avoid all that?

8 Mar 2019, 12:01 PM
#13
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

This one

PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../admin/includes/functions/extra_functions/edit_orders_functions.php on line 662.

is coming from Edit Orders, but line 662 of the current version of the file does not reference the **count **function.

I'll suggest that you take that discussion to the plugin's support thread (https://www.zen-cart.com/showthread.php?200407), with the identification of the version of EO that you are currently using.

24 Jan 2020, 9:47 PM
#14
speak394 avatar

speak394

New Zenner

Join Date:
Mar 2018
Location:
Alabama
Posts:
61
Plugin Contributions:
0

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

I am using 1.5.6b
php version 7.2.24

My log files are filled with the following. And this is being recorded about every 2 to 3 minutes.

[24-Jan-2020 21:03:06 UTC] Request URI: /index.php?main_page=cookie_usage, IP address: 46.229.168.139
#1 require(/home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php) called at [/home/uni48fg5k150/public_html/includes/modules/column_left.php:31]
#2 require(/home/uni48fg5k150/public_html/includes/modules/column_left.php) called at [/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#3 require(/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/uni48fg5k150/public_html/index.php:97]
--> PHP Warning: Use of undefined constant DEFINE_SHIPPINGINFO_STATUS - assumed 'DEFINE_SHIPPINGINFO_STATUS' (this will throw an Error in a future version of PHP) in /home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php on line 14.

[24-Jan-2020 21:03:06 UTC] Request URI: /index.php?main_page=cookie_usage, IP address: 46.229.168.139
#1 require(/home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php) called at [/home/uni48fg5k150/public_html/includes/modules/column_left.php:31]
#2 require(/home/uni48fg5k150/public_html/includes/modules/column_left.php) called at [/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#3 require(/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/uni48fg5k150/public_html/index.php:97]
--> PHP Warning: Use of undefined constant DEFINE_PRIVACY_STATUS - assumed 'DEFINE_PRIVACY_STATUS' (this will throw an Error in a future version of PHP) in /home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php on line 17.

[24-Jan-2020 21:03:06 UTC] Request URI: /index.php?main_page=cookie_usage, IP address: 46.229.168.139
#1 require(/home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php) called at [/home/uni48fg5k150/public_html/includes/modules/column_left.php:31]
#2 require(/home/uni48fg5k150/public_html/includes/modules/column_left.php) called at [/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#3 require(/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/uni48fg5k150/public_html/index.php:97]
--> PHP Warning: Use of undefined constant DEFINE_CONDITIONS_STATUS - assumed 'DEFINE_CONDITIONS_STATUS' (this will throw an Error in a future version of PHP) in /home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php on line 20.

[24-Jan-2020 21:03:06 UTC] Request URI: /index.php?main_page=cookie_usage, IP address: 46.229.168.139
#1 require(/home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php) called at [/home/uni48fg5k150/public_html/includes/modules/column_left.php:31]
#2 require(/home/uni48fg5k150/public_html/includes/modules/column_left.php) called at [/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#3 require(/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/uni48fg5k150/public_html/index.php:97]
--> PHP Warning: Use of undefined constant DEFINE_CONTACT_US_STATUS - assumed 'DEFINE_CONTACT_US_STATUS' (this will throw an Error in a future version of PHP) in /home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php on line 23.

[24-Jan-2020 21:03:06 UTC] Request URI: /index.php?main_page=cookie_usage, IP address: 46.229.168.139
#1 require(/home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php) called at [/home/uni48fg5k150/public_html/includes/modules/column_left.php:31]
#2 require(/home/uni48fg5k150/public_html/includes/modules/column_left.php) called at [/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#3 require(/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/uni48fg5k150/public_html/index.php:97]
--> PHP Warning: Use of undefined constant DEFINE_SITE_MAP_STATUS - assumed 'DEFINE_SITE_MAP_STATUS' (this will throw an Error in a future version of PHP) in /home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php on line 32.

[24-Jan-2020 21:03:06 UTC] Request URI: /index.php?main_page=cookie_usage, IP address: 46.229.168.139
#1 require(/home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php) called at [/home/uni48fg5k150/public_html/includes/modules/column_left.php:31]
#2 require(/home/uni48fg5k150/public_html/includes/modules/column_left.php) called at [/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:136]
#3 require(/home/uni48fg5k150/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/uni48fg5k150/public_html/index.php:97]
--> PHP Warning: Use of undefined constant DEFINE_DISCOUNT_COUPON_STATUS - assumed 'DEFINE_DISCOUNT_COUPON_STATUS' (this will throw an Error in a future version of PHP) in /home/uni48fg5k150/public_html/includes/modules/sideboxes/information.php on line 41.

24 Jan 2020, 10:11 PM
#15
speak394 avatar

speak394

New Zenner

Join Date:
Mar 2018
Location:
Alabama
Posts:
61
Plugin Contributions:
0

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

This is the /includes/modules/sideboxes/information.php

<?php /** * information sidebox - displays list of general info links, as defined in this file * * @package templateSystem * @copyright Copyright 2003-2019 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: DrByte 2019 Jan 04 Modified in v1.5.6a $ */ unset($information); if (DEFINE_SHIPPINGINFO_STATUS <= 1) { $information[] = '<a href="' . zen_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a>'; } if (DEFINE_PRIVACY_STATUS <= 1) { $information[] = '<a href="' . zen_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a>'; } if (DEFINE_CONDITIONS_STATUS <= 1) { $information[] = '<a href="' . zen_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a>'; } if (DEFINE_CONTACT_US_STATUS <= 1) { $information[] = '<a href="' . zen_href_link(FILENAME_CONTACT_US, '', 'SSL') . '">' . BOX_INFORMATION_CONTACT . '</a>'; } // forum/bb link: if (!empty($external_bb_url) && !empty($external_bb_text)) { $information[] = '<a href="' . $external_bb_url . '" target="_blank">' . $external_bb_text . '</a>'; } if (DEFINE_SITE_MAP_STATUS <= 1) { $information[] = '<a href="' . zen_href_link(FILENAME_SITE_MAP) . '">' . BOX_INFORMATION_SITE_MAP . '</a>'; } // only show GV FAQ when installed if (defined('MODULE_ORDER_TOTAL_GV_STATUS') && MODULE_ORDER_TOTAL_GV_STATUS == 'true') { $information[] = '<a href="' . zen_href_link(FILENAME_GV_FAQ) . '">' . BOX_INFORMATION_GV . '</a>'; } // only show Discount Coupon FAQ when installed if (DEFINE_DISCOUNT_COUPON_STATUS <= 1 && defined('MODULE_ORDER_TOTAL_COUPON_STATUS') && MODULE_ORDER_TOTAL_COUPON_STATUS == 'true') { $information[] = '<a href="' . zen_href_link(FILENAME_DISCOUNT_COUPON) . '">' . BOX_INFORMATION_DISCOUNT_COUPONS . '</a>'; } if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK == 'true') { $information[] = '<a href="' . zen_href_link(FILENAME_UNSUBSCRIBE) . '">' . BOX_INFORMATION_UNSUBSCRIBE . '</a>'; } require($template->get_template_dir('tpl_information.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_information.php'); $title = BOX_HEADING_INFORMATION; $title_link = false; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
24 Jan 2020, 11:03 PM
#16
speak394 avatar

speak394

New Zenner

Join Date:
Mar 2018
Location:
Alabama
Posts:
61
Plugin Contributions:
0

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

I changed from php 7.2 to 7.1. Have not had an error in the last hour.

25 Jan 2020, 2:00 PM
#17
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

Speak394:

I changed from php 7.2 to 7.1. Have not had an error in the last hour.
The 'defines' that are (er) not defined should be present in your database's settings for Configuration->Define Page Settings.

What's the history of the site, i.e. did it start out as zc156b or was it upgraded?

If you navigate to your admin's Tools->Developers Tool Kit and enter DEFINE_SHIPPINGINFO_STATUS into the top search form (Look up CONSTANT or language defines), what are the results when you click the Execute Search button?

25 Jan 2020, 3:47 PM
#18
speak394 avatar

speak394

New Zenner

Join Date:
Mar 2018
Location:
Alabama
Posts:
61
Plugin Contributions:
0

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

lat9:

The 'defines' that are (er) not defined should be present in your database's settings for Configuration->Define Page Settings.

What's the history of the site, i.e. did it start out as zc156b or was it upgraded?

If you navigate to your admin's Tools->Developers Tool Kit and enter DEFINE_SHIPPINGINFO_STATUS into the top search form (Look up CONSTANT or language defines), what are the results when you click the Execute Search button?

It started as a fresh install.

27 Jan 2020, 4:29 PM
#19
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

your install failed... look at the install logs. those undefined constants should be in your database. they are not. that's why the error/warning is being reported.

downgrading the version of php is not a solution. it is a temporary bandaid. php 7.1 does NOT report those errors. that's why the log files stopped.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

1 May 2020, 7:32 PM
#20
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,870
Plugin Contributions:
19

Re: A few errors about defines: "PHP Warning: Use of undefined constant ..."

swguy:

  1. Fixed
    https://github.com/zencart/zencart/pull/1939

  2. Fixed
    https://github.com/zencart/zencart/pull/1936

  3. Fixed
    https://github.com/zencart/zencart/pull/1937The tpl_modules_mobile_menu.php fixes were not carried forward to 1.5.7.
    Nor was the fix in 1936

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com