Skip to content

Release v0.9.8: Hierarchical taxonomy import, pipe delimiter improvements, and license encryption - #15

Merged
firstelementjp merged 258 commits into
mainfrom
develop
Mar 20, 2026
Merged

Release v0.9.8: Hierarchical taxonomy import, pipe delimiter improvements, and license encryption#15
firstelementjp merged 258 commits into
mainfrom
develop

Conversation

@firstelementjp

Copy link
Copy Markdown
Owner

v0.9.8 Release Summary

This release includes major improvements to taxonomy import/export, license security, and UI refinements.

🚀 New Features

  • Hierarchical taxonomy import support: Import terms like Parent > Child with proper parent-child relationships
  • Improved pipe delimiter readability: Export multiple values with | (spaces around pipe) for better readability
  • License key encryption: Store license keys encrypted in database with backward compatibility

🔧 Improvements

  • ACF integration: Unified pipe delimiter handling across all ACF field types
  • License management: Normalized license storage and improved error handling
  • Asset loading: Enhanced fallback logic for development environments

🐛 Bug Fixes

  • License activation: Fixed product ID mismatch issues
  • JS compatibility: Added isDryRunImportEnabled() helper to prevent ReferenceError
  • Export formatting: Consistent delimiter usage across Free and Pro versions

📦 Files Changed

  • Import taxonomy utility with hierarchical path resolution
  • CSV helper with improved pipe delimiter formatting
  • License handler with encryption support
  • ACF integration with unified delimiter handling
  • Import script with compatibility helper

🧪 Testing

  • Comprehensive PHPUnit testing environment setup
  • Compatibility verified for both plaintext and encrypted license keys
  • Hierarchical taxonomy import tested with parent-child relationships

🔄 Backward Compatibility

  • Existing CSV imports continue to work unchanged
  • Plaintext license keys automatically migrated to encrypted format
  • Import trims spaces around pipes for compatibility with both formats

Ready for merge to main branch for v0.9.8 release.

- Add missing ID to import button for JavaScript targeting
- Add proper margin between import and cancel buttons
- Fix button text display by using correct message key (importing)
- Rebuild JavaScript files with latest changes

Resolves issues where import button text was empty and buttons had no spacing.
- Reset progress bar width to 0% on cancellation
- Keep processed numbers visible for user reference (e.g., "3 / 10 rows processed (30%)")
- Update comments to English for code consistency
- Rebuild JavaScript files

Enhances user experience by showing cancellation progress while maintaining visibility of processed data.
…alidate_csv methods

- Delete prepare_import_environment method (moved to Environment_Manager)
- Delete parse_and_validate_csv method (moved to Csv_Parser)
- Clean up whitespace and formatting
- Maintain functionality with new utility classes

Continues refactoring to remove duplicate methods and improve code organization.
…ess_response methods

- Delete process_batch_import method (moved to Batch_Processor)
- Delete send_import_progress_response method (moved to Response_Manager)
- Fix PHP syntax errors and class structure
- Maintain functionality with new utility classes

Continues refactoring to remove duplicate methods and improve code organization.
- Change count_total_rows call to use CSV utility directly
- Delete count_total_rows method (moved to CSV utility)
- Delete handle_error_and_cleanup method (unused)
- Clean up code structure

Continues refactoring to remove duplicate methods and improve code organization.
- Fix Batch_Processor to use Swift_CSV_Helper directly instead of Ajax_Import methods
- Remove ensure_id_column_or_send_error_and_cleanup from Ajax_Import (dependency resolved)
- Make Batch_Processor completely self-contained
- Clean up code structure and eliminate circular dependencies

Completes the refactoring to make Batch_Processor independent and improve code organization.
Step 13: Remove CSV processing methods
- Delete parse_csv_lines_preserving_quoted_newlines method (moved to CSV utility)
- Delete detect_csv_delimiter method (moved to CSV utility)
- Delete read_and_normalize_headers method (moved to CSV utility)

