Template Pages Not Found

And what system are you using? On an apache server? Locally with Mamp or Valet or?

CentOS, apache, PHP 7.1 - neither mamp or valet

It’s 7.1 or above right? Not forcing 7.2?

Yes, from 7.1 upwards.

I don’t know if this has anything to do with the subpages not working, but the media folder is empty the instructions say to remove thumbs, but it doesn’t say to move anything to the new media folder. Does the media folder house all media now? Is it no longer stored in the content?

For example, my home page is trying to show this image - The requested URL /socu.org.2019/media/pages/home/234695749-1547658242/checking-fb.jpg was not found on this server.

But in my media folder, there is not any such directory. Where is it getting that from?

Files still get uploaded to their content folder, but from there, all files are copied to the media folder. You don’t have to do anything though. Just remove the thumbs folder, add the media folder––and you’re done or at least, that is how it should work.

  • is the .htacces file already the new one (edit: looks like it)

  • also, have you tried with both the folder name and / as RewriteBase?

Ok makes sense. I’ll just recap what I’ve done, maybe I’m totally missing something.

  1. Replaced the Kirby folder
  2. Replaced index.php
  3. Replaced .htaccess
  4. Deleted thumbs folder and created media folder
  5. Ran upgrade.php
  6. Deleted accounts and avatars
  7. Removed panel folder
  8. Moved blueprints to /blueprint/pages extcept site.yml

Should that be enough to get me there?

That sounds good and should at least be sufficient for the front-end.

And you don’t have any leftovers from a custom folder setup in a site.php? Nor any config.php settings that might interfere?

I do have a custom config file. I already tried to delete it all though and nothing changes when I do. Oh, also I removed my widgets folder. I’m not understanding what you mean by the custom folder in site.php? Site.yml?

<?php

/*

---------------------------------------
License Setup
---------------------------------------

Please add your license key, which you've received
via email after purchasing Kirby on http://getkirby.com/buy

It is not permitted to run a public website without a
valid license key. Please read the End User License Agreement
for more information: http://getkirby.com/license

    */

    c::set('license', 'K2-PRO-6xxxxxxxxxx');

    /*

    ---------------------------------------
    Cache Setup
    ---------------------------------------
    By default these pages are stored in the cache folder.
    Commment this section out when developing locally or 
    you will have big issues


    TURNED IT OFF - MESSED WITH FORMS
    */

    c::set('debug',true);
    c::set('sitemap.exclude', array('error'));
    c::set('sitemap.important', array('contact'));
    c::set('cache', false);
    c::set('cache.ignore', array(
      'home',
      'search',
      'careers',
      'careers/apply-online',
      'vehicles-homes/socu-owned-vehicles',
      'vehicles-homes/bid'
    ));

    /*

    ---------------------------------------
    Routing Setup
    ---------------------------------------

    Custom routes for long urls

    */

    c::set('routes', array(
      array(
        'pattern' => 'accessibility',
        'action'  => function() {
          return page('/footer/accessibility');
        }
      ),
      array(
        'pattern' => 'rules',
        'action'  => function() {
          return page('/footer/disclosures');
        }
      ),
      array(
        'pattern' => 'forms',
        'action'  => function() {
          return page('/footer/forms-documents');
        }
      ),
      array(
        'pattern' => 'disclosures',
        'action'  => function() {
          return page('/footer/disclosures');
        }
      ),
      array(
        'pattern' => 'faq',
        'action'  => function() {
          return page('/footer/faq');
        }
      ),
      array(
        'pattern' => 'patriot-act',
        'action'  => function() {
          return page('/footer/patriot-act');
        }
      ),
      array(
        'pattern' => 'contact',
        'action'  => function() {
          return page('/footer/contact-us');
        }
      ),
      array(
        'pattern' => 'skip',
        'action'  => function() {
          return page('/loans/skip-a-pay');
        }
      ),
      array(
        'pattern' => 'uigea',
        'action'  => function() {
          return page('/footer/uigea');
        }
      ),
      array(
        'pattern' => 'terms',
        'action'  => function() {
          return page('/footer/terms-of-use');
        }
      ),
      array(
        'pattern' => 'privacy',
        'action'  => function() {
          return page('/footer/privacy');
        }
      ),
      array(
        'pattern' => 'careers',
        'action'  => function() {
          return page('/footer/careers');
        }
      ),
      array(
        'pattern' => 'bid',
        'action'  => function() {
          return page('/vehicles-homes/socu-owned-vehicles');
        }
      ),
      array(
        'pattern' => 'texas',
        'action'  => function() {
          return go('https://secure2.convio.net/ncuf/site/Donation2;jsessionid=00000000.app253b?idb=1020234188&df_id=2083&mfc_pref=T&2083.donation=form1&NONCE_TOKEN=7CE720FB7CAE59C5C33B2038803DCFBE&idb=0');
        }
      ),
      array(
        'pattern' => 'security',
        'action'  => function() {
          return page('/footer/security');
        }
      ),
      array(
        'pattern' => 'repos',
        'action'  => function() {
          return page('/vehicles-homes/socu-owned-vehicles');
        }
      ),
      array(
        'pattern' => 'wires',
        'action'  => function() {
          return page('/wire-instructions');
        }
      ),
      array(
        'pattern' => 'scholarship',
        'action'  => function() {
          return page('/news/19-member-scholarships');
        }
      )
    ));

In Kirby 2 you could set up a custom folder structure by creating a site.php file (next to the index.php in the root of the project), if you wanted to deviate from the standard folder structure.

The config.php syntax has changed, I’m currently not sure to what extent the c::set() setting do still work or not. But if you have removed everything and cleared the cache and it still doesn’t work, hm…

Oh yep, I don’t have any custom site.php file, I’m going to load a fresh install in a separate folder and see what happens.

Thanks. That way we might at least elimate the question, whether it has something to do with Kirby/your Kirby configuraiton. Or whether it is related to the server or so.

Just an update, I grabbed a fresh install placed it on the server updated to PHP 7.2 and still show the issue, so it has to be something going on with my server configuration. Running various updates now to see if I can figure it out.

I ran various updates but to no success. I get to the home page of Kirby 3 but there are no pictures on it only black boxes, if I look at the code it is looking for files in the media folder which there are none on this fresh install. See picture.

It seems like I am missing something that needs to be ran to generate the files into the media folder.

These files are auto-generated by Kirby. If they are not created, there’s definitely something going wrong. Either the folder not writable (but I think Kirby detects that), or not enough memory/execution time for the script.

However, that still doesn’t explain why the subpages are not available.

I loaded it on Mamp with PHP 7.1.16 and it’s working fine. It must just be an Apache/CentOs issue. Thanks for the help.

My live site is Centos as well so hopefully, it will roll out fine when the time comes.

1 Like

I got the same problems on a debian apache2 setup and also on my macos, which has apache2 and php7.2 installed using brew. Currently i dont get kirby3 running at all.

I can confirm that issue on a vmware based Ubuntu 18.10 SMP 64 Bit / PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS ). Alle the mentioned extensions are installed (mbstring, curl, ctype extension, gdlib)

I do a fresh
git clone https://github.com/getkirby/starterkit.git kirby30,
start the built in PHP server (php -S localhost:8000) an will see not a single image in frontend - only black boxes - and no image in panel.

PHP outputs nothing helpully, only 404 like
127.0.0.1:58004 [404]: /media/pages/photography/animals/3779077927-1547930887/peter-fox-800x1000-q90.jpg - No such file or directory

In panel I get a JSON.parse: unexpected character at line 1 column 1 of the JSON data when clicking down the image placeholders. Maybe this helps.

@rainerth If you use the built-in server, you have to call it with the router:

php -S localhost:8000 kirby/router.php

We do not recommend using the built-in server anymore.

1 Like

This makes the difference: my issues are solved. I have my images back. You saved my Saturday evening :slight_smile:

1000 thanks!