If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / Not a bug: Icon_image_error

Not a bug: Icon_image_error

Locked

Started by delia on 26 Jun 2024, 1:07 PM · Views: 778

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
26 Jun 2024, 1:07 PM
#1
delia avatar

delia

Totally Zenned

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

Not a bug: Icon_image_error

2.0.1, php 8.3.8
I do know what generated the problem but message stack is glitching trying to display and simply stops due the message_stack.php file.

PHP Fatal error: Uncaught Error: Undefined constant "ICON_IMAGE_ERROR" in /includes/classes/message_stack.php:167
Stack trace:
#0 /includes/classes/message_stack.php(30): messageStack->getDefaultFormats()
#1 /includes/autoload_func.php(47): messageStack->__construct()
#2 /includes/application_top.php(253): require('/home...../2...')
#3 /index.php(25): require('/home/...../2...')
#4 {main}
thrown in /includes/classes/message_stack.php on line 167

that line is

 'error' => [
                'params' => 'class="messageStackError larger"',
                'icon' => zen_image($template->get_template_dir(ICON_IMAGE_ERROR, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_ERROR, ICON_ERROR_ALT),
            ],

and there is no define for that beyond english file for error.png

The subsequent lines also define icons so it potentially affects more situations.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

26 Jun 2024, 5:45 PM
#2
swguy avatar

swguy

Administrator

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

Re: Not a bug: Icon_image_error

For now, just set the 'icon' field to empty so we can see what the real root cause is.

'error' => [
'params' => 'class="messageStackError larger"',
'icon' => '',
],

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.

26 Jun 2024, 6:19 PM
#3
delia avatar

delia

Totally Zenned

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

Re: Not a bug: Icon_image_error

well, that was interesting. I did have to do each line but the next error is:

] PHP Fatal error: Uncaught Error: Undefined constant "HEADER_TITLE_CATALOG" in /includes/init_includes/init_add_crumbs.php:14
Stack trace:
#0 /includes/autoload_func.php(40): require_once()
#1 /includes/application_top.php(253): require('/home/.../2...')
#2 /index.php(25): require('/home/.../2...')
#3 {main}
thrown in /includes/init_includes/init_add_crumbs.php on line 1

The file that started all this was an override of the init_templates.php (trying to get the template switcher to work on 2.0). But I really don't know enough about the init files. Can a change in one impact the other? Wouldn't think so but...

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

26 Jun 2024, 7:10 PM
#4
swguy avatar

swguy

Administrator

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

Re: Not a bug: Icon_image_error

I don't know what the template switcher is - a search in the plugins library doesn't bring up anything.

Does this help?

https://docs.zen-cart.com//user/template/private_testing/

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.

26 Jun 2024, 7:19 PM
#5
delia avatar

delia

Totally Zenned

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

Re: Not a bug: Icon_image_error

No, actually. This is for demo sites only and I do have it working on a 1.5.7 site. It was originally written for 1.3.8! https://www.zen-cart.com/downloads.php?do=file&id=794 It's a good way to showcase different templates. If minor edits won't work this time, I need to give up but would prefer not to. So do you think my changes to init_templates.php can cause problems with other init files?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

26 Jun 2024, 7:21 PM
#6
swguy avatar

swguy

Administrator

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

Re: Not a bug: Icon_image_error

This uses the old language file handling. It's not going to work unless you fix that.

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.

26 Jun 2024, 7:26 PM
#7
delia avatar

delia

Totally Zenned

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

Re: Not a bug: Icon_image_error

agreed but I rely on error, fix, error - not fixing first! But due to this issue with the icon_image, I can't get to the next error. Is this an issue with 2.0 or not?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

26 Jun 2024, 7:30 PM
#8
swguy avatar

swguy

Administrator

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

Re: Not a bug: Icon_image_error

It is not an issue with 2.0. This is an issue with an old plugin that would need to be updated to work with 1.5.8+.

You can look at a copy of includes/init_includes/init_templates.php from 2.0 and see how different it is from the file in the overrides folder in this plugin.

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.