Strange SQL Errors explained (watch your cookies!!)

Permalink
We're running Concrete 5 sites behind Varnish, and thus are discarding some cookies which would disable caching. A crude approach which needs refinement. Actually it's the reason for the Concrete 5 installer behaving weirdly.

Seehttp://blog.ideaday.de/max/2012/02/concrete-5-sql-errors-during-ins... for an article about this, including explanation why the error happens. Here's a short summary:

The problem presents itself in two flavours:

mysql error: [1048: Column 'uID' cannot be null] in EXECUTE("INSERT INTO Config (cfKey,cfValue,uID) VALUES ('NEWSFLOW_LAST_VIEWED','FIRSTRUN',NULL)")

or

Catchable fatal error: Argument 1 passed to ContentImporter::importPageAreas() must be an instance of Page, boolean given, called in /concrete/libraries/content/importer.php on line 75 and defined in /concrete/libraries/content/importer.php on line 197.

Solution:
Watch your cookies - i.e. that they are really passed on to the server and not discarded by a reverse proxy. (On 99,9 % of all C5 installs you only need to worry about your browser security settings).

My suggestion to the C5 team:
Insert a check for the session data having been passed correctly during the second step of the installation. If not, advise the user that they need cookies to be enabled. (Maybe you are already doing it, and I've run into exotic problems ...)

ideaday
 
jordanlev replied on at Permalink Reply
jordanlev
Thanks for writing this -- was having the same issues and couldn't figure out why.

I just submitted a bug report for this. Please go there and "upvote" it so it gets more attention:
http://www.concrete5.org/index.php?cID=328553...