Forum

Thread tagged as: Problem, Meta

Erroneous characters when using perch_page_attributes()

Greetings.

In order to set up FB and twitter page attributes I've followed the instructions laid out here however on rendering the page two erroneous ">" symbols appear at the very top of the html, which are clearly coming from the attributes templates in use. Check it out here: ngagewifi.com

My templates are a little different from the examples in the URL but the example provided actually produces four erroneous symbols.

So is there anything obvious going on here?

Here's my attributes template contents:

<meta name="description" content="<perch:pages id="description" label="Description" type="textarea" size="xs" escape="true" />" />
<meta name="keywords" content="<perch:pages id="keywords" label="Keywords" type="textarea" size="xs" escape="true" help="Separate with commas" />" />
<meta name="robots" content="<perch:pages id="noindex" label="Do not index" type="checkbox" value="noindex" append="," divider-before="Search engine indexing" /><perch:pages id="nofollow" label="Do not follow links" type="checkbox" value="nofollow" append="," /><perch:pages id="nosnippet" label="Do not show a snippet" type="checkbox" value="nosnippet" append="," />" />

<meta property="og:site_name" content="<perch:pages id="sitename" type="hidden" />" />
<meta property="og:url" content="<perch:pages id="url" type="hidden" />" />
<meta property="og:title" content="<perch:pages id="og_title" label="Social title" type="text" escape="true" help="Title for this document with no branding or site name" divider-before="Facebook Open Graph Tags" />" />
<meta property="og:description" content="<perch:pages id="og_description" label="Social description" type="textarea" size="s" escape="true" />" />
<perch:if exists="og_image"><meta property="og:image" content="<perch:pages id="domain" type="hidden" /><perch:pages id="og_image" label="Image when shared" help="Should be at least 1200x630" type="image" width="1200" />" /><perch:else /><meta property="og:image" content="<perch:pages id="domain" type="hidden" /><perch:pages id="sharing_image" type="hidden" />" /></perch:if>
<perch:if exists="og_type"><meta property="og:type" content="<perch:pages id="og_type" label="Facebook type" type="select" options="article,book,profile,website,video,music" allowempty="true" />" /></perch:if>
<perch:if exists="og_author"><meta property="article:author" content="<perch:pages id="og_author" type="hidden" />" /></perch:if>

<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="<perch:pages id="twittername" type="hidden" />" />
<meta name="twitter:title" content="<perch:pages id="og_title" label="Social title" type="text" escape="true" help="Title for this document with no branding or site name" />" />
<meta name="twitter:description" content="<perch:pages id="og_description" label="Social description" type="textarea" size="s" escape="true" />" />
<perch:if exists="og_image"><meta property="twitter:image" content="<perch:pages id="domain" type="hidden" /><perch:pages id="og_image" label="Image when shared" help="Should be at least 1200x630" type="image" width="1200" />" /></perch:if>
<meta name="twitter:url" content="<perch:pages id="url" type="hidden" />" />

==

Perch: 2.8.7, PHP: 5.4.14, MySQL: 5.1.71, with PDO
Server OS: Linux, fpm-fcgi
Installed apps: content (2.8.7), assets (2.8.7), categories (2.8.7), perch_blog (4.5.4), perch_forms (1.8.2), perch_shop_foxycart (2), perch_members (1.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_shop_foxycart', 'perch_blog', 'perch_forms', 'perch_members' );
PERCH_LOGINPATH: /perch
PERCH_PATH: /chroot/home/ngagedig/ngagewifi.com/html/perch
PERCH_CORE: /chroot/home/ngagedig/ngagewifi.com/html/perch/core
PERCH_RESFILEPATH: /chroot/home/ngagedig/ngagewifi.com/html/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 64M, Max POST 64M, Memory: 512M, Total max file upload: 64M
Resource folder writeable: Yes
HTTP_HOST: ngagewifi.com
DOCUMENT_ROOT: /home/ngagedig/ngagewifi.com/html
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Dan League

Dan League 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Where do they appear?

Does it still happen with the current version of Perch?

Hi Drew, I've updated the site to v 2.8.14 and the characters still appear right at the very top of the page:

erroneous chars

Curious

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are your templates saved with a UTF8 encoding?

Well what do you know, I saved them specifically as UTF8 and the odd chars have gone away.

I use SublimeText as my editor and the default encoding is already set as UTF8 so I don't know what's going on there.

But it's all good now, so thanks for the help!