Remove deploy-and-sync.md and MCP-related rule 13
MCP tooling is being removed, so deploy/sync docs and the critical rule about save_module with builder vars are no longer needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -104,7 +104,6 @@ Do NOT modify web-base files — they are shared across all projects.
|
|||||||
10. `enlace` (link) fields already include slashes
|
10. `enlace` (link) fields already include slashes
|
||||||
11. **File hooks (`hooks/*.php`) do NOT inject variables.** Always read params manually: `$params = json_decode(file_get_contents('php://input'), true) ?: [];` — Only module hooks (`modulos/*/hook.php`) receive variables directly.
|
11. **File hooks (`hooks/*.php`) do NOT inject variables.** Always read params manually: `$params = json_decode(file_get_contents('php://input'), true) ?: [];` — Only module hooks (`modulos/*/hook.php`) receive variables directly.
|
||||||
12. **`tipo` is a reserved variable.** The `.htaccess` injects `tipo=barra` on every request. Never use `tipo` as a hook parameter name — it gets overwritten, causing 404s. Use `account_type`, `user_tipo`, etc.
|
12. **`tipo` is a reserved variable.** The `.htaccess` injects `tipo=barra` on every request. Never use `tipo` as a hook parameter name — it gets overwritten, causing 404s. Use `account_type`, `user_tipo`, etc.
|
||||||
13. **Never pass `html` via `save_module` to modules with configured builder vars** (banners, carousels, modules with images/colors set from admin). It corrupts the visual configuration. Only pass `js` and/or `css`. See [docs/deploy-and-sync.md](docs/deploy-and-sync.md).
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
@@ -117,4 +116,4 @@ Do NOT modify web-base files — they are shared across all projects.
|
|||||||
- [docs/production-patterns.md](docs/production-patterns.md) — Real production patterns (header, zigzag, FAQ, forms)
|
- [docs/production-patterns.md](docs/production-patterns.md) — Real production patterns (header, zigzag, FAQ, forms)
|
||||||
- [docs/vue-builder-rules.md](docs/vue-builder-rules.md) — CMS-VUE rules (tabs, colorpicker, components)
|
- [docs/vue-builder-rules.md](docs/vue-builder-rules.md) — CMS-VUE rules (tabs, colorpicker, components)
|
||||||
- [docs/vue-builder-examples.md](docs/vue-builder-examples.md) — Vue builder examples (Banner Slideshow, etc.)
|
- [docs/vue-builder-examples.md](docs/vue-builder-examples.md) — Vue builder examples (Banner Slideshow, etc.)
|
||||||
- [docs/deploy-and-sync.md](docs/deploy-and-sync.md) — Deploy to production (save_module, sync, minified regeneration)
|
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
# Deploy & Sync
|
|
||||||
|
|
||||||
Reglas para desplegar módulos y secciones generales a producción via MCP, y para sincronizar con el servidor.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Protocolo para `save_module`
|
|
||||||
|
|
||||||
1. `save_module` con `html`, `js`, `css` — **LOS 3 SIEMPRE**. Si omites uno, se borra de prod (queda 0 bytes).
|
|
||||||
2. Ejecutar `check_module` → fuerza recompilación de `index-twig.tpl`
|
|
||||||
3. Visitar `?compiletwig` en una página que use el módulo
|
|
||||||
4. Verificar que renderiza
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## NUNCA pasar `html` a módulos con builder vars configurados
|
|
||||||
|
|
||||||
Módulos con sample data en el builder (banners, carouseles, módulos con imágenes/colores configurados desde el admin) se ROMPEN al recompilar el HTML. El `save_module` puede perder/corromper la configuración visual.
|
|
||||||
|
|
||||||
**Para estos módulos:**
|
|
||||||
- Solo pasar `js` y/o `css`, nunca `html`
|
|
||||||
- Si se rompe: `recover_git` con `list_git_log` para revertir
|
|
||||||
- Editar el HTML desde el panel admin de Acai, no por MCP
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Forzar regeneración de minified
|
|
||||||
|
|
||||||
Si subes solo `js`, el `minified/script-{hash}.js` NO se regenera automáticamente.
|
|
||||||
|
|
||||||
**Solución:**
|
|
||||||
1. Leer el HTML actual de prod con `get_module` (sections: `["html"]`)
|
|
||||||
2. Añadir un espacio al final
|
|
||||||
3. `save_module` con los 3 (html+espacio, js, css)
|
|
||||||
|
|
||||||
**IMPORTANTE:** Usar SIEMPRE el HTML de prod (`get_module`), NUNCA el local.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## General Sections (`custom-*`)
|
|
||||||
|
|
||||||
Se despliegan con `save_general_section`, no `save_module`:
|
|
||||||
- El módulo se llama `custom-{nombre_tabla}` (ej: `custom-productos`)
|
|
||||||
- Se sube con `table: "productos"`, `content`, `javascript`, `css`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Sync y Versionado
|
|
||||||
|
|
||||||
### Sync from server puede borrar módulos locales
|
|
||||||
El "Sync from server" puede eliminar módulos que existen en local pero no en el servidor. Si borra `custom-header` o `custom-footer`, TODAS las páginas crashean.
|
|
||||||
|
|
||||||
**Regla:** Hacer commit ANTES de cualquier sync.
|
|
||||||
|
|
||||||
### Sync solo sube archivos modificados
|
|
||||||
Para forzar un sync de un archivo sin cambios reales, añadir un espacio al final.
|
|
||||||
Reference in New Issue
Block a user