You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FOUR-34480: Reject unsupported Vocabulary assets during import - #9184
Importing the process package attached to FOUR-34480, which contains deprecated Vocabulary assets, can expose database exceptions when the required tables are absent or silently skip assets when their classes are unavailable.
Solution
Validate unsupported resources and dependencies before resolving models or processing the import.
Centralize compatibility rules for exact classes and namespace prefixes, initially covering Vocabulary.
Return an actionable validation message through HTTP and queued imports without exposing internal exceptions or silently discarding dependencies.
How to Test
Import the original process package attached to FOUR-34480. Validation must reject it with a message identifying Vocabulary and explaining how to correct the source process.
Confirm that no process or screen assets are created and another import can be attempted afterward.
Confirm that allowed class names with similar prefixes are not rejected by compatibility validation.
Tests: ImportUnsupportedVocabularyTest passed (15 tests, 33 assertions), covering configurable rules, dependency references, namespace boundaries, HTTP responses, and queue lock behavior. The original ticket attachment also passed the smoke test: validation rejected the package with a clear message and created no process or screen assets.
Medium Risk
Changes core import/manifest bootstrap and can block packages that previously failed silently; rules are config-driven but wrong prefixes could reject valid exports.
Overview
Import now rejects process packages that reference retired asset types (starting with Vocabulary) before models or exporters are resolved, instead of failing later or silently skipping missing classes.
A configurable unsupported_assets ruleset (import-export.php) matches exact class names and namespace prefixes on assets and dependents. Matches raise UnsupportedImportAssetException, which returns a 422 JSON body with a single actionable message (no stack trace). QueuedImportV2 jobs catch the same case, log that message, skip preview/import, and exit without leaving a manifest or holding the import lock.
Unit tests cover Vocabulary and generic rules, HTTP rendering, and queue lock behavior.
Reviewed by Cursor Bugbot for commit ab57dcb. Bugbot is set up for automated code reviews on this repo. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue & Reproduction Steps
Importing the process package attached to FOUR-34480, which contains deprecated Vocabulary assets, can expose database exceptions when the required tables are absent or silently skip assets when their classes are unavailable.
Solution
How to Test
Tests: ImportUnsupportedVocabularyTest passed (15 tests, 33 assertions), covering configurable rules, dependency references, namespace boundaries, HTTP responses, and queue lock behavior. The original ticket attachment also passed the smoke test: validation rejected the package with a clear message and created no process or screen assets.
Related Tickets & Packages
ci:deploy