Skip to content

Commit 44a6963

Browse files
committed
fix(wordpress): keep searchType subBlock id to preserve saved-workflow compat
The type/subtype fix should only change which API param the field feeds (subtype, not type) — renaming the subBlock id to searchSubtype broke already-saved workflows with a search content-type filter set, since the block would stop reading the old searchType key. Reverted the id rename, kept the underlying subtype mapping fix. Flagged by Cursor Bugbot.
1 parent b69c906 commit 44a6963

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

apps/sim/blocks/blocks/wordpress.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
624624
required: { field: 'operation', value: 'wordpress_search_content' },
625625
},
626626
{
627-
id: 'searchSubtype',
627+
id: 'searchType',
628628
title: 'Content Type',
629629
type: 'dropdown',
630630
options: [
@@ -1111,7 +1111,7 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
11111111
query: params.query,
11121112
perPage: params.perPage ? Number(params.perPage) : undefined,
11131113
page: params.page ? Number(params.page) : undefined,
1114-
subtype: params.searchSubtype || undefined,
1114+
subtype: params.searchType || undefined,
11151115
}
11161116
default:
11171117
return baseParams
@@ -1172,9 +1172,10 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
11721172
roles: { type: 'string', description: 'User roles filter' },
11731173
// Search inputs
11741174
query: { type: 'string', description: 'Search query' },
1175-
searchSubtype: {
1175+
searchType: {
11761176
type: 'string',
1177-
description: 'Content subtype filter (post, page, attachment)',
1177+
description:
1178+
'Content subtype filter (post, page, attachment) — maps to the API subtype param',
11781179
},
11791180
// List inputs
11801181
perPage: { type: 'number', description: 'Results per page' },

0 commit comments

Comments
 (0)