Skip to content

Exclude hidden HubSpot fields from property mappings - #39

Merged
duncanmcclean merged 2 commits into
1.xfrom
38
Nov 26, 2026
Merged

duncanmcclean merged 2 commits into
1.xfrom
38

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

This pull request fixes an issue where the HubSpot connection would fail to load with an Undefined array key "label" error.

This was happening because HubSpot doesn't return a label for hidden fields. Since the connector summarises every non-archived form in the account, a single hidden field anywhere would break it.

This PR fixes it by excluding hidden fields from the list of properties you can map Statamic fields to. Hidden fields carry a default value configured in HubSpot rather than something a visitor enters, so there's nothing on a Statamic form to map to them. If someone does need them, we can always add them back.

Amp thread: https://ampcode.com/threads/T-01a217e6-19d9-7669-a90d-3f6d0240771f

Fixes #38

@duncanmcclean duncanmcclean changed the title Fix HubSpot connector crashing on fields without a label Exclude hidden HubSpot fields from property mappings Nov 26, 2026
@duncanmcclean
duncanmcclean merged commit 6344183 into 1.x Nov 26, 2026
19 checks passed
@duncanmcclean
duncanmcclean deleted the 38 branch November 26, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HubSpot connector crashes when a form contains a field without a label

1 participant