2

I'm getting this error:

Undefined index: releaseDate in craft/app/etc/behaviors/AppBehavior.php(500)

Line 500: $row['releaseDate'] = DateTime::createFromString($row['releaseDate'], null, false);

Is there anything I can do to fix this?

3

I've run into this issue myself with Craft version: 2.6.2962.

The line in question is expecting a column from the database called "releaseDate". In my case, that column no longer exists. It might have gotten dropped or lost with one of the updates, I am not sure.

A short-term solution would be to edit that line of code and pass in some different value.

In my case, I changed the line to:

$row['releaseDate'] = DateTime::createFromString($row['dateUpdated'], null, false);

And to clarify, looking at the changelog, it seems they are in the process of tweaking the craft()->releaseDate() function call.

Update 03/06/2017: It appears that my code-base was outdated with the version in my database. I updated to the latest version of craft and that line that I edited above is now gone.

My question to you: Is your craft version up to date?

| improve this answer | |
  • Thanks for the help sturakov. I updated to the latest 2.6.2966 and this began happening, although my live site works perfectly and doesn't show this error. This only seems to happen on my local .dev version. I also can't find the: $row['releaseDate'] = DateTime::createFromString($row['releaseDate'], null, false); from line 500. – larnera1 Mar 7 '17 at 12:28
  • Just to verify, you're saying you updated to the latest version and the error is still happening? And no problem, happy to help. – sturakov Mar 7 '17 at 22:46
  • Yep, I've updated, but my local version is getting this error. The live site is working fine. Quite strange, not sure what to do? – larnera1 Mar 8 '17 at 12:02
  • Yeah, definitely strange. Are you getting the same error message even though the line is missing from that file? If so, that makes me think there's some sort of caching going on. I'm not sure what you're development environment is like, but if you give me some details, we might be able to narrow it down. – sturakov Mar 8 '17 at 16:42
  • Yep, I'm getting to the same error message. I've tried to find that line in Sublime, but doesn't seem to exist. I'm running Mamp Pro 3.5.2, PHP 7.0.8 and Craft 2.6.2966 according to info.php in the app folder. – larnera1 Mar 9 '17 at 10:40
1
  1. Backup your DB.
  2. I updated the CMS on my live site to the newest version.
  3. download the newest version of Craft and replace craft/app with the new craft/app
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.