From a062529e82a497ea52f86579ed019360178994a1 Mon Sep 17 00:00:00 2001 From: FrankZamora Date: Thu, 27 Nov 2025 11:11:13 -0600 Subject: [PATCH] fix: Case-sensitivity en namespaces Wordpress -> WordPress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PROBLEMA: - El modal de contacto no se mostraba en producción (Linux) - Funcionaba en local (Windows) porque filesystem es case-insensitive - Carpeta: `WordPress` (con P mayúscula) - Namespaces: `Wordpress` (con p minúscula) SOLUCION: - Corregir todos los namespaces de `Wordpress` a `WordPress` - También corregir paths incorrectos `ROITheme\Component\...` a `ROITheme\Shared\...` ARCHIVOS CORREGIDOS (14): - functions.php - Admin/Infrastructure/Api/WordPress/AdminMenuRegistrar.php - Admin/Shared/Infrastructure/Api/WordPress/AdminAjaxHandler.php - Public/ContactForm/Infrastructure/Api/WordPress/ContactFormAjaxHandler.php - Public/Footer/Infrastructure/Api/WordPress/NewsletterAjaxHandler.php - Shared/Infrastructure/Api/WordPress/AjaxController.php - Shared/Infrastructure/Api/WordPress/MigrationCommand.php - Shared/Infrastructure/Di/DIContainer.php - Shared/Infrastructure/Persistence/WordPress/WordPressComponentRepository.php - Shared/Infrastructure/Persistence/WordPress/WordPressComponentSettingsRepository.php - Shared/Infrastructure/Persistence/WordPress/WordPressDefaultsRepository.php - Shared/Infrastructure/Services/CleanupService.php - Shared/Infrastructure/Services/SchemaSyncService.php - Shared/Infrastructure/Services/WordPressValidationService.php 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- Admin/Infrastructure/Api/WordPress/AdminMenuRegistrar.php | 2 +- .../Infrastructure/Api/WordPress/AdminAjaxHandler.php | 4 ++-- .../Api/WordPress/ContactFormAjaxHandler.php | 2 +- .../Api/WordPress/NewsletterAjaxHandler.php | 2 +- Shared/Infrastructure/Api/WordPress/AjaxController.php | 2 +- Shared/Infrastructure/Api/WordPress/MigrationCommand.php | 2 +- Shared/Infrastructure/Di/DIContainer.php | 6 +++--- .../WordPress/WordPressComponentRepository.php | 2 +- .../WordPress/WordPressComponentSettingsRepository.php | 2 +- .../Persistence/WordPress/WordPressDefaultsRepository.php | 2 +- Shared/Infrastructure/Services/CleanupService.php | 4 ++-- Shared/Infrastructure/Services/SchemaSyncService.php | 2 +- .../Services/WordPressValidationService.php | 2 +- functions.php | 8 ++++---- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Admin/Infrastructure/Api/WordPress/AdminMenuRegistrar.php b/Admin/Infrastructure/Api/WordPress/AdminMenuRegistrar.php index 9d701220..641e4d4a 100644 --- a/Admin/Infrastructure/Api/WordPress/AdminMenuRegistrar.php +++ b/Admin/Infrastructure/Api/WordPress/AdminMenuRegistrar.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace ROITheme\Admin\Infrastructure\Api\Wordpress; +namespace ROITheme\Admin\Infrastructure\Api\WordPress; use ROITheme\Admin\Domain\Contracts\MenuRegistrarInterface; use ROITheme\Admin\Domain\ValueObjects\MenuItem; diff --git a/Admin/Shared/Infrastructure/Api/WordPress/AdminAjaxHandler.php b/Admin/Shared/Infrastructure/Api/WordPress/AdminAjaxHandler.php index cb84f69d..f149c328 100644 --- a/Admin/Shared/Infrastructure/Api/WordPress/AdminAjaxHandler.php +++ b/Admin/Shared/Infrastructure/Api/WordPress/AdminAjaxHandler.php @@ -1,7 +1,7 @@ saveComponentSettingsUseCase !== null) { global $wpdb; - $repository = new \ROITheme\Shared\Infrastructure\Persistence\Wordpress\WordPressComponentSettingsRepository($wpdb); + $repository = new \ROITheme\Shared\Infrastructure\Persistence\WordPress\WordPressComponentSettingsRepository($wpdb); $updated = $repository->resetToDefaults($component, $schemaPath); wp_send_json_success([ diff --git a/Public/ContactForm/Infrastructure/Api/WordPress/ContactFormAjaxHandler.php b/Public/ContactForm/Infrastructure/Api/WordPress/ContactFormAjaxHandler.php index 94331556..23c69ba3 100644 --- a/Public/ContactForm/Infrastructure/Api/WordPress/ContactFormAjaxHandler.php +++ b/Public/ContactForm/Infrastructure/Api/WordPress/ContactFormAjaxHandler.php @@ -1,7 +1,7 @@ registerAll(); // === ADMIN AJAX HANDLER === - $adminAjaxHandler = new \ROITheme\Admin\Shared\Infrastructure\Api\Wordpress\AdminAjaxHandler( + $adminAjaxHandler = new \ROITheme\Admin\Shared\Infrastructure\Api\WordPress\AdminAjaxHandler( $saveComponentSettingsUseCase, $fieldMapperRegistry ); $adminAjaxHandler->register(); // Crear y registrar el handler AJAX para el Contact Form (público) - $contactFormAjaxHandler = new \ROITheme\Public\ContactForm\Infrastructure\Api\Wordpress\ContactFormAjaxHandler( + $contactFormAjaxHandler = new \ROITheme\Public\ContactForm\Infrastructure\Api\WordPress\ContactFormAjaxHandler( $container->getComponentSettingsRepository() ); $contactFormAjaxHandler->register(); // Crear y registrar el handler AJAX para Newsletter (público) - $newsletterAjaxHandler = new \ROITheme\Public\Footer\Infrastructure\Api\Wordpress\NewsletterAjaxHandler( + $newsletterAjaxHandler = new \ROITheme\Public\Footer\Infrastructure\Api\WordPress\NewsletterAjaxHandler( $container->getComponentSettingsRepository() ); $newsletterAjaxHandler->register();