Problem with “Object Type” unknown
-
Hi guys,
first of all, thanks for developing ths great plugin!
I’m trying to flush the cache of a custom endpoint automatically.
As I read here this only works if the “Object Type” is set in the list of the “Endpoint API Caches” in WordPress Backend.
My problem is that I’m not able to set the Object Type, it is always “unknown”, even if I try it with this code:
function wprc_determine_object_type( $object_type, $cache_key, $data, $uri ){ if($object_type !== 'unknown' || strpos( $uri, 'appdata/v1/articles' ) === false){ return $object_type; } return 'post'; }
The result in the “Endpoint API Cache” list are the following:
b8966941f22f6ad94908f5ec71b72674 /wp-json/wp/v2/posts [] GET post Flushed
27704311643cf55f8775637e561ea846 /wp-json/appdata/v1/articles [] GET unknown 2021-05-19 11:56:41As you see the Object Type is “unknown” and I also wonder about the other “v2/posts” entry…
I tried and read really a lot, but I wasn’t able to solve the problem.
I hope you could help!
- The topic ‘Problem with “Object Type” unknown’ is closed to new replies.