Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Admin System Configuration Design Footer Copyright Bug
 
bw2008
Member
 
Total Posts:  39
Joined:  2008-06-21
 

If you modify the input in Magento Admin>System>Configuration>Design>Footer (Copyright), the frontend will display

©
as
©
instead of
©

It seems that this Footer input section outputs plain text only. No HTML nor PHP code is supported here. Therefore, it is not possible to use PHP date function like date(’Y’) for the Footer input.

Hopefully, the Magento team can fix this bug soon.

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1093
Joined:  2008-07-16
London, United Kingdom
 

post it as a bug here http://www.magentocommerce.com/bug-tracking/report/

 
Magento Community Magento Community
Magento Community
Magento Community
 
clorne
Sr. Member
 
Total Posts:  236
Joined:  2008-01-10
London
 

Has anyone an answer to this?

Of the three v1.1.2 sites I’m using two display

©
and the other displays the © correctly

Not sure it’s a bug but I am trying to trace the reason and I will post if successful

 
Magento Community Magento Community
Magento Community
Magento Community
 
clorne
Sr. Member
 
Total Posts:  236
Joined:  2008-01-10
London
 

If you are using PHP Version 5.2.6 or later the Magento copyright section does not display HTML characters correctly.

The PHP people have made a few changes to “htmlspecialchars” in these later versions which may or may not be the reason-I don’t know.

issue #6346

 
Magento Community Magento Community
Magento Community
Magento Community
 
connor2k
Jr. Member
 
Total Posts:  14
Joined:  2008-08-06
 

I’m having the same problem now, I am surprised there is not a newer response to this or a fix.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michal_s
Sr. Member
 
Total Posts:  111
Joined:  2008-05-15
The Netherlands
 

have you even tried just copy pasting © instead of the specialchar code… because it works for me! and for the date, why not just use a simple javascript code… come on guys be creative and use your knowledge

 
Magento Community Magento Community
Magento Community
Magento Community
 
clorne
Sr. Member
 
Total Posts:  236
Joined:  2008-01-10
London
 

Yes you are right there is absolutely no problem in overcoming this small problem but the real question is why this is happening.

We know that this only happens with PHP version 5.2.6 and above. 

We also know that the PHP developers have just updated “htmlspecialchars” and other functions. 

If it is affecting this action it may also be affecting others.  It would be useful to know.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nexus Rex
Sr. Member
 
Avatar
Total Posts:  139
Joined:  2008-07-10
Utah, USA
 

You may need to change the PHP call to your copyright text in your footer.phtml. Version 1.1.? used the html_entity_decode() function, and the newer versions have changed. The following worked for me:

Change this:

<?php echo html_entity_decode($this->getCopyright()) ?>

To this:

<?php echo $this->getCopyright() ?>

In the following file:

/app/design/frontend/[your_interface]/[your_theme]/template/page/html/footer.phtml
 
Magento Community Magento Community
Magento Community
Magento Community
 
Jacek Sompel
Jr. Member
 
Total Posts:  8
Joined:  2009-05-17
Melbourne, Australia
 

I know this post is a bit old but for anyone who still is looking at a way of getting current year in the Copyright section, the following is what worked for me:

In System - Configuration - Design - Footer - Copyright type:

Copyright &copy; <YEAR/> Company NameAll Rights Reserved.

Change this:

<?php echo html_entity_decode($this->getCopyright()) ?>

To this:

<?php echo preg_replace('/<YEAR\/>/'date("Y"), $this->getCopyright()) ?>

In the following file:

/app/design/frontend/[your_interface]/[your_theme]/template/page/html/footer.phtml

I am sure there are other ways of doing it too but I hope that this simple solution helps someone.

 
Magento Community Magento Community
Magento Community
Magento Community
 
b_nice
Member
 
Avatar
Total Posts:  60
Joined:  2010-01-05
Germany
 
Jacek Sompel - 01 July 2009 08:13 PM

I know this post is a bit old but for anyone who still is looking at a way of getting current year in the Copyright section, the following is what worked for me:

In System - Configuration - Design - Footer - Copyright type:

Copyright &copy; <YEAR/> Company NameAll Rights Reserved.

Change this:
<?php echo html_entity_decode($this->getCopyright()) ?>

To this:
<?php echo preg_replace('/<YEAR\/>/'date("Y"), $this->getCopyright()) ?>

In the following file:
/app/design/frontend/[your_interface]/[your_theme]/template/page/html/footer.phtml

I am sure there are other ways of doing it too but I hope that this simple solution helps someone.

This is exactly what I’m looking for. Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
g0rdian
Member
 
Total Posts:  65
Joined:  2011-12-04
 

This thread was helpful so I decided to build upon it. I wanted to make sure the copyright text is actually correct--so if I wrote something last year it would show up as “Copyright 2010-2011.” Here is how I did that:

In System > Configuration > Design > Footer > Copyright type the COPYRIGHT STARTING YEAR before <YEAR//> with no space after:

Copyright &copy2010<YEAR/> Company NameAll Rights Reserved.

Change this:

<?php echo html_entity_decode($this->getCopyright()) ?>

To this:

<?php if (substr_count($this->getCopyright(), date("Y")) < echo preg_replace('/<YEAR\/>/''-' date("Y"), $this->getCopyright()); else echo preg_replace('/<YEAR\/>/'''$this->getCopyright()); } ?>

In the following file:

/app/design/frontend/[your_interface]/[your_theme]/template/page/html/footer.phtml

If the current year is the first year of the copyright then it will only print the one year; if the current year is not the first year of the copyright it will insert the hyphen and the current year to bring your copyright up to date! Enjoy!

 
Magento Community Magento Community
Magento Community
Magento Community
 
keanureeves142
Jr. Member
 
Total Posts:  1
Joined:  2012-12-24
 

We can use a javascript function in the back-end itself without modifying any of the phtml file.

1) Log in to your Magento admin panel
2) Navigate to system > configuration > General > Design.
3) Click to expand the Footer section
4) Inside the Copyright text field replace the @copy; YYYY with

&copy; <script type="text/javascript">
var 
= new Date();
[removed](d.getFullYear())
</script>
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top