Starting point --> package -->single page

Permalink
Hi all,

I'm having difficulties installing a single page from a package through a starting point.

My starting point named 'testing' has this snippet inside its content.xml:

<packages>
<package handle="faq"/>
</packages>
<singlepages>
<page name="FAQ" path="/faq" filename="0" pagetype="" description="Display the FAQ" package="faq">
<area name="Header"/>
<area name="Header Nav"/>
<area name="Sidebar"/>
<area name="Main"/>
</page>
<page name="FAQ" path="/dashboard/faq" filename="/dashboard/faq/view.php" pagetype="" description="Edit the FAQ" package="faq"/>
</singlepages>

All was exported via the content generator addon.

At first, I didn't have the /packages/faq/ directory structure set up. (I'm taking this step by step, very slowly.)

So far, so good. It doesn't install the *actual* pages (or package, since it isn't there), but it doesn't crash.

Currently, /packages/faq is laid out. The package works fine in a clean install of concrete5.

Here's my /packages/faq/controller.php's install function:

public function install(){
$pkg = parent::install();
Loader::model('single_page');
$sp = SinglePage::add('/faq', $pkg);
$sp->update(array('cName'=>t('FAQ'), 'cHandle'=>t('faq'), 'cDescription'=>t('Display the FAQ')));
unset($sp);
$sp = SinglePage::add('/dashboard/faq', $pkg);
$sp->update(array('cName'=>t('FAQ'), 'cHandle'=>t('faq'), 'cDescription'=>t('Edit the FAQ')));
}

The error I'm getting when installing concrete5 with my starting point:

Fatal error: Call to a member function update() on a non-object in /home/user/public_html/packages/faq/controller.php on line 16

Line 16 reads: $sp->update(array('cName'=>t('FAQ'), 'cHandle'=>t('faq'), 'cDescription'=>t('Display the FAQ')));

$sp is empty.

I'm a bit at a loss. I've searched the archives, read the tutorial, watched the screencast and googled around plentiful, but no banana yet.

Does anybody have any clues?

Thx!... Nico