Forums / Upgrading to 1.5.x / PHP Fatal error: Uncaught Error: Undefined constant "NAVBAR_TITLE_1"

PHP Fatal error: Uncaught Error: Undefined constant "NAVBAR_TITLE_1"

Views: 1,484

Results 1 to 3 of 3
24 Oct 2022, 8:22 PM
#1
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
374
Plugin Contributions:
0

PHP Fatal error: Uncaught Error: Undefined constant "NAVBAR_TITLE_1"

zc 1.58
php 8.0

My site is upgraded from zc 1.57d. I tried to checkout today and I got the blank page for the last checkout page (before I can submit the order), link is /index.php?main_page=checkout_confirmation

Here is the log file I received:

====
[24-Oct-2022 16:06:16 America/New_York] PHP Fatal error: Uncaught Error: Undefined constant "NAVBAR_TITLE_1" in /includes/modules/pages/checkout_confirmation/header_php.php:168
Stack trace:
#0 /index.php(35): require()
#1 {main}
thrown in /includes/modules/pages/checkout_confirmation/header_php.php on line 168

[24-Oct-2022 16:06:16 America/New_York] Request URI: /index.php?main_page=checkout_confirmation
--> PHP Fatal error: Uncaught Error: Undefined constant "NAVBAR_TITLE_1" in /includes/modules/pages/checkout_confirmation/header_php.php:168
Stack trace:
#0 /index.php(35): require()
#1 {main}
thrown in /includes/modules/pages/checkout_confirmation/header_php.php on line 168.

File \includes\modules\pages\checkout_confirmation\header_php.php is unchanged. Here is the code near line 168

require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
$breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2);

// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_CHECKOUT_CONFIRMATION');

I have one page checkout installed but I disabled it for this test.

24 Oct 2022, 8:42 PM
#2
swguy avatar

swguy

Administrator

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

Re: PHP Fatal error: Uncaught Error: Undefined constant "NAVBAR_TITLE_1"

See if you overrode or modified includes/languages/english/lang.checkout_confirmation.php (in either new or old style).
Without the override, this constant is defined.

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.

24 Oct 2022, 9:00 PM
#3
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
374
Plugin Contributions:
0

Re: PHP Fatal error: Uncaught Error: Undefined constant "NAVBAR_TITLE_1"

Hi @swguy, thanks for pointing me out! I indeed commented out that checkout_confirmation.php/lang.checkout_confirmation.php file. Maybe I read the OPC installation document incorrectly. I added that file back and it worked now! Thanks for your help!!