Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
Author « Topic »  

1818charlie
ECT Moderator

United Kingdom
1198 Posts

Posted - 12/17/2021 :  04:13:20  
The website in question that this error refers to is functiong / looking fine. I noticed this am an error log file in the site root files. This has only shown up since the site was updated during the very early hours of the 17th to v 7.45.001.

Is the error in a change/error in one of the latest updated files, is the $rootcategorytitle now redundant or do I need to amend at the site end?

The site is running PHP v 8.0.12 & MariaDB 10.3.32

Error log entry

[17-Dec-2021 09:51:39 UTC] PHP Warning: Undefined variable $rootcategorytitle in /home/ma13y/public_html/categories.php on line 17

Web browser page source code

<!DOCTYPE html><html lang="en"><!-- #BeginTemplate "/Templates/main.dwt" --><!-- DW6 -->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- #BeginEditable "doctitle" -->
<title><br />
<b>Warning</b>: Undefined variable $rootcategorytitle in <b>/home/ma13y/public_html/categories.php</b> on line <b>17</b><br /> LINE 17
</title>
<meta property="og:title" content="<br />
<b>Warning</b>: Undefined variable $rootcategorytitle in <b>/home/ma13y/public_html/categories.php</b> on line <b>21</b><br /> LINE 21
">


Steve
Bolton Lancashire

Edited by - 1818charlie on 12/19/2021 10:32:31

Vince
Administrator

42874 Posts

Posted - 12/17/2021 :  04:36:36  
Hi Steve
This looks like it is something that is in the page title generation code in the categories.php page itself. If this variable isn't set you can suppress warnings by preceding it with an "@", for instance...

@$rootcategorytitle

But maybe it would be good to look at what the code is doing and why the variable isn't defined. Post it here if you like and we can take a look.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

1818charlie
ECT Moderator

United Kingdom
1198 Posts

Posted - 12/17/2021 :  04:48:05  
Cheers Vince

I will update later when back at HQ

Steve
Bolton Lancashire

1818charlie
ECT Moderator

United Kingdom
1198 Posts

Posted - 12/17/2021 :  18:42:48  
Hi Vince

This is the categories.php page head content. The date of the file shows as last modified 12 days later than I have documented for when it was last edited.

I don't currently have the template files at my location so I can't actually compare. I don't recall having seen the rootcategorytitle in any of the templates I've worked on over the years. There are no entries at all in the includes.php file with rootcategorytitle either.

<?php
session_cache_limiter('none');
session_start();
ob_start();
include "vsadmin/db_conn_open.php";
include "vsadmin/inc/languagefile.php";
include "vsadmin/includes.php";
include "vsadmin/inc/incfunctions.php";
include "vsadmin/inc/metainfo.php";?><!DOCTYPE html><html lang="en"><!-- #BeginTemplate "/Templates/main.dwt" --><!-- DW6 -->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- #BeginEditable "doctitle" -->
<title><?php
if(!empty($pagetitle)) {print $pagetitle;}
else if(!empty($sectionname)) {print $sectionname . ' | ' . $sitenamelong;}
else {print $rootcategorytitle;} ?></title>
<meta property="og:title" content="<?php
if(!empty($pagetitle)) {print $pagetitle;}
else if(!empty($sectionname)) {print $sectionname . ' | ' . $sitenamelong;}
else {print $rootcategorytitle;} ?>">
<meta name="Description" content="<?php print str_replace('"','"',$sectiondescription)?>">
<!-- #EndEditable -->
<?php include "vsadmin/inc/incectstyle.php"; ?>
<link href="css/style.css" rel="stylesheet">
<link href="css/custom.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" />
<!-- JS -->
<!-- #BeginEditable "head" -->

<!-- #EndEditable -->
<script>
ect_megamenu('#FF0000');
</script>
<script src="js/fixed.js"></script>
<script src="js/ectsearch.js"></script>
</head>


Steve
Bolton Lancashire

Edited by - 1818charlie on 12/17/2021 18:51:45

insight
ECT Moderator

USA
4479 Posts

Posted - 12/17/2021 :  19:28:41  
You need to define it in vsadmin/includes.php, something like one or other of these lines:

$rootcategorytitle='Title you want on the root category page';
$GLOBALS['rootcategorytitle']='Title you want on the root category page';

Peter


Professional ecommerce web hosting services
Shared hosting Windows & Linux | Dedicated servers | Domains | SSL
Ecommerce Templates specialists since 2003
https://servelink.com

Edited by - insight on 12/17/2021 19:29:58

ITZAP
Ecommerce Template Guru

Australia
1018 Posts

Posted - 12/17/2021 :  20:47:39  
The directions for "Advanced categories.php settings" are here >>

Gary

1818charlie
ECT Moderator

United Kingdom
1198 Posts

Posted - 12/19/2021 :  10:32:08  
I have spoken to the site owner who admits to having changed a few things since the site went live in April.

All is now sorted & no more errors.

Thanks to Vince, Peter & Gary

Steve
Bolton Lancashire
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000