Section + Entry Type + Product Type
Version 2.3.1
November 26, 2026
Fixed
- A single-select field with nothing chosen returns
nullagain. From 2.2.0 to 2.3.0 it returned'', so{% if entry.myField is not null %}was true for an empty field, and passing the value on (tocraft.app.entries.getSectionById(), say) failed. If a template or PHP code tests for the empty string strictly, change it:is same as('')and=== ''no longer match an empty field, so useis nulloris empty; andentry.myField ?? 'x'now gives'x'for an empty field.is empty,not entry.myField,== ''and|defaultbehave as before. Multi-select fields still return[], fields with Template Value set to Objects still return an empty object, and what is stored does not change. - Saving a Product Type field while Commerce is not installed or is disabled no longer empties its Allowed and Excluded lists. The settings show the lists as stored references with a notice, and the save keeps them. Saving such a field from code no longer fails with "Invalid product type selected."
- With Template Value set to Objects, an entry that holds product types keeps them when it is saved while Commerce is off. Saving the entry in the control panel, even with only its title edited, wrote the field back empty; if entries were saved in that state, check them. GraphQL returns the stored IDs of such a field, as it does with IDs.
- While Commerce is off, the input of a Product Type field says so and shows each stored selection as its ID, ticked. Before, it showed an empty control, or "No product types are allowed for this field yet", with no option for what the field held. With Template Value set to IDs the control panel still kept the value, because it posts only the fields an author changed; a form that posts every field would have saved it empty.
- An Allowed or Excluded entry that is neither text nor a whole number, which hand-edited project config can hold, is skipped. A nested list there broke the field's save.
Changed
- The plugin's name is written "Section + Entry Type + Product Type", with a capital T in "Entry Type".
- The plugin icon is the new one of the wmd.hr plugin family.
Added
storedIds()on the Objects value: every selected ID as stored. It equalsids(), except for a Product Type field while Commerce is off, where no product type can be loaded andall(),ids(),handles()andnames()give nothing.- GitHub Actions run the tests, ECS and PHPStan on the 2.x line.
Version 2.3.0
October 29, 2026
Changed
- The Allowed and Excluded lists of all four field types are saved as UIDs instead of numeric IDs. Field settings live in project config, which travels between environments, and the same ID names a different section (entry type, product type, tag group) on each install, so a field could offer the wrong sections after a deploy. Fields saved with IDs keep working: the IDs resolve on the install that reads them, and the next save of the field writes UIDs. An ID the install no longer has is dropped on save instead of being carried to the next environment.
- Excluded now applies in every mode. Before, it only applied with Select All on (and to the handle-text matches), so an exclusion next to an explicit Allowed list did nothing. Fields with Select All on behave as before; a field that both allows and excludes the same item now leaves it out.
Added
- PHPUnit, ECS and PHPStan dev setup (
composer test,composer check-cs,composer phpstan).
Unchanged
- Field values on entries are content, not project config, and are still stored as IDs.
Version 2.2.2
October 7, 2026
Fixed
- Saving a field no longer drops its Multiple, Select All, Part of handle, View mode and Value type settings (since 2.2.0 they lived on an abstract base class, which Craft leaves out of saved settings).
Version 2.2.1
September 20, 2026
Changed
- The repository moved to
WMD-hosting/craft-section-and-product-type; the oldcraft3-...URL redirects. Support and documentation links updated.
Version 2.2.0
September 20, 2026
Fixed
- The author-facing input only offered sections and product types the current user may edit, so an author without edit permission on a section could not see it in the field and lost the stored selection on save. The field picks what to list, not what to edit, so every section, entry type, product type and tag group is offered.
- A stored selection that has since been excluded in the field settings stays visible in the input instead of being dropped silently when the entry is saved.
- With "Template Value" set to Objects, single-select dropdowns and radio buttons did not pre-select the stored value.
- The empty-state message shown when a field has nothing allowed was not translatable.
- The Product Type field instantiated Commerce's service directly; it now goes through the Commerce plugin and offers nothing when Commerce is not installed instead of failing.
Changed
- The four field types share one base class and one pair of templates; behaviour and stored settings are unchanged.
getAllowedSections(),getAllowedEntryTypes(),getAllowedProductTypes()andgetAllowedGroups()still work and now proxygetAllowedItems(). - New icon.
Version 2.1.0
August 21, 2026
Downgrade warning
Once a field has been saved with the new View Mode or Template Value settings, rolling back to 2.0.x breaks the Control Panel, because the older code rejects the stored settings with an
UnknownPropertyException. Remove them first withphp craft project-config/remove fields.<field-uid>.settings.viewMode(and.valueType).
Added
- New Entry Type field. Craft 5 decoupled entry types from sections, so this selects entry types directly. It has the same settings as the other three field types.
- New "View Mode" setting on every field type. "List" keeps the existing radio button and checkbox rendering, "Dropdown" renders a select menu instead, which is easier to work with when there are a lot of options. Existing fields default to "List", so nothing changes until the setting is switched.
- New "Template Value" setting on every field type. "IDs" is the default and keeps returning the selected IDs exactly as before. "Objects" returns an object whose
all(),ids(),handles()andnames()methods give you the sections, product types, tag groups or entry types themselves. The object can still be handed straight to an element query, and the stored value is identical either way. - GraphQL support on every field type, for both queries and mutations. These fields were previously invisible to GraphQL.
- Element index columns now show the selected names. Previously the column was blank for multi select fields and showed a bare numeric ID for single select fields.
- "Select By Text In Handle" is now available on the Product Type and Tag Group fields, matching the Section field.
- The field settings now have a dedicated filter box that narrows the allowed and excluded lists by name or by handle.
Changed
- The
craftcms/cmsrequirement is now^5.0.0instead of^5.0.0-alpha.1.
Fixed
- The documentation and issues links in
composer.jsonpointed at a malformed URL, so the plugin store listing linked nowhere. - The field settings list filter never matched anything on Craft 5, because it looked for a CSS class that Craft no longer renders inside a checkbox group. It is now a scoped asset bundle shared by all four field types, and it filters the lists instead of colouring the matches.
Version 2.0.8
March 26, 2024
Changed
- Maintenance release.
Version 2.0.7
March 26, 2024
Changed
- Maintenance release.
Version 2.0.6
March 19, 2024
Changed
- Maintenance release.
Version 2.0.5
March 19, 2024
Changed
- Maintenance release.
Version 2.0.4
March 13, 2024
Added
- Craft CMS 5 support.
Version 2.0.3
May 12, 2023
Added
- Select section by part of handle functional was added
Version 2.0.2
May 12, 2023
Changed
- Maintenance release.
Version 2.0.1
October 25, 2022
Changed
- Craft CMS 4 is now the minimum requirement. Craft CMS 3 is no longer supported.
Version 2.0.0
May 20, 2022
Changed
- Maintenance release.
Version 1.1.0
May 20, 2022
Added
- Craft CMS 4 support, alongside Craft CMS 3.
Version 1.0.5
February 24, 2021
Changed
- Maintenance release.
Version 1.0.4
January 29, 2021
Changed
- Maintenance release.
Version 1.0.3
January 15, 2021
Changed
- Maintenance release.
Version 1.0.2
January 15, 2021
Changed
- Update logic
Version 1.0.1
January 15, 2021
Changed
- Maintenance release.
Version 1.0.0
December 23, 2020
Added
- Initial release