Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Error at Line 568 Framework/Model/MySQLDatabase.php


Go to End


4 Posts   2058 Views

Avatar
mhdesign

Community Member, 216 Posts

18 January 2013 at 2:16pm

Still experimenting with our install of SilverStripe 3.0. Now when I try to update a page I get the following message:

Error at Line 568 Framework/Model/MySQLDatabase.php

When I look at the relevant code I see:

function databaseError($msg, $errorLevel = E_USER_ERROR) {
		// try to extract and format query
		if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
			$formatter = new SQLFormatter();
			$msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
		}

		user_error($msg, $errorLevel);
	}

Pretty generic error stuff. What gives? Anybody got any pointers for me?

Avatar
Sean

Forum Moderator, 922 Posts

23 January 2013 at 3:59pm

It looks like the error might be getting cut off.

Try adding some logging so that it emails you the full error details. In your mysite/_config.php add this code (replacing with your email)

SS_Log::add_writer(new SS_LogEmailWriter('my@email.com'), SS_Log::WARN, '<=');

Sean

Avatar
Beau

Community Member, 5 Posts

18 February 2013 at 11:55am

I'm getting the same error in the little pop up box when saving content in the CMS.

For a while, I seemed to get the error only when trying to save a new change the first time - if I tried to save the change again right after the error would not appear.

Now, however, the error is coming up every time I try to save content in the CMS.

I have 2 modules installed:
bootstrap forms (this doesn't appear to be the problem)
googlesitemaps (have not tested without this module yet)

Could anyone shed any light on this issue at all? Even just the ballpark area the issue could be in - something in my code or possibly a silverstripe bug or a conflict with a module or something else.

Avatar
Beau

Community Member, 5 Posts

3 April 2013 at 1:29pm

It could be an error in your code on the page you are trying to save that is showing this error. That seemed to be the case for me.

I had a typo of some kind in my CMS fields set up.