Zen Cart Logo
Forums / Bug Reports / display logs title issue

display logs title issue

Views: 2,170

Results 1 to 14 of 14
19 Mar 2023, 17:19
#1
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

display logs title issue

upgrade from 1.5.6 to 1.5.8a, php 8.1

This is new issue for the display logs plugin itself? I removed the 3.01 so this is 3.02 - don't see that it was installed before. Now getting this constantly. I don't see a change in the plugin itself since I last upgraded a site to 1.5.8. What am I missing?

#0 [internal function]: zen_debug_error_handler()
#1 /zenmin/includes/init_includes/init_templates.php(49): define()
#2 /includes/autoload_func.php(40): require_once('/home/xxx/p...')
#3 /zenmin/includes/application_top.php(42): require('/home/xxxx/p...')
#4 /zc_plugins/DisplayLogs/v3.0.2/admin/display_logs.php(35): require('/home/xxx/p...')
#5 /zenmin/index.php(23): require('/home/xxx/p...')
--> PHP Warning: Constant TITLE already defined in /zenmin/includes/init_includes/init_templates.php on line 49.
19 Mar 2023, 17:45
#2
lat9 avatar

lat9

Administrator

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

Re: display logs title issue

You've apparently got an old plugin installed that (perhaps in its /extra_definitions?) defined **TITLE **for all pages. I can't remember where, but I've seen this before.

19 Mar 2023, 18:39
#3
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: display logs title issue

so irritating. I just don't see it. Cleaned up nearly everything I could think of. Can your brain come up with an example of code that would do that? What beknighted person did such a thing? This does ring a bell...but my brain is rebelling. :)

19 Mar 2023, 18:45
#4
swguy avatar

swguy

Administrator

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

Re: display logs title issue

Look in your extra folders. That's likely where it is.

./includes/extra_datafiles
./includes/languages/english/extra_definitions
./includes/extra_configures

19 Mar 2023, 18:54
#5
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: display logs title issue

I've gone thru all nearly the whole file structure starting with those folders - catalog and admin and removed all old files. Very few mods ever on this site that I've maintained for years. Whatever it is, it's hiding pretty dang well. This site will need the display logs since one mod will create logs constantly as the developer refuses to fix without payment.

19 Mar 2023, 22:34
#6
lat9 avatar

lat9

Administrator

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

Re: display logs title issue

All I can offer is that it doesn't happen on a stock zc58+ install, even with a couple of plugins (IH-5, OPC, USU, Bootstrap template and DbIo) installed.

Grab a copy of @swguy's "Mod List" plugin and report back what's installed over-and-above the base.

19 Mar 2023, 23:11
#7
swguy avatar

swguy

Administrator

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

Re: display logs title issue

If you have *nix, the search pattern would be

grep TITLE find . -name \*.php | grep define

20 Mar 2023, 05:20
#8
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: display logs title issue

Or use the Developers toolkit to search for 'TITLE' (yes include each single quote) or even more specifically define('TITLE' though that requires that the problem file/ entry used consistent formatting. In both above cases, may need to use the double quote for each of those instead of a single quote.

There may not be extra files but instead an extra entry in a file.

20 Mar 2023, 12:16
#9
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: display logs title issue

All of the error logs are designated as adm - I have been thinking because it's the display logs module. The cart is in maintenance mode and creating no error logs at all - only working in admin. So I concentrated on cleaning up admin and yesterday went thru all of the catalog as well -even removing old templates and checking the default templates to make sure there were no issues - leftovers.

Today I installed a completely clean admin with no extra files, no mods.

In searching using tool developer, nothing popped up that caught my eye.

What did happen when I logged in to the new admin (without deleting the old) was this:

[20-Mar-2023 11:53:58 UTC] Request URI: /zenmin-clean/index.php?cmd=login, IP address: 76.179.90.49, Language id 1
#0 /zenmin-clean/includes/functions/admin_access.php(304): zen_debug_error_handler()
#1 /zenmin-clean/login.php(34): zen_validate_user_login()
#2 /zenmin-clean/index.php(11): require('/home/xxxxx/p...')
--> PHP Warning: Undefined array key 1 in /zenmin-clean/includes/functions/admin_access.php on line 304.

So then I installed a completely new version in a subfolder with no template, no mods, but with the same database. The same two error logs after logging in. admin-access and title with init-templates.

So not a mod. Not a leftover odd file. Not a template.

Since it's generating log files with every move in admin -including 2 each time the logs files are deleted while in the display module, this is not tenable. Are we all out of ideas? This is on cpanel hosting I've used in the past but not often, not my usual hosting. I can't see how that might matter but I figured I would thrown that in.

20 Mar 2023, 14:02
#10
carlwhat avatar

carlwhat

zennedOut

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

Re: display logs title issue

swguy:

If you have *nix, the search pattern would be

grep TITLE find . -name \*.php | grep define

considering the problem is (probably) with a pre-v158 language file, i would think the following code would provide a far smaller result set:

grep -rin define..TITLE.\, *
22 Mar 2023, 11:54
#11
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: display logs title issue

okay, doing a default install on the original database with NO custom template - leaving it to show the template default does not stop this issue.

It's not a template file, it's not an errant old file. The only left is the database but I can't see how anything there can cause these warnings. Maybe this is just an odd happening - over the years I've seen a lot of strangeness from an old database and I can certainly give the cart owner instructions just to the error logs regularly - for me it's really a great indicator for some clients do some cleanup or easy maintenance.

But as we are dealing with the new version, I think we should go deeper into this and I'm at the end of my ideas. Shall I just let this die?

22 Mar 2023, 15:13
#12
lat9 avatar

lat9

Administrator

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

Re: display logs title issue

Check the database's **configuration **table for any **configuration_key **value(s) that are equal to TITLE.

22 Mar 2023, 15:24
#13
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: display logs title issue

one - same one I use on every site. No issue on previous 3 upgrades.

22 Mar 2023, 16:42
#14
lat9 avatar

lat9

Administrator

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

Re: display logs title issue

Look through the database's **admin **table for the values in the **reset_token **field.

Each field should be either an empty string or a string that looks like nnnn}aaaa, where nnnn is a string of numbers and aaaa is a string of alphanumerics. The connecting } is required and is, most likely, missing ... which is your underlying issue.