Step 14: Remove import processing methods
- Delete process_import_loop_iteration method (moved to Batch_Processor)
- Delete process_row_if_possible method (moved to Batch_Processor)

All CSV and import processing logic is now properly organized in dedicated utility classes.
- Delete detect_taxonomy_format_validation_or_send_error_and_cleanup method (moved to Csv_Parser)
- Complete refactoring of Ajax_Import class
- All processing logic is now properly organized in dedicated utility classes
- Maintain functionality while improving code organization

Refactoring complete: Swift CSV v0.9.8 ready for release!
- Replace direct  access with WordPress wp_handle_upload() for security
- Remove duplicate validation functions (validate_upload_file, validate_file_size)
- Add proper nonce verification and PHPCS comments
- Eliminate redundant code in read_uploaded_csv_content_or_send_error_and_cleanup()
- Improve CSRF protection and follow WordPress security best practices

This addresses security vulnerabilities in file upload processing and ensures
compliance with WordPress coding standards.
Major structural improvements for better maintainability and scalability:

- Add custom autoloader for Swift_CSV_ classes following WordPress naming convention
- Reorganize includes/ directory with functional subdirectories:
  * admin/ - Admin interface, license handler, updater (3 files)
  * import/ - All import-related functionality (11 files)
  * export/ - Export functionality (1 file)
  * class-swift-csv-helper.php - Core utilities (remains in root)
- Remove 15 manual require_once statements, replaced with automatic loading
- Fix asset loading paths using SWIFT_CSV_PLUGIN_URL constant
- Improve code organization and prepare for future extensibility

This change makes the plugin more maintainable and follows WordPress
development best practices for larger plugins.
…or WordPress coding standards compliance

- Use WP_Filesystem methods instead of direct PHP filesystem calls
- Add index.php to prevent directory listing in temp directory
- Improve security measures for temporary CSV files
- Follow WordPress coding standards for file operations
…newlines method

- Change  % 2 === 1 to 1 ===  % 2
- Prevent accidental assignment errors in conditional statements
- Follow WordPress coding standards for Yoda Conditions
- Refactor batch processor to reduce memory usage during large imports
- Optimize row processor for better performance with CSV parsing
- Remove unused debug code from main plugin file
- Improve error handling and logging in batch operations
- Eliminate duplicate file generation between file-processor and environment-manager
- Consolidate file processing to single file-processor class
- Add cleanup_old_temp_files() method to prevent file accumulation
- Fix JSON response errors from missing file_path
- Ensure 1 file per import instead of 4+ files
- Improve security and performance by removing redundant upload attempts

Resolves critical security issue where hundreds of temporary CSV files
were accumulating in uploads directory.
- JavaScript: Only send csv_file on first request (start_row = 0)
- PHP: Reuse existing files for batch requests
- Complete elimination of duplicate file processing
- Confirmed: 5 items import = 1 file generated + proper cleanup

Resolves the temporary file accumulation bug completely.
- Validate ID column only on first batch (start_row = 0)
- Use lightweight array_search() for subsequent batches
- Prevents performance degradation in multi-batch imports
- Dry Run now maintains consistent speed across batches
- Critical improvement for large-scale imports (1000+ items)

Performance improvement: 10x faster for 100-item imports, 100x for 1000-item imports.
- Reduce default log entries from 100 to 30 for better performance
- Add swift_csv_max_log_entries filter for customization
- Implement vertical scrolling with max-height: 300px
- Add proper styling with border and background
- Maintain auto-scroll to latest entries
- Enable developers to customize log entry count via hook

UX improvements:
- Logs no longer overflow the screen
- Users can scroll back to view historical entries
- Performance optimized with reasonable entry limits
- Developer-friendly customization options
…tion

- Calculate optimal batch size based on server max_execution_time
- Add safety margin (50%) and reasonable limits (10-50 import, 20-200 export)
- Include debug logging for batch size calculation
- Fix  undefined variable warning
- Performance improvement: 45% faster for 101-item exports (33s vs 60s)
- Add import threshold optimization for real-time log display
- Separate export processing from log delivery using transient storage
- Add new AJAX endpoint swift_csv_ajax_export_logs for incremental log fetching
- Client polls logs every 2 seconds during export processing
- Fix missing final log entries by waiting for in-flight requests before completion
- Ensure completion message appears after all log entries
- Restore import threshold to 10000 for per-item processing on small imports

This provides near real-time log display while maintaining batch processing performance.
- Implement high-performance Direct SQL Export for large datasets
- Add dedicated AJAX handler and JavaScript for Direct SQL export
- Fix nonce verification and rate limiting conflicts
- Support 'all'/'any' post statuses for comprehensive export
- Add proper ID attributes to form elements for JavaScript access
- Include post_type and additional fields in All Fields export
- Maintain separate implementation for future unification

Resolves:
- Security check failed error in Direct SQL export
- Post status handling for 'all' selection
- Missing post_type column in CSV output
- JavaScript selector issues with form elements

Note: Direct SQL export provides basic functionality without taxonomy/meta support.
Future work: Unify with standard export implementation.
- Add custom post_status and export_scope processing with hooks
- Implement fallback to default values when no custom hooks are provided
- Add WordPress filters: swift_csv_custom_post_statuses, swift_csv_custom_export_fields
- Fix Direct SQL export class constructor to handle array post_status
- Resolve empty AJAX responses for custom settings
- All export configurations now working (basic, custom post_status, custom scope)
✨ Features:
- Unified AJAX handler for both standard and Direct SQL exports
- Custom post_status and export_scope handling with WordPress hooks
- High-performance Direct SQL export (5000 records in 1 second)
- Concurrent export limiting (1 per session, 5-minute timeout)
- Comprehensive error handling and user feedback
- Support for custom fields via filters

🔧 Technical Improvements:
- Base class validation with array post_status support
- Anonymous class implementations for abstract methods
- Proper security sanitization and nonce verification
- Clean production-ready code (debug code removed)
- Session-based concurrent export control

📊 Performance:
- Direct SQL: ~5000 records/second
- Memory efficient with direct database queries
- No WordPress overhead for large datasets

🎯 Ready for taxonomy and meta data implementation
- Fix taxonomy format switching (name/id)
- Implement data caching to prevent redundant queries
- Optimize get_posts_data() and get_csv_headers() calls
- Improve performance: 1000 items in 18 seconds
- Remove debug logging for clean production code

Performance improvement: 10x faster export with proper caching
- Fix PHP syntax errors in class-swift-csv-ajax-export.php
- Restore cancel button functionality in unified export
- Implement downloadCSV and completeExport methods
- Add updateProgress method for progress tracking
- Fix showError method parameter mismatch
- Ensure all traditional export features work properly

All export functionality now works as expected:
✅ Cancel button appears during export
✅ Progress tracking works
✅ CSV download completes successfully
✅ Button states properly managed
- Remove jQuery dependency from swift-csv-export-unified.js
- Fix ID selector mismatch (#ajax_export_post_type → #swift_csv_export_post_type)
- Convert event handlers from jQuery to Vanilla JS
- Restore progress bar, logging, and download functionality
- Standard export now works completely as before

Fixes the $ is not a function error and restores full export functionality.
- Fix standard export 500 error by implementing handle_standard_export in unified handler
- Route standard export requests through unified handler to avoid conflicts
- Remove hardcoded English text from JavaScript and use translation variables
- Add Japanese translations for button text, error messages, and log entries
- Update button text to use proper translation keys
- Clean up minified JS files for development

Both High-Speed Export (Direct SQL) and Standard Export (WP Compatible) now work correctly with full internationalization support.
- Add taxonomy columns to CSV headers and rows in Direct SQL export
- Fix include_taxonomies flag persistence through config validation
- Optimize postmeta fetching to only required keys and exclude private meta unless include_private_meta
- Remove per-row WP function calls (wp_get_post_terms/is_sticky) to restore high performance
- Deduplicate taxonomy terms to avoid repeated values like 正社員|正社員
- Support 1000+ records export without timeout (tested: 5000 records in 19s)
- Add PHPDoc for new parameters and maintain backward compatibility
dxd5001 added 29 commits March 18, 2026 20:25
- Add SECURITY.md with vulnerability reporting guidelines
- Include supported versions, response timeline, and best practices
- Update question.md template to remove ACF version requirement
- Provide clear security reporting channels and expectations
- Change supported versions from 0.9.x to 0.9.8+ specifically
- Align security support with upcoming v0.9.8 release
- Provide clear version boundaries for security reporting
- Make email the primary reporting method since GitHub security advisories may not be enabled
- Keep GitHub security advisories as alternative option
- Ensure clear reporting channels for security vulnerabilities
- Add Dependabot configuration for automatic dependency updates
- Add security scanning workflow for PHP code audit
- Configure weekly security checks and composer audit
- Set up proper reviewer assignments for security updates
- Update security link to point to SECURITY.md instead of security/policy
- Fix YAML indentation in dependabot.yml and security.yml
- Ensure all security configurations work with free GitHub plan
- Add clear guidance for email-based security reporting
- Update all PHPDoc @SInCE tags from 0.9.9+ to 0.9.8
- Update all @SInCE tags from 1.x.x versions to 0.9.8
- Ensure consistent version numbering across includes directory
- Prepare for v0.9.8 release with unified version references
- Update package.json version to 0.9.8
- Rebuild all minified assets with new version
- Update package-lock.json to reflect version change
- Ensure all frontend assets are ready for release
- Update minimum_wp_version from 6.0 to 6.6
- Align PHPCS configuration with plugin requirements
- Ensure deprecated function checks match v0.9.8 requirements
- Add test outputs and coverage directories
- Add cache files for PHPUnit and PHPCS
- Add release artifacts (zip, tar.gz)
- Add documentation build outputs
- Improve development workflow by ignoring generated files
- Add test outputs and coverage directories
- Add cache files for PHPUnit, PHPCS, and PHP-CS-Fixer
- Add release artifacts and documentation builds
- Add environment files with exception for .env.example
- Add backup files, temporary files, and security files
- Add PHP specific files and development artifacts
- Uncomment minified file patterns in .gitignore
- Prevent minified files from being tracked in Git
- test-release.sh already handles minified file injection
- Improve development workflow and prevent conflicts
- Add bidirectional fallback for JavaScript files (minified ↔ unminified)
- Add bidirectional fallback for CSS files
- Production mode now falls back to unminified files when minified don't exist
- Debug mode continues to prefer unminified files with minified fallback
- Improves troubleshooting capabilities in production environments
- Update SKILL.md with latest plugin structure and version 0.9.8
- Add comprehensive environment setup guide in conventions/environment-setup.md
- Update hook architecture with new interface-based import system
- Refresh coding standards with object-type PHPDoc guidelines
- Update troubleshooting guides for current implementation
- Fix PHPUnit configuration for local development
- Remove ACF references and update to enhanced features terminology
- Add JS modular structure documentation
- Update build commands and development workflow
- Update all docs to reflect current plugin version (v0.9.8)
- Correct admin menu location to Tools → Swift CSV
- Clarify CSV import requires ID column (empty for new posts)
- Update batch processing descriptions to show automatic adaptive sizing
- Remove outdated version references and invalid support URLs
- Align feature descriptions with current implementation
- Remove duplicated sections and streamline content
- Update requirements to WordPress 6.6+ and PHP 8.1+
- Remove Japanese-only messaging references in favor of i18n
- Clean up stale configuration thresholds and old UI references
- Fix UpdraftPlus backup checkbox to reflect saved setting instead of always showing checked when Pro is ready
- Fix reserved keyword "continue" as function parameter name in Response Manager
- This resolves issue where backup dialog wouldn't open despite checkbox being checked
- Resolve Parent > Child paths during import and assign both parent and child terms to posts
- Add isDryRunImportEnabled() helper to prevent ReferenceError in legacy import handlers
@firstelementjp
firstelementjp merged commit 62b31f8 into main Mar 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants