Changeset 3461407
- Timestamp:
- 02/14/2026 03:47:28 PM (9 days ago)
- Location:
- apicoid-ghostwriter/trunk
- Files:
-
- 4 edited
-
apicoid-ghostwriter.php (modified) (8 diffs)
-
assets/js/article-generator.js (modified) (5 diffs)
-
assets/js/media-library.js (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
apicoid-ghostwriter/trunk/apicoid-ghostwriter.php
r3461338 r3461407 4 4 * Plugin URI: https://wordpress.org/plugins/apicoid-ghostwriter/ 5 5 * Description: Connects your WordPress site to Api.co.id to generate content and rewrite content automatically using AI. Features include article generation, content rewriting, automatic related article linking, SEO integration, and image generation. 6 * Version: 1.3. 26 * Version: 1.3.3 7 7 * Author: Api.co.id 8 8 * Author URI: https://api.co.id … … 21 21 22 22 // Define plugin constants 23 define( 'APICOID_GW_VERSION', '1.3. 2' );23 define( 'APICOID_GW_VERSION', '1.3.3' ); 24 24 define( 'APICOID_GW_DIR', plugin_dir_path( __FILE__ ) ); 25 25 define( 'APICOID_GW_URL', plugin_dir_url( __FILE__ ) ); … … 784 784 'Content-Type' => 'application/json', 785 785 ), 786 'timeout' => 300, // 5minutes timeout786 'timeout' => 600, // 10 minutes timeout 787 787 ) 788 788 ); … … 1095 1095 ), 1096 1096 'body' => wp_json_encode( $request_body ), 1097 'timeout' => 300, // 5minutes timeout for image generation1097 'timeout' => 600, // 10 minutes timeout for image generation 1098 1098 ) 1099 1099 ); … … 1531 1531 ), 1532 1532 'body' => wp_json_encode( $data ), 1533 'timeout' => 300, // 5minutes timeout for article generation1533 'timeout' => 600, // 10 minutes timeout for article generation 1534 1534 ) 1535 1535 ); … … 1995 1995 ), 1996 1996 'body' => wp_json_encode( $data ), 1997 'timeout' => 300, // 5minutes timeout for article rewriting1997 'timeout' => 600, // 10 minutes timeout for article rewriting 1998 1998 ) 1999 1999 ); … … 2270 2270 ), 2271 2271 'body' => wp_json_encode( $request_data ), 2272 'timeout' => 300, // 5minutes timeout for article suggestions2272 'timeout' => 600, // 10 minutes timeout for article suggestions 2273 2273 ) 2274 2274 ); … … 2451 2451 ), 2452 2452 'body' => wp_json_encode( $request_body ), 2453 'timeout' => 300, // 5minutes timeout for image generation2453 'timeout' => 600, // 10 minutes timeout for image generation 2454 2454 ) 2455 2455 ); -
apicoid-ghostwriter/trunk/assets/js/article-generator.js
r3461338 r3461407 497 497 }, 498 498 dataType: 'json', 499 timeout: 600000, // 10 minutes timeout 499 500 success: function(response) { 500 501 if (response.success) { … … 518 519 }, 519 520 error: function(xhr, status, error) { 520 // Show error message521 521 var errorMsg = 'Request failed. Please try again.'; 522 if (xhr.responseJSON && xhr.responseJSON.data && xhr.responseJSON.data.message) { 522 if (xhr.status === 504 || xhr.status === 502) { 523 errorMsg = 'Server timeout. The article may still be generating in the background. Please check your drafts after a few minutes.'; 524 } else if (status === 'timeout') { 525 errorMsg = 'Request timed out. The article may still be generating in the background. Please check your drafts after a few minutes.'; 526 } else if (xhr.responseJSON && xhr.responseJSON.data && xhr.responseJSON.data.message) { 523 527 errorMsg = xhr.responseJSON.data.message; 524 528 } … … 622 626 }, 623 627 dataType: 'json', 628 timeout: 600000, // 10 minutes timeout 624 629 success: function(response) { 625 630 if (response.success) { … … 643 648 }, 644 649 error: function(xhr, status, error) { 645 // Show error message646 650 var errorMsg = 'Request failed. Please try again.'; 647 if (xhr.responseJSON && xhr.responseJSON.data && xhr.responseJSON.data.message) { 651 if (xhr.status === 504 || xhr.status === 502) { 652 errorMsg = 'Server timeout. The article may still be generating in the background. Please check your drafts after a few minutes.'; 653 } else if (status === 'timeout') { 654 errorMsg = 'Request timed out. The article may still be generating in the background. Please check your drafts after a few minutes.'; 655 } else if (xhr.responseJSON && xhr.responseJSON.data && xhr.responseJSON.data.message) { 648 656 errorMsg = xhr.responseJSON.data.message; 649 657 } … … 1633 1641 type: 'POST', 1634 1642 data: ajaxData, 1635 timeout: 300000, // 5minutes timeout1643 timeout: 600000, // 10 minutes timeout 1636 1644 dataType: 'json', 1637 1645 success: function(response) { -
apicoid-ghostwriter/trunk/assets/js/media-library.js
r3457596 r3461407 422 422 prompt: prompt 423 423 }, 424 timeout: 300000, // 5minutes timeout424 timeout: 600000, // 10 minutes timeout 425 425 success: function(response) { 426 426 if (response.success) { -
apicoid-ghostwriter/trunk/readme.txt
r3461338 r3461407 5 5 Requires at least: 6.2 6 6 Tested up to: 6.9 7 Stable tag: 1.3. 27 Stable tag: 1.3.3 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 129 129 130 130 == Changelog == 131 132 = 1.3.3 = 133 * Increased all API timeouts to 10 minutes: All API calls to api.co.id (article generation, rewriting, suggestions, image generation) now use 600-second timeout to prevent premature request failures 134 * Improved AJAX timeout handling: Added 10-minute client-side timeout to Generate Article and Rewrite Article forms that were previously missing explicit timeouts 135 * Better error messages for timeouts: Generate and Rewrite forms now show informative messages when server timeout (502/504) occurs, letting users know the article may still be generating in the background 136 * Fixed false "Request failed" errors: Resolved issue where articles were successfully generated but users saw error alerts due to web server gateway timeouts 131 137 132 138 = 1.3.2 =
Note: See TracChangeset
for help on using the changeset viewer.