Changeset 3378249
- Timestamp:
- 10/14/2025 02:40:40 PM (4 months ago)
- Location:
- 1-click-migration/trunk
- Files:
-
- 5 edited
-
inc/admin/class-admin-page.php (modified) (1 diff)
-
inc/backup/class-ocm-backup.php (modified) (4 diffs)
-
js/admin-script.js (modified) (2 diffs)
-
one-click-migration.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
1-click-migration/trunk/inc/admin/class-admin-page.php
r3372639 r3378249 74 74 class="button button-primary button-large ocm-button restart-button">Restart</a> 75 75 </div> 76 77 <p class="ocm-exclusion-warning" style="display:none; color: #dc3232; margin-top: 10px; text-align: center;"> 78 <em>Please select at least one component to backup / restore.</em> 79 </p> 76 80 77 81 </form> -
1-click-migration/trunk/inc/backup/class-ocm-backup.php
r3376496 r3378249 327 327 328 328 if (!One_Click_Migration::$process_backup_single->is_queue_empty()) { 329 330 One_Click_Migration::$process_backup_single->handle_cron_healthcheck(); 329 // Queue already exists, just dispatch it 330 One_Click_Migration::$process_backup_single->dispatch(); 331 wp_safe_redirect(admin_url('tools.php?page=one-click-migration')); 331 332 exit; 332 333 } … … 444 445 } 445 446 } 446 // Use direct processing for maximum compatibility across all environments 447 // Async requests can be blocked by Cloudflare, firewalls, or security plugins 448 One_Click_Migration::write_to_log(' SYSLOG: Using direct processing for maximum compatibility'); 449 One_Click_Migration::$process_backup_single->save(); // Save the queue 450 One_Click_Migration::$process_backup_single->trigger_processing(); // Process it directly 451 447 // Save the queue and dispatch for processing 448 One_Click_Migration::$process_backup_single->save(); 449 450 // Try async dispatch first 451 $dispatched = One_Click_Migration::$process_backup_single->dispatch(); 452 453 if (is_wp_error($dispatched)) { 454 // If async dispatch fails, use direct processing for compatibility 455 One_Click_Migration::write_to_log(' SYSLOG: Async dispatch failed, using direct processing for maximum compatibility'); 456 One_Click_Migration::$process_backup_single->trigger_processing(); // Process it directly 457 } else { 458 One_Click_Migration::write_to_log(' SYSLOG: Backup dispatched asynchronously'); 459 } 460 461 // Redirect back to the admin page (Note: 500 error may still appear in console but is cosmetic only) 462 wp_safe_redirect(admin_url('tools.php?page=one-click-migration')); 452 463 exit; 453 464 } … … 489 500 490 501 if (!One_Click_Migration::$process_restore_single->is_queue_empty()) { 491 One_Click_Migration::$process_restore_single->handle_cron_healthcheck(); 502 // Queue already exists, just dispatch it 503 One_Click_Migration::$process_restore_single->dispatch(); 504 wp_safe_redirect(admin_url('tools.php?page=one-click-migration')); 492 505 exit; 493 506 } else { 494 507 One_Click_Migration::$process_restore_single->push_to_queue(array($username, $password)); 495 508 496 // Use direct processing for maximum compatibility across all environments 497 // Async requests can be blocked by Cloudflare, firewalls, or security plugins 498 One_Click_Migration::write_to_log(' SYSLOG: Using direct restore processing for maximum compatibility'); 499 One_Click_Migration::$process_restore_single->save(); // Save the queue 500 One_Click_Migration::$process_restore_single->trigger_processing(); // Process it directly 501 509 // Save the queue and dispatch for processing 510 One_Click_Migration::$process_restore_single->save(); 511 512 // Try async dispatch first 513 $dispatched = One_Click_Migration::$process_restore_single->dispatch(); 514 515 if (is_wp_error($dispatched)) { 516 // If async dispatch fails, use direct processing for compatibility 517 One_Click_Migration::write_to_log(' SYSLOG: Async dispatch failed, using direct restore processing for maximum compatibility'); 518 One_Click_Migration::$process_restore_single->trigger_processing(); // Process it directly 519 } else { 520 One_Click_Migration::write_to_log(' SYSLOG: Restore dispatched asynchronously'); 521 } 522 523 // Redirect back to the admin page 524 wp_safe_redirect(admin_url('tools.php?page=one-click-migration')); 502 525 exit; 503 526 } … … 1838 1861 $default_text = array( 1839 1862 'text' => 'Start a backup or a restore to see current progress here.</br></br>Entire process runs in the background, independent of your browser activity.</br> </br>If you get logged out during restore, log back in using your backup old WordPress credentials and refresh this page for progress.', 1840 'value' => ' 0%'1863 'value' => '1%' // Changed from 0% to 1% to prevent initial progress bar jump from 1% → 0% → 1% 1841 1864 ); 1842 1865 -
1-click-migration/trunk/js/admin-script.js
r3376496 r3378249 683 683 684 684 }); 685 686 // Hook into multiselect checkbox clicks to update button states 687 setTimeout(function() { 688 jQuery('#selective-backup_itemList').on('click', '.multiselect-checkbox', function() { 689 // Use setTimeout to let the multiselect library update the underlying select first 690 setTimeout(function() { 691 updateButtonStates(); 692 }, 10); 693 }); 694 }, 100); 685 695 686 696 }; 697 698 // Function to check if all components are excluded and disable buttons accordingly 699 var updateButtonStates = function() { 700 var selectedFolders = jQuery('#selective-backup').val() || []; 701 var allExcluded = selectedFolders.length === 4; // All 4 options selected means everything excluded 702 703 if (allExcluded) { 704 jQuery('.backup-button, .restore-button').addClass('disabled').attr('disabled', 'disabled'); 705 jQuery('.backup-button, .restore-button').css({ 706 'opacity': '0.5', 707 'cursor': 'not-allowed', 708 'pointer-events': 'none' 709 }); 710 jQuery('.ocm-exclusion-warning').show(); 711 } else { 712 jQuery('.backup-button, .restore-button').removeClass('disabled').removeAttr('disabled'); 713 jQuery('.backup-button, .restore-button').css({ 714 'opacity': '1', 715 'cursor': 'pointer', 716 'pointer-events': 'auto' 717 }); 718 jQuery('.ocm-exclusion-warning').hide(); 719 } 720 }; 687 721 688 722 var reloadPaypalButtons = function(){ … … 775 809 776 810 renderMultiselect(); 811 812 // Check button states on page load 813 updateButtonStates(); 814 777 815 reloadPaypalButtons(); 778 816 restartFailedProcess(); -
1-click-migration/trunk/one-click-migration.php
r3377780 r3378249 5 5 * Plugin URI: https://wordpress.org/plugins/1-click-migration/ 6 6 * Description: Migrate, copy, or clone your entire site with 1 click. <strong>Any host, no size limitation, no premium versions.</strong> 7 * Version: 2.3. 47 * Version: 2.3.5 8 8 * Author: 1ClickMigration 9 9 * Author URI: https://1clickmigration.com/ -
1-click-migration/trunk/readme.txt
r3377784 r3378249 5 5 Tested up to: 6.8.3 6 6 Requires PHP: 7.4 7 Stable tag: 2.3. 47 Stable tag: 2.3.5 8 8 Author URI: https://1clickmigration.com 9 9 License: GPLv3 or later … … 111 111 112 112 == Changelog == 113 = 2.3.5 = 114 * **UX Improvement**: Disable Backup/Restore buttons when all components are excluded to prevent empty backups 115 * **UX Improvement**: Fixed progress bar jump from 1% to 0% at the start of backup/restore operations 116 * **Bug Fix**: Added validation to prevent silent failures when attempting to backup with all components excluded 117 113 118 = 2.3.3 = 114 119 * **Bug Fix**: Fixed `is_processing()` method compatibility issue with different WP Background Processing library versions
Note: See TracChangeset
for help on using the changeset viewer.