1

We started getting this error inconsistently on our site, and now it's constant unless we turn devMode off. We have no idea what may be causing it, but it only happens on one page. With devMode turned off, this page loads as intended with no issues. Here's a stack trace of what's coming through:

Class 'Exception\RuntimeException' not found
/craft/app/framework/vendors/zend-escaper/Escaper.php(321)
/craft/app/framework/vendors/zend-escaper/Escaper.php(182): Escaper->toUtf8("[11:24:06.471][trace][system.db.CDbCommand] Executing SQL: UPDAT...")
/craft/app/framework/web/helpers/CJavaScript.php(35): Escaper->escapeJs("[11:24:06.471][trace][system.db.CDbCommand] Executing SQL: UPDAT...")
/craft/app/helpers/LoggingHelper.php(51): CJavaScript::quote("[11:24:06.471][trace][system.db.CDbCommand] Executing SQL: UPDAT...")
/craft/app/templates/logging/log-firebug.php(46): Craft\LoggingHelper::processFireBugLogEntry("trace", "11:24:06.471", "system.db.CDbCommand", "Executing SQL: UPDATE `craft_budhub_spend_analytics` SET `id`=:y...", ...)
/craft/app/framework/logging/CWebLogRoute.php(52): Craft\WebLogRoute->render("log", array(array("Loading "cache" application component in /var/www/thisisbud.dev/...", "trace", "system.CModule", 1499945046.3493, ...), array("Loading "path" application component in /var/www/thisisbud.dev/c...", "trace", "system.CModule", 1499945046.3495, ...), array("Loading "request" application component in /var/www/thisisbud.de...", "trace", "system.CModule", 1499945046.3497, ...), array("Serving "usePathInfo" from cache in /var/www/thisisbud.dev/craft...", "trace", "system.caching.Craft\FileCache", 1499945046.3501, ...), ...))
/craft/app/framework/logging/CLogRoute.php(104): CWebLogRoute->processLogs(array(array("$_COOKIE=array ( 'ccc7c40e11a9bcf94cb9cc672f7748a0username' =>...", "info", "application", 1499945046.3467), array("Loading "cache" application component in /var/www/thisisbud.dev/...", "trace", "system.CModule", 1499945046.3493, ...), array("Loading "path" application component in /var/www/thisisbud.dev/c...", "trace", "system.CModule", 1499945046.3495, ...), array("Loading "request" application component in /var/www/thisisbud.de...", "trace", "system.CModule", 1499945046.3497, ...), ...))

A few points that may help:

  • We are accessing and saving (encrypted) binary data to the DB, though we do this elsewhere on the site without issue.
  • The twig being loaded loads other pages too, which all run fine seperately
  • DevMode turned off, we can't see anything that's not working, but with devMode on, it's impossible to get past said error.

We've been wrestling with this for a while without any luck. Any help would be greatly appreciated!

7
  • Got a tip for the next project. Start using devmode from the beginning so you know what code gives the error. Commented Jul 13, 2017 at 12:54
  • Does it happen on all pages though or just a couple? If so check which code is used on all those pages and not on any other so you atleast know where it goes wrong Commented Jul 13, 2017 at 12:55
  • @JustinDekkers Thanks for your response. We've been working on this project for 2 years and it is live and well as a production site. We've had devmode enabled from the beginning on our development environments (everywhere but our production boxes). We haven't just on a whim enabled devMode, this is an error that popped up out of nowhere and we can't identify why. The page it has shown up on used to work.
    – Merlin
    Commented Jul 13, 2017 at 13:20
  • Pretty sure this is a bug. Can you try this fix and see if that resolves it for you? github.com/yiisoft/yii/commit/…
    – Brad Bell
    Commented Jul 13, 2017 at 22:49
  • @BradBell Well.. that changed the error page to just an Exception with no error message! Feels like we're getting closer?
    – Merlin
    Commented Jul 14, 2017 at 9:50

1 Answer 1

1

Definitely agree with the comments that you should enable devMode from day one when working on a project. In addition, coding defensively can help avoid common frontend errors as well.

There's more on this topic in the article Handling Errors Gracefully in Craft CMS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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