Error - No more access to my local website

Hi everyone,

I must say that I’m a totally noob at Kirby. I just discovered it today. I’m working on a local version using MAMP. Everything worked well on my onepage website running on localhost until I created a new project using the panel. Since that, the only page of the website is no more accessible. I get this message : This page is currently offline due to an unexpected error. We are very sorry for the inconvenience and will fix it as soon as possible.

Here is my only template :

<?php snippet('header') ?>
<ul class="projets">
    <?php foreach ($page->children() as $projet): ?>
    <li class="<?= $projet->Taille et position() ?>">
        <?= $projet->image() ?>
        <h3><?= $projet->title() ?></h3>
        <p><?= $projet ->text() ?></p>
    <?php endforeach ?>
<?php snippet('footer') ?>

What’s strange is that the panel is still running. I erased the project that I just created but it didn’t changed anything.

I restarted MAMP and checked if everything was correct in all the txt, php and yml files and I think it’s ok. I don’t know what to do to try to fix the problem because it doesn’t came from coding. It came using the panel.

Could it modify the .htaccess ? I don’t know anything about how that thing works.

Any idea ?

Thx for your help,

Hey @Adrieng. Welcome to Kirby and the forum.

Could you please start with turning on debugging in site/config/config.php? If the file does not exist, create it first at that path.

+1 for turning on debugging.

The line

<li class="<?= $projet->Taille et position() ?>">

in your code is definitely one reason for the error though. What’s your field called? Just position? Try this:

<li class="<?= $projet->position() ?>">

Spaces are not allowed in field names or page methods.

You should also remove the space between <?= $projet and ->text() ?>.

1 Like

Hi, case closed ! It was this line. I made a mistake naming the class.

Thx a lot for your help

Good catch, @thguenther I completely overlook that line :see_no_evil: