Sub-Pages — Troubleshooting: Form Issues¶
Part of: Troubleshooting See also: Data Hook | API Issues
Metadata Errors in Console¶
Symptom: Console shows errors like Object <objectName> not found in metadata.
Solution:
Verify
objectNamematches the IPA API object (e.g.,selinuxusermap,sudorule)Check that field
nameprops match actual API parameter namesEnsure metadata is loaded before rendering (check
isLoadingstate)
Table Data Handling¶
When displaying data in tables:
If the field should contain multiple values, ensure it’s typed as
string[]and excluded fromsimpleValuesin the utils file.If the received value is a comma-separated string, split it before displaying.
Rule of thumb: If a field represents a list that should display in a table, type it as string[] and exclude from simpleValues.
IPA API Metadata as Source of Truth¶
When a prompt specifies an IPA API object, the API metadata is the single source of truth.
The metadata defines:
Available parameters (
takes_params) — field names, types, constraintsAttribute members — relationships to other entities
Permissions and bindability — what operations are allowed
Before generating a sub-page, verify:
The entity’s TypeScript interface matches the API metadata
Field types align with the parameter definitions
Member fields (arrays) are correctly typed as
string[]
Post-Generation Quality Checks¶
Always run these checks after generating a sub-page:
npm run prettier:fix # Fix code formatting
npm run knip # Detect unused exports/files
npm run lint # Fix any errors (warnings ok)
npm run build # Catch TypeScript errors
Fix all errors before committing. See 08-checklist.md for details.