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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Website Error upon Apostrophe

Go to End



Community Member, 9 Posts

22 December 2010 at 8:15am

Hey all, just had a question concerning the DOM functionality and an error that I'm getting.

For the website that I'm using, we've set up a space for the admin to put in a specific content accordingly, the first input is for the date and that one is working good, however the content area seems to be having trouble.

Upon inputting an ' (apostrophe) the page site will break with the generic "Website Error" After running the dev mode to look further into it, the problem seemed to be a bit bigger than I anticipated. The source area said this,

529 function databaseError($msg, $errorLevel = E_USER_ERROR) {
530 // try to extract and format query
531 if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
532 $formatter = new SQLFormatter();
533 $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
534 }
536 user_error($msg, $errorLevel);
537 }
539 /**
540 * Return a boolean type-formatted string
541 *
542 * @param array $values Contains a tokenised list of info about this data type

I'm wondering how I can automatically get the site to accept an apostrophe, even convert it to » if need be, but to do that everytime the apostrophe is input into the content area rather than falling apart. I believe the problem has to do with php reading apostrophes and trying to find what it's supposed to be referencing. Anybody got a possible fix for this?