Ticket Details

Blog tutorial fails with error

BUG Ticket (closed)

###What happened:
/posts displays this error:
Fatal error: Uncaught exception 'RuntimeException' with message 'The data connection default is not configured'

...in ...libraries/lithium/data/Model.php on line 494

###What was expected:
- display of posts

### Affects:
- 0.7 and higher

[wiki:drafts/blog-tutorial Blog tutorial] runs as expected on version 0.6

on 03.13.10 reported by: tiemonster owned by: nate

Updates

(works-for-me) on 03.13.10 by mariano
  • id was changed to 84
  • number was changed to 49
  • owner was changed to mariano
  • type was changed to bug
  • priority was changed to normal
  • title was changed to Blog tutorial fails with error
  • description was changed
  • tags was removed
As of Lithium 0.7, if you use DB connections you need to uncomment the line:

{{{require __DIR__ . '/connections.php'}}}

from your {{{app/config/bootstrap.php}}} file
on 03.13.10 by tiemonster
Can the tutorial be updated to reflect this change? The tutorial did indeed work after making this change. Example text to appear at the end of the "Connection setup" section could be:

Starting in 0.7, you need to set up your application to use a database connection. To do this, open up ```app/config/bootstrap.php``` and uncomment the line that looks like this:
{{{
require __DIR__ . '/connections.php';
}}}
on 03.13.10 by Archer
Added some documentation for this in the Getting started article.  http://rad-dev.org/lithium/wiki/guides/installation
(reopened) on 03.14.10 by tiemonster
  • status was changed to pending
  • resolution was removed
I think it's worth it to just add that sentence to the blog tutorial. It might be the first place that a lot of people start with the framework.
(works-for-me) on 03.28.10 by nate
  • owner was changed to nate
  • status was changed to closed
  • resolution was changed to works-for-me
The tutorials are currently being reorganized, and this will be taken into consideration. Thanks for the note.