• Resolved csacchetti

    (@csacchetti)


    I have read various postings and it seems to me that my problem is due to the fact that Rest cache cannot recognize the type. There are some answers but being no practical of php I can’t solve the problem.

    my get command is: /wp-json/wp/v2/posts?_fields=id%2Cdate%2Ctitle%2Cauthor%2Ccontent%2Cfeatured_media%2Cbetter_featured_image&categories=124&page=1&per_page=100

    Is there a way Rest Cache recognize the type?

    • This topic was modified 4 years, 6 months ago by csacchetti.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Richard Korthuis

    (@rockfire)

    Hi @csacchetti

    Thank you for using our plugin!

    The problem is caused by your _fields parameter. You are limiting the number of fields returned by the REST API, which is perfectly fine. But in order for our plugin to correctly determine the correct object type we need the fields id and type (for a (custom) post type) or id and taxonomy (for a (custom) taxonomy). So in your case if you would add the type field to your _fields parameter, everything should work fine again.

    Thread Starter csacchetti

    (@csacchetti)

    thank you very much

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘unknown type – cache non Flush when modif’ is closed to new replies.