Happening now | Office Hours: Customizing Your Theme With Dan-From-Ryviu | Ask your questions now!

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
11602 2273 2456

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 & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
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.