Undefined index year in Date.php on line 2614
The other day I came across this little bug in Magento 1.1.6. After setting the products special price and clicking Save and continue Edit, then after adding some additional input to product and clicking the Save and continue Edit i got the following error Undefined index year… in Date.php on line 2614.
If you look at the screenshot you can see that there is a bug on the Prices tab, where upon each Save and continue Edit, Magento does not pool the year value into the Special Price From Date and Special Price to Date fields. Its missing the middle year value. So basically what you need to do is to set it up upon each Save and continue Edit.
Related articles
Tags: bug, error, Magento, undefined index
This entry was posted
on Tuesday, October 7th, 2008 at 1:58 am and is filed under Magento, jQuery.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.



October 8th, 2008 at 12:51 am
Yeah, that’s a very annoying bug…hope they fix it for the next release
October 13th, 2008 at 4:47 pm
Thank you for this. I looked all over Magento’s horrible forums and couldn’t find any mention of this. There were other references to this error related to mismatched local settings, but that wasn’t my case.
October 26th, 2008 at 12:31 am
Looks like somebody reported the issue here:
http://www.magentocommerce.com/bug-tracking/issue/?issue=2924
but the Magento team was unable to reproduce it so they closed the ticket. I’m not sure why they considered it “Resolved”, though. I’m still experiencing the problem in 1.1.6.
November 10th, 2008 at 7:14 am
../magento/app/code/core/Mage/Core/Model/Locale.php lines 379 to 381. Change the following:
$convert = array(’yyyy-MM-ddTHH:mm:ssZZZZ’=>’%c’, ‘EEEE’=>’%A’, ‘EEE’=>’%a’,'D’=>’%j’,
‘MMMM’=>’%B’, ‘MMM’=>’%b’, ‘MM’=>’%m’, ‘M’=>’%m’, ‘dd’=>’%d’,
‘d’=>’%e’, ‘yyyy’=>’%Y’, ‘yy’=>’%y’);
to the folowing code:
$convert = array(’yyyy-MM-ddTHH:mm:ssZZZZ’=>’%c’, ‘EEEE’=>’%A’, ‘EEE’=>’%a’,'D’=>’%j’,
‘MMMM’=>’%B’, ‘MMM’=>’%b’, ‘MM’=>’%m’, ‘M’=>’%m’, ‘dd’=>’%d’,
‘d’=>’%d’, ‘yyyy’=>’%Y’, ‘yy’=>’%y’);
Note the ‘d’=>’%d’ in the third line of code makes all the difference. Now, all your dates will work properly now.
November 12th, 2008 at 11:00 am
The bug is caused by locale settings and it appears only when you use a certain date format, for example the US standard format(mm/dd/yyyy) triggers it. Namitha’s modification seems to fix it. Tnx