| name | quick-fix |
| description | Quick fixes for common issues (build errors, missing styles, validation) |
| allowed-tools | Read, Glob, Grep, Bash(ls *), Bash(cat *), Bash(npm *) |
Quickly diagnose and fix common DesignSetGo plugin issues.
What's the Problem?
- Build errors -
npm run build fails
- Styles not applying - Editor or frontend styles missing
- Block validation error - "This block contains unexpected or invalid content"
- Console errors - JavaScript errors in browser console
- Layout not working - Grid/flex/stack layout broken
- Colors not showing - Theme colors missing from picker
- Translation missing - Strings not translating
- wp-env not starting - Local development environment issues
Fix 1: Build Errors
Symptoms: npm run build fails with errors
Quick fixes:
rm -rf node_modules build
npm install
npm run build
npm run lint:js
npm run lint:css
npm run lint:php
Fix 2: Styles Not Applying
Editor Styles Missing
grep "@import" src/styles/editor.scss
cat build/index.css | grep "your-class-name"
npm run build
Frontend Styles Missing
grep "@import" src/styles/style.scss
cat build/style-index.css | grep "your-class-name"
npm run build
CRITICAL: Both style.scss and editor.scss must import block styles.
Fix 3: Block Validation Error
Symptoms: "This block contains unexpected or invalid content" or block shows recovery prompt
Common causes:
- Edit and save markup don't match
<div {...blockProps}>
<div className="inner">
<InnerBlocks />
</div>
</div>
<div {...blockProps}>
<InnerBlocks.Content />
</div>
const innerBlocksProps = useInnerBlocksProps(...);
<div {...innerBlocksProps} />
- Attributes changed without deprecation
{
"deprecated": [
{
"attributes": { },
"save": OldSaveComponent
}
]
}
- Using plain
<InnerBlocks /> instead of useInnerBlocksProps
<InnerBlocks />
const innerBlocksProps = useInnerBlocksProps();
<div {...innerBlocksProps} />
Fix 4: Console Errors
Check browser console for specific errors:
"Cannot find module '@wordpress/...'"
import { __ } from '@wordpress/i18n';
"useSelect is not a function"
import { useSelect } from '@wordpress/data';
"Attribute is undefined"
{
"attributes": {
"yourAttribute": {
"type": "string",
"default": ""
}
}
}
"Invalid hook call"
if (condition) {
const value = useSelect(...);
}
const value = useSelect(...);
if (condition && value) {
}
Fix 5: Layout Not Working
Symptom: Grid/flex/stack not applying to blocks
Fix: Use useInnerBlocksProps instead of plain <InnerBlocks />
<div style={{ display: 'grid' }}>
<InnerBlocks />
</div>
const innerBlocksProps = useInnerBlocksProps({
style: {
display: 'grid',
gridTemplateColumns: 'repeat(3, 1fr)',
gap: '20px'
}
});
return <div {...blockProps}><div {...innerBlocksProps} /></div>;
Save function must match:
const innerBlocksProps = useInnerBlocksProps.save({
style: {
display: 'grid',
gridTemplateColumns: 'repeat(3, 1fr)',
gap: '20px'
}
});
return <div {...blockProps}><div {...innerBlocksProps} /></div>;
Fix 6: Colors Not Showing
Symptom: Theme colors missing from color picker
Fix: Migrate to ColorGradientSettingsDropdown
See /color-controls-migrate command for complete migration guide.
Quick check:
grep -r "PanelColorSettings" src/blocks/your-block/
Fix 7: Translation Missing
Symptom: Strings appear in English instead of target language
Quick fixes:
npx wp i18n make-pot . languages/designsetgo.pot
msgmerge --update languages/designsetgo-nl_NL.po languages/designsetgo.pot
msgfmt languages/designsetgo-nl_NL.po -o languages/designsetgo-nl_NL.mo
Check for untranslated strings:
grep -r "'[A-Z][a-z]" src/ --include="*.js" | grep -v "__("
See /i18n-update for complete workflow.
Fix 8: wp-env Not Starting
Symptoms: npx wp-env start fails
Quick fixes:
npx wp-env stop
npx wp-env destroy
npx wp-env start
docker ps
lsof -i :8888
lsof -i :8889
kill -9 PID
General Troubleshooting
Clear everything and start fresh:
npx wp-env stop
rm -rf node_modules build
npm install
npm run build
npx wp-env start
Check plugin in browser:
- Open browser console (F12)
- Check for errors in Console tab
- Check Network tab for failed requests
- Look for specific error messages
Before Asking for Help
Run this diagnostic:
node --version
npm --version
npm run build
npm run lint:js
npm run lint:css
npm test
npx wp-env start
Reference Commands
For more detailed fixes:
/refactor - Refactor anti-patterns
/color-controls-migrate - Fix color controls
/i18n-update - Fix translations
/check-compat - Check WordPress compatibility
/build - Build troubleshooting