Troubles at the start | doc.nette.org/en/quickstart/home-page

Notice: This thread is very old.
ruben_cgt
Member | 6
+
0
-

Hello I am new in nette and I was creating my first application and I get this error

Nette\MemberAccessException
Cannot read an undeclared column "created_at"

please anyone can help me out of this?

mkoubik
Member | 728
+
0
-

Can you dump the object? Just add {dump $post} to the template and look at “Variables” in debug bar. Is there created_at column in data?

Filip Procházka
Moderator | 4668
+
0
-

Are you sure you have it in the database table?

ruben_cgt
Member | 6
+
0
-

thank you very much for your rapid response gusy.
@Filip It is in the table database

@mkoubik this is how I see the error

`Nette\MemberAccessException

Cannot read an undeclared column “created_at”.`

10:    //
11:    // block content
12:    //
13:    if (!function_exists($_l->blocks['content'][] = '_lbb6f8028976_content')) { function _lbb6f8028976_content($_l, $_args) { extract($_args)
14:    ;call_user_func(reset($_l->blocks['title']), $_l, get_defined_vars())  ?>
15:
16:
17:    <?php $iterations = 0; foreach ($posts as $post): Nette\Diagnostics\Debugger::barDump(array('$post' => $post), "Template " . str_replace(dirname(dirname($template->getFile())), "\xE2\x80\xA6", $template->getFile())) ?>
18:    <div class="post">
19:
20:        <div class="date"><?php echo Nette\Templating\Helpers::escapeHtml($template->date($post->created_at, 'F j, Y'), ENT_NOQUOTES) ?></div>
21:
22:        <h2><a href="<?php echo htmlSpecialChars($_control->link("Post:show", array($post->id))) ?>
23:    "><?php echo Nette\Templating\Helpers::escapeHtml($post->title, ENT_NOQUOTES) ?></a></h2>
24:

Last edited by ruben_cgt (2013-05-14 11:41)

Filip Procházka
Moderator | 4668
+
0
-

You should probably create a screenshot, this is not very synoptical. And also try deleting the cache.

ruben_cgt
Member | 6
+
0
-

Thank you Filip It's already working the problem was in the name of the row in the table it was misspelled.