Changeset 3414077
- Timestamp:
- 12/08/2025 10:06:11 AM (4 months ago)
- Location:
- ai-builder
- Files:
-
- 5 edited
- 48 copied
-
tags/2.3.10 (copied) (copied from ai-builder/trunk)
-
tags/2.3.10/admin/menu.php (copied) (copied from ai-builder/trunk/admin/menu.php)
-
tags/2.3.10/admin/pages/agent-chat.php (copied) (copied from ai-builder/trunk/admin/pages/agent-chat.php)
-
tags/2.3.10/admin/pages/credits.php (copied) (copied from ai-builder/trunk/admin/pages/credits.php)
-
tags/2.3.10/admin/pages/multi-page.php (copied) (copied from ai-builder/trunk/admin/pages/multi-page.php)
-
tags/2.3.10/admin/pages/settings.php (copied) (copied from ai-builder/trunk/admin/pages/settings.php)
-
tags/2.3.10/admin/pages/translation-settings.php (copied) (copied from ai-builder/trunk/admin/pages/translation-settings.php)
-
tags/2.3.10/admin/pages/tuto.php (copied) (copied from ai-builder/trunk/admin/pages/tuto.php)
-
tags/2.3.10/aibui-builder.php (copied) (copied from ai-builder/trunk/aibui-builder.php) (2 diffs)
-
tags/2.3.10/assets/css/account.css (copied) (copied from ai-builder/trunk/assets/css/account.css)
-
tags/2.3.10/assets/css/credits.css (copied) (copied from ai-builder/trunk/assets/css/credits.css)
-
tags/2.3.10/assets/css/language-switcher.css (copied) (copied from ai-builder/trunk/assets/css/language-switcher.css)
-
tags/2.3.10/assets/css/multi-page.css (copied) (copied from ai-builder/trunk/assets/css/multi-page.css)
-
tags/2.3.10/assets/css/translation.css (copied) (copied from ai-builder/trunk/assets/css/translation.css)
-
tags/2.3.10/assets/js/account.js (copied) (copied from ai-builder/trunk/assets/js/account.js)
-
tags/2.3.10/assets/js/agent-chat.js (copied) (copied from ai-builder/trunk/assets/js/agent-chat.js)
-
tags/2.3.10/assets/js/build/index.asset.php (copied) (copied from ai-builder/trunk/assets/js/build/index.asset.php)
-
tags/2.3.10/assets/js/build/index.js (copied) (copied from ai-builder/trunk/assets/js/build/index.js)
-
tags/2.3.10/assets/js/chat-widget.js (copied) (copied from ai-builder/trunk/assets/js/chat-widget.js) (2 diffs)
-
tags/2.3.10/assets/js/credits.js (copied) (copied from ai-builder/trunk/assets/js/credits.js)
-
tags/2.3.10/assets/js/language-switcher-block.js (copied) (copied from ai-builder/trunk/assets/js/language-switcher-block.js)
-
tags/2.3.10/assets/js/multi-page-apply.js (copied) (copied from ai-builder/trunk/assets/js/multi-page-apply.js)
-
tags/2.3.10/assets/js/multi-page.js (copied) (copied from ai-builder/trunk/assets/js/multi-page.js) (4 diffs)
-
tags/2.3.10/assets/js/pattern-translation.js (copied) (copied from ai-builder/trunk/assets/js/pattern-translation.js)
-
tags/2.3.10/assets/js/settings.js (copied) (copied from ai-builder/trunk/assets/js/settings.js)
-
tags/2.3.10/assets/js/src/editor-blocks/ai-block/ai-block.js (copied) (copied from ai-builder/trunk/assets/js/src/editor-blocks/ai-block/ai-block.js)
-
tags/2.3.10/assets/js/src/editor-blocks/image-ai-blocks/image-ai-controls.js (copied) (copied from ai-builder/trunk/assets/js/src/editor-blocks/image-ai-blocks/image-ai-controls.js)
-
tags/2.3.10/assets/js/src/editor-blocks/text-ai-blocks/text-ai-controls.js (copied) (copied from ai-builder/trunk/assets/js/src/editor-blocks/text-ai-blocks/text-ai-controls.js)
-
tags/2.3.10/assets/js/translation.js (copied) (copied from ai-builder/trunk/assets/js/translation.js)
-
tags/2.3.10/composer.json (copied) (copied from ai-builder/trunk/composer.json)
-
tags/2.3.10/composer.lock (copied) (copied from ai-builder/trunk/composer.lock)
-
tags/2.3.10/debug-language.log (copied) (copied from ai-builder/trunk/debug-language.log)
-
tags/2.3.10/debug-template-part.log (copied) (copied from ai-builder/trunk/debug-template-part.log)
-
tags/2.3.10/debug-unescape.log (copied) (copied from ai-builder/trunk/debug-unescape.log)
-
tags/2.3.10/includes/class-agent-chat-handler.php (copied) (copied from ai-builder/trunk/includes/class-agent-chat-handler.php)
-
tags/2.3.10/includes/class-agent-discovery-service.php (copied) (copied from ai-builder/trunk/includes/class-agent-discovery-service.php)
-
tags/2.3.10/includes/class-agent-execution-service.php (copied) (copied from ai-builder/trunk/includes/class-agent-execution-service.php)
-
tags/2.3.10/includes/class-agent-security-service.php (copied) (copied from ai-builder/trunk/includes/class-agent-security-service.php)
-
tags/2.3.10/includes/class-ajax-handler.php (copied) (copied from ai-builder/trunk/includes/class-ajax-handler.php) (1 diff)
-
tags/2.3.10/includes/class-css-handler.php (copied) (copied from ai-builder/trunk/includes/class-css-handler.php)
-
tags/2.3.10/includes/class-generations-storage.php (copied) (copied from ai-builder/trunk/includes/class-generations-storage.php)
-
tags/2.3.10/includes/class-translation-handler.php (copied) (copied from ai-builder/trunk/includes/class-translation-handler.php)
-
tags/2.3.10/includes/class-translation-manager.php (copied) (copied from ai-builder/trunk/includes/class-translation-manager.php)
-
tags/2.3.10/includes/class-translation-settings.php (copied) (copied from ai-builder/trunk/includes/class-translation-settings.php)
-
tags/2.3.10/includes/class-translation-switcher.php (copied) (copied from ai-builder/trunk/includes/class-translation-switcher.php)
-
tags/2.3.10/package-lock.json (copied) (copied from ai-builder/trunk/package-lock.json)
-
tags/2.3.10/readme.txt (copied) (copied from ai-builder/trunk/readme.txt) (1 diff)
-
tags/2.3.10/templates (copied) (copied from ai-builder/trunk/templates)
-
trunk/aibui-builder.php (modified) (2 diffs)
-
trunk/assets/js/chat-widget.js (modified) (2 diffs)
-
trunk/assets/js/multi-page.js (modified) (4 diffs)
-
trunk/includes/class-ajax-handler.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ai-builder/tags/2.3.10/aibui-builder.php
r3414040 r3414077 4 4 * Plugin URI: https://website-ai-builder.com/ 5 5 * Description: This plugin is used to build your website with AI. 6 * Version: 2.3. 96 * Version: 2.3.10 7 7 * Author: enkic 8 8 * Author URI: https://enkicorbin.fr/ … … 18 18 19 19 // Définir la version du plugin 20 define('AIBUI_VERSION', '2.3. 9');20 define('AIBUI_VERSION', '2.3.10'); 21 21 22 22 // Simple CSS minifier (safe whitespace/comment removal) -
ai-builder/tags/2.3.10/assets/js/chat-widget.js
r3413458 r3414077 430 430 } 431 431 432 let timeoutId; 432 433 try { 434 // Create AbortController for timeout 435 const controller = new AbortController(); 436 timeoutId = setTimeout(() => controller.abort(), 20000); // 20 second timeout 437 433 438 const res = await fetch(window.ajaxurl, { 434 439 method: "POST", 435 440 headers: { "Content-Type": "application/x-www-form-urlencoded" }, 436 441 body: `action=aibui_get_token&nonce=${window.aiBuilderNonce}`, 442 signal: controller.signal, 437 443 }); 438 444 445 clearTimeout(timeoutId); 446 439 447 if (!res.ok) { 448 // Handle 500 errors specifically 449 if (res.status === 500) { 450 throw new Error("Server error: The request took too long or encountered an error. Please try again."); 451 } 440 452 throw new Error(`HTTP error! status: ${res.status}`); 441 453 } … … 451 463 ); 452 464 } catch (error) { 465 if (timeoutId) { 466 clearTimeout(timeoutId); 467 } 453 468 console.error("Error fetching JWT token:", error); 469 470 // Handle timeout/abort errors 471 if (error.name === 'AbortError' || error.message.includes('timeout')) { 472 throw new Error("Request timeout: The server took too long to respond. Please check your connection and try again."); 473 } 474 454 475 showAIMissingAccountToast(); 455 476 throw error; -
ai-builder/tags/2.3.10/assets/js/multi-page.js
r3414040 r3414077 75 75 async function ensurePremiumAccess() { 76 76 try { 77 // Create AbortController for timeout 78 const controller = new AbortController(); 79 const timeoutId = setTimeout(() => controller.abort(), 20000); // 10 second timeout 80 77 81 const tokenResponse = await fetch(ajaxurl, { 78 82 method: "POST", 79 83 headers: { "Content-Type": "application/x-www-form-urlencoded" }, 80 84 body: "action=aibui_get_token&nonce=" + aiBuilderVars.nonce, 85 signal: controller.signal, 81 86 }); 87 88 if (!tokenResponse.ok) { 89 if (tokenResponse.status === 500) { 90 disableMultiPageAccess("Server error: The request took too long. Please refresh the page and try again."); 91 } else { 92 disableMultiPageAccess("Unable to verify authentication. Please refresh the page."); 93 } 94 return false; 95 } 96 97 clearTimeout(timeoutId); 82 98 83 99 const tokenData = await tokenResponse.json(); … … 113 129 return true; 114 130 } catch (error) { 131 if (typeof timeoutId !== 'undefined' && timeoutId) { 132 clearTimeout(timeoutId); 133 } 115 134 console.error("Error verifying premium access:", error); 116 disableMultiPageAccess("Unable to verify your subscription at this time. Please try again later."); 135 136 // Handle timeout/abort errors 137 if (error.name === 'AbortError' || error.message.includes('timeout')) { 138 disableMultiPageAccess("Request timeout: The server took too long to respond. Please check your connection and try again."); 139 } else { 140 disableMultiPageAccess("Unable to verify your subscription at this time. Please try again later."); 141 } 117 142 return false; 118 143 } … … 408 433 const progressSimulator = simulateProgress(fillElement); 409 434 435 let timeoutId; 410 436 try { 411 // Get JWT token 437 // Get JWT token with timeout 438 const controller = new AbortController(); 439 timeoutId = setTimeout(() => controller.abort(), 10000); // 10 second timeout 440 412 441 const tokenResponse = await fetch(ajaxurl, { 413 442 method: "POST", 414 443 headers: { "Content-Type": "application/x-www-form-urlencoded" }, 415 444 body: "action=aibui_get_token&nonce=" + aiBuilderVars.nonce, 445 signal: controller.signal, 416 446 }); 447 448 clearTimeout(timeoutId); 449 450 if (!tokenResponse.ok) { 451 if (tokenResponse.status === 500) { 452 progressSimulator.complete(); 453 throw new Error("Server error: The request took too long or encountered an error. Please try again."); 454 } 455 progressSimulator.complete(); 456 throw new Error(`HTTP error! status: ${tokenResponse.status}`); 457 } 417 458 418 459 const tokenData = await tokenResponse.json(); … … 480 521 481 522 } catch (error) { 523 if (timeoutId) { 524 clearTimeout(timeoutId); 525 } 482 526 console.error("Error generating page:", error); 483 527 progressSimulator.complete(); 528 529 // Handle timeout/abort errors 530 if (error.name === 'AbortError' || error.message.includes('timeout')) { 531 return { success: false, error: "Request timeout: The server took too long to respond. Please check your connection and try again." }; 532 } 533 484 534 return { success: false, error: error.message }; 485 535 } -
ai-builder/tags/2.3.10/includes/class-ajax-handler.php
r3414040 r3414077 99 99 public function get_token() 100 100 { 101 // Increase timeout for this request (in case DB is slow) 102 // Default is usually 30s, but some hosts have shorter limits 103 @set_time_limit(60); // Allow up to 60 seconds 104 101 105 // Vérifier que les données POST existent 102 106 if (!isset($_POST['nonce'])) { -
ai-builder/tags/2.3.10/readme.txt
r3414040 r3414077 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 2.3. 97 Stable tag: 2.3.10 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
ai-builder/trunk/aibui-builder.php
r3414040 r3414077 4 4 * Plugin URI: https://website-ai-builder.com/ 5 5 * Description: This plugin is used to build your website with AI. 6 * Version: 2.3. 96 * Version: 2.3.10 7 7 * Author: enkic 8 8 * Author URI: https://enkicorbin.fr/ … … 18 18 19 19 // Définir la version du plugin 20 define('AIBUI_VERSION', '2.3. 9');20 define('AIBUI_VERSION', '2.3.10'); 21 21 22 22 // Simple CSS minifier (safe whitespace/comment removal) -
ai-builder/trunk/assets/js/chat-widget.js
r3413458 r3414077 430 430 } 431 431 432 let timeoutId; 432 433 try { 434 // Create AbortController for timeout 435 const controller = new AbortController(); 436 timeoutId = setTimeout(() => controller.abort(), 20000); // 20 second timeout 437 433 438 const res = await fetch(window.ajaxurl, { 434 439 method: "POST", 435 440 headers: { "Content-Type": "application/x-www-form-urlencoded" }, 436 441 body: `action=aibui_get_token&nonce=${window.aiBuilderNonce}`, 442 signal: controller.signal, 437 443 }); 438 444 445 clearTimeout(timeoutId); 446 439 447 if (!res.ok) { 448 // Handle 500 errors specifically 449 if (res.status === 500) { 450 throw new Error("Server error: The request took too long or encountered an error. Please try again."); 451 } 440 452 throw new Error(`HTTP error! status: ${res.status}`); 441 453 } … … 451 463 ); 452 464 } catch (error) { 465 if (timeoutId) { 466 clearTimeout(timeoutId); 467 } 453 468 console.error("Error fetching JWT token:", error); 469 470 // Handle timeout/abort errors 471 if (error.name === 'AbortError' || error.message.includes('timeout')) { 472 throw new Error("Request timeout: The server took too long to respond. Please check your connection and try again."); 473 } 474 454 475 showAIMissingAccountToast(); 455 476 throw error; -
ai-builder/trunk/assets/js/multi-page.js
r3414040 r3414077 75 75 async function ensurePremiumAccess() { 76 76 try { 77 // Create AbortController for timeout 78 const controller = new AbortController(); 79 const timeoutId = setTimeout(() => controller.abort(), 20000); // 10 second timeout 80 77 81 const tokenResponse = await fetch(ajaxurl, { 78 82 method: "POST", 79 83 headers: { "Content-Type": "application/x-www-form-urlencoded" }, 80 84 body: "action=aibui_get_token&nonce=" + aiBuilderVars.nonce, 85 signal: controller.signal, 81 86 }); 87 88 if (!tokenResponse.ok) { 89 if (tokenResponse.status === 500) { 90 disableMultiPageAccess("Server error: The request took too long. Please refresh the page and try again."); 91 } else { 92 disableMultiPageAccess("Unable to verify authentication. Please refresh the page."); 93 } 94 return false; 95 } 96 97 clearTimeout(timeoutId); 82 98 83 99 const tokenData = await tokenResponse.json(); … … 113 129 return true; 114 130 } catch (error) { 131 if (typeof timeoutId !== 'undefined' && timeoutId) { 132 clearTimeout(timeoutId); 133 } 115 134 console.error("Error verifying premium access:", error); 116 disableMultiPageAccess("Unable to verify your subscription at this time. Please try again later."); 135 136 // Handle timeout/abort errors 137 if (error.name === 'AbortError' || error.message.includes('timeout')) { 138 disableMultiPageAccess("Request timeout: The server took too long to respond. Please check your connection and try again."); 139 } else { 140 disableMultiPageAccess("Unable to verify your subscription at this time. Please try again later."); 141 } 117 142 return false; 118 143 } … … 408 433 const progressSimulator = simulateProgress(fillElement); 409 434 435 let timeoutId; 410 436 try { 411 // Get JWT token 437 // Get JWT token with timeout 438 const controller = new AbortController(); 439 timeoutId = setTimeout(() => controller.abort(), 10000); // 10 second timeout 440 412 441 const tokenResponse = await fetch(ajaxurl, { 413 442 method: "POST", 414 443 headers: { "Content-Type": "application/x-www-form-urlencoded" }, 415 444 body: "action=aibui_get_token&nonce=" + aiBuilderVars.nonce, 445 signal: controller.signal, 416 446 }); 447 448 clearTimeout(timeoutId); 449 450 if (!tokenResponse.ok) { 451 if (tokenResponse.status === 500) { 452 progressSimulator.complete(); 453 throw new Error("Server error: The request took too long or encountered an error. Please try again."); 454 } 455 progressSimulator.complete(); 456 throw new Error(`HTTP error! status: ${tokenResponse.status}`); 457 } 417 458 418 459 const tokenData = await tokenResponse.json(); … … 480 521 481 522 } catch (error) { 523 if (timeoutId) { 524 clearTimeout(timeoutId); 525 } 482 526 console.error("Error generating page:", error); 483 527 progressSimulator.complete(); 528 529 // Handle timeout/abort errors 530 if (error.name === 'AbortError' || error.message.includes('timeout')) { 531 return { success: false, error: "Request timeout: The server took too long to respond. Please check your connection and try again." }; 532 } 533 484 534 return { success: false, error: error.message }; 485 535 } -
ai-builder/trunk/includes/class-ajax-handler.php
r3414040 r3414077 99 99 public function get_token() 100 100 { 101 // Increase timeout for this request (in case DB is slow) 102 // Default is usually 30s, but some hosts have shorter limits 103 @set_time_limit(60); // Allow up to 60 seconds 104 101 105 // Vérifier que les données POST existent 102 106 if (!isset($_POST['nonce'])) { -
ai-builder/trunk/readme.txt
r3414040 r3414077 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 2.3. 97 Stable tag: 2.3.10 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.