Error 0 - Undefined constant "Y"

More
1 year 3 months ago #68944 by 7webcreator
Hello, 

I got the below error message once trying to add a module position to the template. The site is running with Joomla 4.3.3, PHP 8.1.20. Any idea how to solve it? I have tried to restore the previous backup and still have the same error message on the front-end. The back-end is working fine.

Thank youUndefined constant "Y"
/home/xxxx/public_html/templates/corporate2/index.php:286Call stack#FunctionLocation1()JROOT/templates/corporate2/index.php:2862require()JROOT/libraries/src/Document/HtmlDocument.php:7413Joomla\CMS\Document\HtmlDocument->_loadTemplate()JROOT/libraries/src/Document/HtmlDocument.php:7964Joomla\CMS\Document\HtmlDocument->_fetchTemplate()JROOT/libraries/src/Document/HtmlDocument.php:6135Joomla\CMS\Document\HtmlDocument->parse()JROOT/libraries/src/Application/CMSApplication.php:10126Joomla\CMS\Application\CMSApplication->render()JROOT/libraries/src/Application/SiteApplication.php:7247Joomla\CMS\Application\SiteApplication->render()JROOT/libraries/src/Application/CMSApplication.php:2988Joomla\CMS\Application\CMSApplication->execute()JROOT/includes/app.php:619require_once()JROOT/index.php:32

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago #68945 by ced1870
Hi
what is the code that you have Line 286 in the file templates/corporate2/index.php ?
CEd

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago - 1 year 3 months ago #68946 by 7webcreator
Thank you for your reply.
I have this code: </br> ©<?php echo date(Y); ?>
There is a class undefined too above: 
<section id="row3"  class="tck-row">
        <div class="inner">
            <div class="flexiblecolumn valign-center" id="row3column1">
    <div id="custom1" class="undefined">
        <div class="inner">
Last edit: 1 year 3 months ago by 7webcreator.

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago #68947 by ced1870
ok then check in your template you must have a custom code block in this area, update the code with
Code:
<?php echo date('Y'); ?>
(add quotes to the Y)

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago #68948 by 7webcreator
Okay! The home page is working now. However, I have a white page with the following message: [an error occurred while processing this directive] on all the other pages.

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago #68949 by ced1870
go in your admin >> config >> system >> debug >> set it to YES
then tell me if the message is more relevant

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.212 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1364 guests and 4 members online