CE Phoenix Upgrader Utility

Catalog - Call to undefined method / Admin - Undefined class - CE Phoenix Upgrader Utility

Catalog - Call to undefined method / Admin - Undefined class

by Cary » Thu May 13, 2021 6:34 pm

Any thoughts or suggestions to these errors? Upgraded from 1.0.7.7 to 1.0.8.3
Home page and admin pages are blank. I don't think it matters but running PHP 7.4.19.

[13-May-2021 13:41:53 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined method category_tree::setMaximumLevel() in /home/WEBSITE/public_html/includes/modules/content/header/cm_header_menu.php:40
Stack trace:
#0 /home/WEBSITE/public_html/includes/system/versioned/1.0.7.9/osc_template.php(106): cm_header_menu->execute()
#1 /home/WEBSITE/public_html/templates/default/includes/components/header.php(15): oscTemplate->getContent('header')
#2 /home/WEBSITE/public_html/templates/default/includes/components/template_top.php(56): require('/home/WEBSITE...')
#3 /home/WEBSITE/public_html/templates/default/includes/pages/index.php(13): require('/home/WEBSITE...')
#4 /home/WEBSITE/public_html/index.php(17): require('/home/WEBSITE...')
#5 {main}
thrown in /home/WEBSITE/public_html/includes/modules/content/header/cm_header_menu.php on line 40
[13-May-2021 13:56:12 America/New_York] PHP Fatal error: Uncaught Error: Undefined class constant 'CODE' in /home/WEBSITE/public_html/ADMIN/includes/classes/cfg_modules.php:26
Stack trace:
#0 /home/WEBSITE/public_html/ADMIN/includes/application_top.php(156): cfg_modules->__construct()
#1 /home/WEBSITE/public_html/ADMIN/login.php(16): require('/home/WEBSITE...')
#2 {main}
thrown in /home/WEBSITE/public_html/ADMIN/includes/classes/cfg_modules.php on line 26


Thanks,
Cary
- Cary
User avatar
Cary
VIP Member
VIP Member
Posts: 20
Joined: Fri Mar 12, 2021 9:36 pm
Contact:

Re: Catalog - Call to undefined method / Admin - Undefined c

by Cary » Thu May 13, 2021 6:44 pm

BTW, fantastic job on this and all your code/mods/addons! I noticed your comment in another topic for this add-on where you stated "Writing an upgrader is a risky project". I completely understand and agree with the comment. But I believe the risk is worth the payoff if it attracts more users to phoenix as an upgrade from osC or from another cart. Hopefully all the numbskulls like me don't add too much work to your plate supporting the add-on when we make a dumb mistake. Thanks again for the work you and all the contributors put into base code and add-ons!
- Cary
User avatar
Cary
VIP Member
VIP Member
Posts: 20
Joined: Fri Mar 12, 2021 9:36 pm
Contact:

Re: Catalog - Call to undefined method / Admin - Undefined c

by zipurman » Thu May 13, 2021 7:17 pm

Cary wrote:[13-May-2021 13:41:53 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined method category_tree::setMaximumLevel() in /home/WEBSITE/public_html/includes/modules/content/header/cm_header_menu.php:40
Looks like the following module needs to be updated to support the current class system:
/home/WEBSITE/public_html/includes/modules/content/header/cm_header_menu.php
Cary wrote:[13-May-2021 13:56:12 America/New_York] PHP Fatal error: Uncaught Error: Undefined class constant 'CODE' in /home/WEBSITE/public_html/ADMIN/includes/classes/cfg_modules.php:26
This error would suggest that there is a module in ADMIN/includes/modules/cfg_modules that is outdated and does not have the required constants defined. You can view the core modules in this area for the proper formatting and update any of your custom mods using that.


Hope this helps ... and thanks for the kind words with your last post ;)
zipurman
aka Preston Lord
-----------
Happy to help where I can ;)

https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
Image
User avatar
zipurman
PhoenixCart Developer
PhoenixCart Developer
Posts: 470
Joined: Tue Oct 13, 2020 5:20 pm
Contact:

Re: Catalog - Call to undefined method / Admin - Undefined c

by Cary » Thu May 13, 2021 10:27 pm

Yup. One was d30 - Hori Menu (s03e09 Horizontal Menu) and one was d21 - Tab System (s02e11 Tab System). But after uninstalling these I still have several errors I'm working on. One thing I noticed was ADMIN/includes/application_top.php

Upgrader Utility - Line 19
// autoload classes in the classes or modules directories
require DIR_FS_CATALOG . 'includes/system/autoloader.php';
require 'includes/classes/autoloader.php';
$admin_index = admin_autoloader::register();
$class_index = catalog_autoloader::register();

Fresh Install - Line 20(19 without line space)
// autoload classes in the classes or modules directories
require DIR_FS_CATALOG . 'includes/functions/autoloader.php';
require 'includes/functions/autoloader.php';
spl_autoload_register('tep_autoload_admin');
spl_autoload_register('tep_autoload_catalog');

Thoughts?
- Cary
User avatar
Cary
VIP Member
VIP Member
Posts: 20
Joined: Fri Mar 12, 2021 9:36 pm
Contact:

Re: Catalog - Call to undefined method / Admin - Undefined c

by zipurman » Thu May 13, 2021 10:52 pm

I am guessing the FRESH INSTALL you are using is not 1.0.8.3 . check /includes/version.php

Make sure you are getting your latest version from viewtopic.php?f=4&t=28
zipurman
aka Preston Lord
-----------
Happy to help where I can ;)

https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
Image
User avatar
zipurman
PhoenixCart Developer
PhoenixCart Developer
Posts: 470
Joined: Tue Oct 13, 2020 5:20 pm
Contact:

Re: Catalog - Call to undefined method / Admin - Undefined c

by Cary » Thu May 13, 2021 11:07 pm

Fresh install was my thought but I did notice when I download the Upgrader Utility file from the link here again I get the old version.
upgrader>inc>versions>1.0.8.3>files>admin>includes>application_top.php

// autoload classes in the classes or modules directories
require DIR_FS_CATALOG . 'includes/system/autoloader.php';
require 'includes/classes/autoloader.php';
$admin_index = admin_autoloader::register();
$class_index = catalog_autoloader::register();

but
upgrader>inc>versions>1.0.8.1>files>admin>includes>application_top.php
// autoload classes in the classes or modules directories
require DIR_FS_CATALOG . 'includes/functions/autoloader.php';
require 'includes/functions/autoloader.php';
spl_autoload_register('tep_autoload_admin');
spl_autoload_register('tep_autoload_catalog');

I assume 1.0.8.1 is correct. Does the installer pull the latest version from GitHub or use the latest version included in the installer download? Maybe application_top 1.0.8.3 included in the Upgrader Utility is wrong?

Thanks!
Cary
- Cary
User avatar
Cary
VIP Member
VIP Member
Posts: 20
Joined: Fri Mar 12, 2021 9:36 pm
Contact:

Re: Catalog - Call to undefined method / Admin - Undefined c

by Cary » Thu May 13, 2021 11:11 pm

Forget the comment above. I just looked at the latest from GitHub which shows the one included in Upgrader Utility....
- Cary
User avatar
Cary
VIP Member
VIP Member
Posts: 20
Joined: Fri Mar 12, 2021 9:36 pm
Contact:

Re: Catalog - Call to undefined method / Admin - Undefined c

by zipurman » Thu May 13, 2021 11:12 pm

The installer doesnt pull anything from gitgub. The installer is the /install/ directory from whichever version you download. 1.0.8.3 is correct, if you download the latest version from app.php/addons/free_addon/ce_phoenix_up ... /topic/266 you will get 1.0.8.3.

The last appication_top.php to have spl_autoload_register('tep_autoload_admin') is 1.0.8.1
zipurman
aka Preston Lord
-----------
Happy to help where I can ;)

https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
Image
User avatar
zipurman
PhoenixCart Developer
PhoenixCart Developer
Posts: 470
Joined: Tue Oct 13, 2020 5:20 pm
Contact: