Error 0 - Undefined constant "Y"

Error 0 - Undefined constant "Y" was created by 7webcreator

Posted 9 months 5 days ago #68944
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.

Replied by ced1870 on topic Error 0 - Undefined constant "Y"

Posted 9 months 5 days ago #68945
Hi
what is the code that you have Line 286 in the file templates/corporate2/index.php ?
CEd

Joomlack Webmaster and Developer

by ced1870

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

Replied by 7webcreator on topic Error 0 - Undefined constant "Y"

Posted 9 months 5 days ago #68946
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:9 months 5 days ago by 7webcreator
Last edit: 9 months 5 days ago by 7webcreator.

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

Replied by ced1870 on topic Error 0 - Undefined constant "Y"

Posted 9 months 5 days ago #68947
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

by ced1870

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

Replied by 7webcreator on topic Error 0 - Undefined constant "Y"

Posted 9 months 5 days ago #68948
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.

Replied by ced1870 on topic Error 0 - Undefined constant "Y"

Posted 9 months 5 days ago #68949
go in your admin >> config >> system >> debug >> set it to YES
then tell me if the message is more relevant

Joomlack Webmaster and Developer

by ced1870

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

Time to create page: 0.707 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 677 guests and no members online