paulmassen / grav-plugin-seo

Manage your site’s meta tags for display in search engine results or social media networks. Create and manage json-ld microdata. Includes an easy-to-use live preview feature.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An exception has been thrown during the rendering of a template ("array_merge(): Argument #2 is not an array").

paulcosmos opened this issue · comments

I've used this plugin in the past (it's fantastic) but when using it with a site I'm currently developing, I get the following error when trying to access pages using a particular template (other pages so far are not affected):

An exception has been thrown during the rendering of a template ("array_merge(): Argument #2 is not an array").

Example of error:
Screenshot 2019-08-12 at 12 50 06

The metadata template is included in the head of the page template as per the instructions.
These pages are using a blueprint that extends the default yaml file, all I'm doing is using replace@ to insert my own fields into the first tab (the default 'Content' tab).

My yaml file content included below for reference (is there an issue with this perhaps?):

title: Facility
@extends:
    type: default
    context: blueprints://pages
form:
  fields:
    tabs:
      type: tabs
      active: 1

      # Replace the first tab in the admin page
      fields:
        content:
          replace@: true          
          type: tab
          title: PLUGIN_ADMIN.CONTENT
          fields:

            header.facility_title:
              type: text
              autofocus: true
              style: vertical
              label: Facility Title
            
            header.facility_summary:
              type: text
              style: vertical
              label: Summary (used for page snippets)

            header.facility_description:
              type: markdown
              style: vertical
              label: Facility Description

            header.facility_images:
              type: PageMedia
              label: Add images

Found the issue, the .md being used by the pages was an older version which had a field called 'summary'. This was conflicting with the plugin and throwing the error. Removing that solved the issue.