Previews not generating when set to unpublished on creation

Created on 17 October 2023, about 1 year ago
Updated 9 November 2023, about 1 year ago

Problem/Motivation

When creating new content that is set to unpublished, the content preview does not generate. Also, when changing published content from Published to Unpublished, the preview is deleted. The "Only trigger builds for published content" setting being unchecked is not recognized.

Steps to reproduce issue on unpublished content creation

  • Validate the Gatsby Integration module version is 2.0.0-rc6 - go to /admin/reports/updates and (cmd+f gatsby)
  • go to Content > Add Content > Page > enter a title, and lorem ipsum text in the Content wysiwyg text area, Uncheck "Published" > click Save
  • You should see that the preview does not display even after refresh

Steps to reproduce issue when unpublishing content

  • click Content > filter by published page > click a page > Edit > uncheck Published > Save
  • You should see that the preview does not display even after refresh

Proposed resolution

Add a check for the "Only trigger builds for published content" setting when inserting and deleting preview builds.

Assumptions

You have your Gatsby Integration module settings in Drupal configured to display Gatsby previews.
Example Configuration:

Gatsby Server URL=http://localhost:8000/
Preview Webhook URL(s)=http://localhost:8000/__refresh
Build Webhook URL(s)=http://localhost:8000/__refresh

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States coledev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024