Problems running the quickstart tutorial

Notice: This thread is very old.
simonjcarr
Member | 28
+
0
-

Hi, I have managed to display a list of test posts on the home but when I get to the next section of displaying an individual post, I have problems.

I have created a new Presenter at app\presenters\PostPresenter.php
but when I add my link to the home page to view the post, I get a Error dump with title

Invalid link: Cannot load presenter ‘Post’, class ‘App\Presenters\PostPresenter’ was not found.

There is a mention in the tutorial that I may not have mod_rewrite enabled, but I have checked and it is enabled. Do I need to do anything with the .htaccess file?

CZechBoY
Member | 3598
+
0
-

How do you build the link?
Presenter

$this->link('Post:');

Latte

<a n:href="Post:">post default</a>
OR
<a href="{plink Post:}">post default</a>
simonjcarr
Member | 28
+
0
-

OK, so I just got out of bed this morning with a fresh head and solved the problem.

I read somewhere that the issue is related to the cache and you need to run

composer dump-autoload in your application root folder. I tired this but it had no effect, but when I checked the cache folder, I found that nothing had been removed by that command, so I deleted everything in the cache folder manually (folders and files).

That moved me on, I could then see the list of posts again on the home page, but when I clicked one, it said file not found. Again with my Fresh Head on, I sorted this problem out. The issue was that although I had enabled mod_rewrite with the command (a2enmod rewrite) I also had to edit the /etc/apache2/apache2.conf and changed the root directory specification

From This

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

To this

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

Restarted apache and now everything is working again.

I hope this helps someone else out.