Skip to content

Add images to your Article Schema throws fatal error  #308

@shabnam611

Description

@shabnam611

Please give us a description of the issue

When I use the filter wpseo_schema_article and use the example code provided here, I see fatal error.

Steps to replicate:

  1. I used the code snippet plugin to add the example code.
  2. Changed the value of $attachment_id in the example. I added an image and used the ID for that image
  3. Then I saved the code and activated it.
  4. I checked a post where I set schema type as webpage and page type as article. I noticed fatal error in the page source that says: WPSEO_Schema_Image is not found.

Screenshot:
Screenshot 2024-06-22 at 4 02 34 PM

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions