silverstripe-framework: Content with "" as part of header leads to break?

Hey,

a bit of a strange error/thing I’ve found here. More below.

Affected Version

$ composer info --direct

innoweb/silverstripe-social-metadata 5.1.2  Adds social metadata like OpenGraph, Twitter and JSON-LD to all pages.
jonom/silverstripe-betternavigator   4.1.1  Front-end utility menu for SilverStripe websites featuring administration and development tools
phpunit/phpunit                      5.7.27 The PHP Unit Testing framework.
silverstripe/blog                    3.5.1  A fresh take on blogging in Silverstripe set out to tackle the issue of a cluttered Site Tree.
silverstripe/googlesitemaps          2.1.6  SilverStripe support for the Google Sitemaps XML, enabling Google and other search engines to see all urls on...
silverstripe/recipe-cms              4.6.1  SilverStripe recipe for fully featured page and asset content editing
silverstripe/recipe-plugin           1.3.0  Helper plugin to install SilverStripe recipes
symbiote/silverstripe-queuedjobs     4.6.0  A framework for defining and running background jobs in a queued manner
$ composer info | grep "silverstripe/"

silverstripe/admin                             1.6.1   SilverStripe admin interface
silverstripe/asset-admin                       1.6.1   Asset management for the SilverStripe CMS
silverstripe/assets                            1.6.1   SilverStripe Assets component
silverstripe/blog                              3.5.1   A fresh take on blogging in Silverstripe set out to tackle the issue of a cluttered Site Tree.
silverstripe/campaign-admin                    1.6.0   SilverStripe campaign admin interface
silverstripe/cms                               4.6.0   The SilverStripe Content Management System
silverstripe/config                            1.0.18  SilverStripe configuration based on YAML and class statics
silverstripe/errorpage                         1.6.0   ErrorPage component for SilverStripe CMS
silverstripe/framework                         4.6.2   The SilverStripe framework
silverstripe/googlesitemaps                    2.1.6   SilverStripe support for the Google Sitemaps XML, enabling Google and other search engines to se...
silverstripe/graphql                           3.3.0   GraphQL server for SilverStripe models and other data
silverstripe/lumberjack                        2.0.2   A module to make managing pages in a GridField easy without losing any of the functionality that...
silverstripe/mimevalidator                     2.0.0   Checks uploaded file content roughly matches a known MIME type for the file extension.
silverstripe/recipe-cms                        4.6.1   SilverStripe recipe for fully featured page and asset content editing
silverstripe/recipe-core                       4.6.1   SilverStripe framework-only core recipe
silverstripe/recipe-plugin                     1.3.0   Helper plugin to install SilverStripe recipes
silverstripe/reports                           4.6.0   Reports module for SilverStripe CMS
silverstripe/siteconfig                        4.6.0   Site wide settings administration.
silverstripe/tagfield                          2.4.3   Tag field for SilverStripe
silverstripe/vendor-plugin                     1.4.1   Allows vendor modules to expose directories to the webroot
silverstripe/versioned                         1.6.2   SilverStripe Versioned component
silverstripe/versioned-admin                   1.6.0   SilverStripe versioned admin interface

Description

I’m not entirely sure, but I assume this is a framework issue. Google alerted me about broken structured data on one particular page:

image

The website is using framework v4.6.2., CMS v4.6.0 and silverstripe-social-metadata v5.1.2 (latest) by @xini. It generates a JSON with meta information in the head tag (http://json-ld.org) to help with SEO.

On one page (which contains a code snippet with </head> in the content) the JSON breaks. Surprisingly it breaks right in the middle of the JSON - at the position of the closing head-tag. Maybe there is some trigger caused by the </head>? I’m a bit unsure about the reason.

Steps to Reproduce

Please see the JSON in the head-tag. The attribute articleBody on https://bringyourownideas.com/blog/passwordless-login-with-laravel/ shows the issue.

Cheers!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments