I’m having problems getting my site to work properly on my server. Most things seems to be working ok - the panel is fine, as is the front end. But if I try and click on any of the “Open” links from within the panel, they don’t work - I just get a panel window saying “The view could not be found”.
Here’s what I’ve checked:
License is applied (no notice in the panel)
Checked all the correct php modules are loaded (output below)
.htaccess was uploaded to the server and is complete
mod_rewrite is enabled
Switched between nginx proxy and plain apache - both failed
I’m not sure where to go from here with regards to troubleshooting this. It seems I hot all the requirements?
Do you have any routes in place in your config or in a plugin?
Could you also please post the blueprint for the children of the blog page? Maybe you are redirecting the children and haven’t change the preview link?
I do have a couple routes in place, here they are:
# Custom routes
'routes' => [
// Make the non /blog/ URLs work
[
'pattern' => '(:all)',
'action' => function($uid) {
# Try fetch the post by looking for a child of the homepage, including drafts
$page = site()->homePage()->findPageOrDraft($uid);
# If we have a page and the eventual draft token is present we can return the page
if ($page && $page->isVerified(get('token')))
return site()->visit($page);
# Else keep going
$this->next();
}
],
// Remove "/blog/" from post URLs
[
'pattern' => 'blog/(:any)',
'action' => function($uid) {
go($uid);
}
],
// Generate sitemap.xml
[
'pattern' => 'sitemap.xml',
'action' => function() {
$pages = site()->pages()->index();
// fetch the pages to ignore from the config settings,
// if nothing is set, we ignore the error page
$ignore = kirby()->option('sitemap.ignore', ['error']);
$content = snippet('sitemap', compact('pages', 'ignore'), true);
// return response with correct header type
return new Response($content, 'application/xml');
}
],
// Redirect sitemap -> sitemap.xml
[
'pattern' => 'sitemap',
'action' => function() {
return go('sitemap.xml', 301);
}
],
// Setup the rss feed
[
'pattern' => ['/feed'],
'action' => function () {
$title = "Kev Quirk";
$description = "Latest posts from my blog";
$posts = kirby()->collection('posts')->limit(20);
return new Response(snippet('rss', compact('title', 'description', 'posts') , true), 'application/rss+xml');
}
]
]
Here’s my article.yml file, which is the blueprint for blog posts:
title: Blog Posts
num: '{{ page.published.toDate("Ymd") }}'
icon: book
status:
draft:
label: Draft
text: The post is still in draft. It's not available on the site and can only be accessed via the panel.
unlisted:
label: Unlisted
text: The post is online, but can only be seen with a direct link.
listed:
label: Published
text: The post is online and listed in the blog.
columns:
main:
width: 2/3
sections:
fields:
type: fields
fields:
text:
label: Post Contents
type: markdown
size: huge
sidebar:
width: 1/3
sticky: true
sections:
meta:
type: fields
fields:
description:
label: Post Description
type: text
published:
label: Published Date
type: date
time: true
default: now
tags:
label: Post Tags
type: tags
options:
- AMA
- Blogging
- Books
- DeGoogling
- FatBoy
- FishKeeping
- Fun
- HomeLife
- Meta
- Notes
- Opinion
- Privacy
- Security
- StoryTime
- Technology
- Watches
- Web
uploads:
label: Uploads
type: files
limit: 15