concrete5/concrete5 — Issue #350: Custom page_not_found page triggers series of database errors
Author: Mesuva
Created: 2011-12-14 05:07:45+00:00
State: open

Using a fresh install from github, default settings left unchanged, Plain Yogurt theme active.

After the addition to /config/site_theme_paths.php of:

$v->setThemeByPath('/page_not_found');

Viewing a page that doesn't exist triggers several database related errors:

> An unexpected error occurred.
>
> mysql error: [1048: Column 'cID' cannot be null] in EXECUTE("INSERT INTO Areas (cID,arHandle,arIsGlobal) VALUES (NULL,'Header Nav','1')")
> An unexpected error occurred.

> mysql error: [1048: Column 'cID' cannot be null] in EXECUTE("INSERT INTO Areas (cID,arHandle,arIsGlobal) VALUES (NULL,'Header Nav','1')")

> Page Forbidden

> You are not authorized to access this page.

> An unexpected error occurred.

> mysql error: [1048: Column 'cID' cannot be null] in EXECUTE("insert into PageStatistics (cID, uID, date) values (NULL, '1', NOW())")

If a default theme is selected, e.g. Dark Chocolate or Green Salad, the page does not show errors and behaves as normal, displaying the 404 page in the selected theme, using the view.php file from the theme.