What's your biggest current challenge? Have your say in Community Polls along the right column.

Unable to create a Blog Article that is hidden

Unable to create a Blog Article that is hidden

benpow2
Visitor
2 0 0

I believe this is a bug but thought I would check here first.  I'm trying to create a hidden blog article, as a test here is my request:

 

 

 

{
  "article": {
    "title": "test",
    "body_html": "test body",
    "published": false,
    "published_at": "1976-05-26T00:00:00-00:00"
  }
}

 

 

 

Response:

 

 

 

{
  "article": {
    "id": 123,
    "title": "test",
    "created_at": "2024-05-21T08:35:29+01:00",
    "body_html": "test body",
    "blog_id": 123,
    "author": "Shopify API",
    "user_id": null,
    "published_at": "1976-05-26T01:00:00+01:00",
    "updated_at": "2024-05-21T08:35:29+01:00",
    "summary_html": null,
    "template_suffix": null,
    "handle": "test",
    "tags": "",
    "admin_graphql_api_id": "gid://shopify/OnlineStoreArticle/123"
  }
}

 

 

 

but the article is fully visible, ie., not hidden.  I've tried both POST and PUT requests to see if an update would do it but that also does not work.  Apparently there is no GraphQL versions of these requests yet either.

 

There is even an "example" of "Create an unpublished article for a blog" here https://shopify.dev/docs/api/admin-rest/2024-01/resources/article 

 

Any ideas?


Thanks.

Replies 2 (2)

Dan-From-Ryviu
Shopify Partner
10291 2043 2114

Did you check Visibility status of article in your store? Because liquid objects of article does not have published

https://shopify.dev/docs/api/liquid/objects/article

- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

benpow2
Visitor
2 0 0

Yeah, that's how I knew it wasn't working initially; the Visibility is marked as Visible and it shows up in the public Blog.  The response as you can see also does not return the field. 

 

Thanks.