-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding snippets to head puts page offline #28
Comments
@Robertsdesign It's hard determining the cause of this problem without further context. Could you post the code inside your |
Hi <!doctype html> isHomePage()): ?> <title> Modern Web Design & Development | Scotland | UK | title() ?></title> <title>seoTitle() ->or($page->title()) ?> title() ?></title> |
I don't see PHP opening or closing tags, like |
The only PHP in the head section is used in the title. isHomePage()): ?> <title> Modern Web Design & Development | Scotland | UK | title() ?></title> <title>seoTitle() ->or($page->title()) ?> title() ?></title> |
Well, originally you wanted to know why including snippets from this plugin are throwing errors? Sorry, I don't see the problem at hand 😕 |
@Robertsdesign Could you post your complete file content inside a block of triple backticks = ``` |
Hi,
Hope this is what you wanted?
When I add the two snippets to the head it blocks me from using the Kirby Control panel and I get the 403 notice as below.
Add these two snippets to your head: <?php snippet('meta_information'); ?> + <?php snippet('robots'); ?>
The JSON response of the API could not be parsed:403
```
<!doctype html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php if ($page->isHomePage()): ?>
<title><?= $site->title() ?></title>
<?php else: ?>
<title><?= $page
->seoTitle()
->or($page->title()) ?> <?= $site->title() ?></title>
<?php endif; ?>
<link rel="preload" href="https://robertsdesign.biz/fonts/GT-Sectra-Display-Bold.woff2"; as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://robertsdesign.biz/fonts/GT-Haptik-Regular-2.woff2"; as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://robertsdesign.biz/fonts/GT-Haptik-Bold.woff2"; as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://robertsdesign.biz/fonts/GT-Haptik-Regular-Oblique-2.woff2"; as="font" type="font/woff2" crossorigin="anonymous">
***@***.***{font-family:GT-Sectra-Display-Bold;src:url(/fonts/GT-Sectra-Display-Bold.woff2) format("woff2"),url(/fonts/GT-Sectra-Display-Bold.woff) ***@***.***{font-family:GT-Haptik-Regular;src:url(/fonts/GT-Haptik-Regular-2.woff2) format("woff2"),url(/fonts/GT-Haptik-Regular-2.woff) ***@***.***{font-family:GT-Haptik-Bold;src:url(/fonts/GT-Haptik-Bold.woff2) format("woff2"),url(/fonts/GT-Haptik-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}.header-links{display:flex;justify-content:center;flex-direction:row}h1{font-size:var(--h1);font-size:2em;margin:.67em 0}h1.title-heading ***@***.***{font-family:gt-sectra-display-bold;src:url(/fonts/GT-Sectra-Display-Bold.woff2) format("woff2"),url(/fonts/GT-Sectra-Display-Bold.woff) ***@***.***{font-family:gt-haptik-regular;src:url(/fonts/GT-Haptik-Regular-2.woff2) format("woff2"),url(/fonts/GT-Haptik-Regular-2.woff) ***@***.***{font-family:gt-haptik-bold;src:url(/fonts/GT-Haptik-Bold.woff2) format("woff2"),url(/fonts/GT-Haptik-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}html{-webkit-text-size-adjust:100%;--scrollbarBG:#9d0000;--thumbBG:rgb(200, 107, 107)}body{scroll-behavior:smooth;margin:0 auto;position:relative;font-family:gt-haptik-regular,Arial,sans-serif;font-size:1.125rem;font-weight:400;font-style:normal;color:#1b1b1b;background:#fff;padding:1em 1.25em 0;width:100%;max-width:64.545em;min-width:20em;scroll-behavior:smooth;overflow-x:hidden;overflow-y:scroll;height:100vh;scrollbar-width:thin;scrollbar-color:var(--thumbBG) var(--scrollbarBG)}h1,li,p{line-height:calc(2px + 2ex + 2px);margin-top:0}hr{box-sizing:content-box;height:0;overflow:visible}a{background-color:transparent}*,::after,::before{box-sizing:border-box}*+*{margin-bottom:1.6rem}img{width:100%;height:auto;border-style:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:last-child{margin-bottom:0}ul{list-style:none;padding:0}:root{--font-size:112.5%;--ratio:1.424;--ratio-alt:1.25;--h4:calc(var(--font-size) * var(--ratio));--h3:calc(var(--h4) * var(--ratio));--h2:calc(var(--h3) * var(--ratio));--h1:calc(var(--h2) * var(--ratio))}body::-webkit-scrollbar{width:8px}body::-moz-scrollbar{width:8px}body::-webkit-scrollbar-track{background:var(--scrollbarBG)}body::-webkit-scrollbar-thumb{background-color:var(--thumbBG);border-radius:5px;border:2px solid var(--scrollbarBG)}body::-moz-scrollbar-track{background:var(--scrollbarBG)}body::-moz-scrollbar-thumb{background-color:var(--thumbBG);border-radius:5px;border:2px solid var(--scrollbarBG)}::-webkit-input-placeholder{color:#a8a4a4;opacity:1}:-ms-input-placeholder{color:#a8a4a4;opacity:1}::placeholder{color:#a8a4a4;opacity:1}.site-header__wrapper{position:relative;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:0}.site-name img{image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges;position:relative;height:1.22em;width:1.2em;top:3px;left:5px}.site-title{text-transform:uppercase;position:relative;font-family:gt-haptik-bold,Arial,sans-serif;text-transform:uppercase;font-size:1.2rem;color:#1b1b1b;font-weight:700;white-space:nowrap;letter-spacing:1px}.site-name a:link{text-decoration:none;margin-top:0;padding:1em 1em 1em 0;color:#1b1b1b}.site-name a:visited{color:#1b1b1b;text-decoration:none}.header-links{position:relative;font-family:gt-haptik-bold,Arial,sans-serif;font-weight:700;margin-top:-2px;display:flex;justify-content:center;flex-direction:row}.header-links li{margin:0;padding:1em .4em;color:#1b1b1b;letter-spacing:1px}.header-links a:link{text-decoration:none;color:#1b1b1b;padding:5px 10px}.header-links a:visited{text-decoration:none;color:#1b1b1b}a:link{text-decoration-color:#bf4141;text-decoration-thickness:.06em;text-decoration-skip-ink:none;text-underline-offset:2.5px;text-decoration-color:#bf4141;text-decoration-thickness:.06em;text-decoration-skip-ink:none;text-underline-offset:2.5px;color:#b10000;font-family:gt-haptik-bold,Arial,sans-serif;font-weight:700;box-shadow:none}a:visited{color:#b10000;text-decoration:none}h1{font-size:var(--h1);font-family:gt-sectra-display-bold,Times,serif;font-style:normal;line-height:.9;margin-top:.6em;padding-bottom:.5em;font-weight:700;color:#1b1b1b}h1.title-heading a:link{margin-top:.4em;font-size:4.2rem;font-family:gt-sectra-display-bold,Times,serif;font-weight:700;font-style:normal;line-height:1;text-decoration:none;border-bottom:none;color:#1b1b1b}h1.title-heading a:visited{color:#1b1b1b;text-decoration:none}p{font-family:gt-haptik-regular,Arial,sans-serif;line-height:1.6}.red-title{font-family:gt-haptik-bold,Arial,sans-serif;font-size:5.5rem;color:#b10000;grid-column:1/2;grid-row:2;transform:rotate(180deg);writing-mode:vertical-lr;align-self:start;margin-right:.6em}.skip-link{position:absolute;top:-40px;left:0;background:#000;color:#fff;padding:8px;z-index:150}.header-main{position:relative;display:grid;grid-column:4/9;margin-bottom:.5em;z-index:50}.main-text{position:relative;display:grid;grid-template-columns:6fr 1fr 4fr 3fr 3fr 4fr 1fr 6fr;gap:1.5vw}.blog-head{margin-bottom:1.5em}.blog-text{grid-column:3/8}a.read{margin-bottom:0}.solid{height:1.5px;border:0;padding:0;border-top:2px solid ***@***.*** ***@***.*** screen and ***@***.*** screen and (min-width:20em){.circle{display:none;visibility:hidden}ul.header-links{font-size:.85rem;text-transform:uppercase}.header-links{margin-top:1em;margin-left:-10px}.main-text{position:relative;display:block;width:97%}h1.title-heading a{font-size:3.6rem} h1.title-heading ***@***.*** screen and ***@***.*** screen and ***@***.*** screen and (min-width:33.3em){.main-text{position:relative;display:grid;grid-template-columns:6fr 1fr 4fr 3fr 3fr 4fr 1fr ***@***.*** screen and ***@***.*** screen and ***@***.*** screen and ***@***.*** screen and ***@***.*** screen and ***@***.*** screen and ***@***.*** screen and ***@***.*** screen and ***@***.*** screen and ***@***.*** screen and (min-width:56.8em){.circle{display:inline;visibility:visible;position:absolute;right:27.77em;width:11.11em}}</style>
<?php snippet('meta_information'); ?>
<?php snippet('robots'); ?>
<meta name="description" content="Roberts Design - David Roberts - Independent Designer and Developer, Digital Products, Web Design, Graphic Design Branding, Identity and Print - Roberts Design is based in Argyll, Scotland.">
<meta name="keywords" content="Roberts Design, Roberts-Design, Independent, freelancer, digital products, designer, developer, graphic designer, graphics, HTML5, CSS3, Scotland, Argyll, Glasgow, West of Scotland" />
<link rel="copyright" href="https://robertsdesign.biz/privacy">;
<link rel="alternate" type="application/rss+xml" title="Roberts Design Latest articles" href="https://robertsdesign.biz/feed_rss.xml">;
<link rel="alternate" type="application/rss+xml" title="Latest articles" href="<?= site()->url() ?>/feed"/>
<meta name="author" content="David Roberts">
<meta name="robots" content="INDEX,FOLLOW">
<meta name="robots" content="noodp">
<meta name="apple-mobile-web-app-title" content="Roberts Design">
<meta name="msvalidate.01" content="CA7B4C476F196E194AEF421C4D25ACDD">
<link rel="search" href="/opensearchdescription.xml" type="application/opensearchdescription+xml" title="Roberts Design"/>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png">
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="manifest" href="/manifest.json">
<link rel="manifest" href="/manifest.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#9d0000">
<meta name="apple-mobile-web-app-title" content="Roberts Design">
<meta name="application-name" content="Roberts Design">
<meta name="msapplication-TileColor" content="#603cba">
<meta name="theme-color" content="#ffffff">
<meta property="article:author" content="David Roberts">
<meta name="robots" content="index, follow">
<meta name="msvalidate.01" content="CA7B4C476F196E194AEF421C4D25ACDD">
<meta name="robots" content="index,follow">
<meta name="robots" content="noodp">
<!-- Open Graph / Facebook -->
<meta property="og:title" content="Roberts Design | Independent Designer and Developer">
<meta property="og:type" content="article">
<meta property="og:description" content="David Roberts - A designer and developer based in Scotland working with clients developing digital and analogue products.">
<meta property="og:image:width" content="279">
<meta property="og:image:height" content="279">
<meta property="og:title" content="Roberts Design">
<meta property="og:url" content="https://robertsdesign.biz/">;
<meta property="og:image" content="https://robertsdesign.biz/assets/icons/og:image.jpeg">;
<meta property="og:site_name" content="Roberts Design">
<!-- Twitter -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" ***@***.***">
<meta name="twitter:site:id" content="351244892">
<meta name="twitter:creator" ***@***.***">
<meta name="twitter:creator:id" content="351244892">
<meta name="twitter:url" property="og:url" content="/">
<meta name="twitter:title" property="og:title" content="Roberts Design | Independent Designer and Developert">
<meta name="twitter:description" property="og:description" content="/">
<meta name="twitter:image" content="https://robertsdesign.biz/apple-touch-icon.svg">;
</head>
```
```
title: Blog
icon: 📚
columns:
- width: 1/3
sections:
drafts:
extends: sections/articles
headline: Drafts
status: draft
unlisted:
extends: sections/articles
headline: In Review
status: unlisted
- width: 1/2
sections:
listed:
extends: sections/articles
headline: Published
status: listed
seotab: seo
```
…On 1 Sep 2021, 3:57 PM +0100, Martin Folkers ***@***.***>, wrote:
@Robertsdesign Could you post your complete file content inside a block of triple backticks = ```
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
I'll try to reproduce your problem using a fresh starter kit later - I'll get back at you! |
Frankly, inserting your code doesn't throw any error / exception for me - I wasn't able to reproduce the problem you describe .. what's the current situation, did this maybe resolve itself somehow? |
Hi, I am not using it as it just gives errors all the time which made using the site not feasible.
David Roberts
…On 16 Oct 2021, 2:17 PM +0100, Martin Folkers ***@***.***>, wrote:
Frankly, inserting your code doesn't throw any error / exception for me - I wasn't able to reproduce the problem you describe .. what's the current situation, did this maybe resolve itself somehow?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
"Thanks for investigating" You're welcome! |
When I add the two snippets below to the head section the page goes offline with the message below.
'Add these two snippets to your head:
<?php snippet('meta_information'); ?>
+<?php snippet('robots'); ?>
'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.
The text was updated successfully, but these errors were encountered: