Technodrome AI Content Assistant Changelog

More
6 months 6 days ago #69 by admin
# Changelog= 3.2.5 - 2025-11-04 =
* **ENHANCEMENT:** Web Sources Enhancement for Premium Users - Improved web sources validation and integration for AI content generation
* **IMPROVEMENT:** Enhanced URL validation system with fixed infinite checking loop issue - button now properly returns to normal state after validation
* **IMPROVEMENT:** Web sources are now properly integrated into AI prompts for premium generation modes (ai_with_rules and rules_only)
* **IMPROVEMENT:** Fixed validation logic to prevent "checking" state from persisting indefinitely
* **TECHNICAL:** Replaced jQuery each() with JavaScript for loop for synchronous validation in websources-input.js
* **TECHNICAL:** Enhanced error handling and user feedback for web sources input validation

## Version 3.2.3 - Custom Builder Template 6 Preview Persistence Fix (2025-10-16)
### CRITICAL FIXES
- **Custom Builder Template 6 Preview Persistence:** Fixed critical issue where canvas preview was not persisting after user login and profile switching
- **Root Cause:** Timing issue between JavaScript module initialization and profile data loading
- **Solution:** Enhanced `advanced-template.js` with dedicated `handlePreloadedCanvasData()` function that runs after initialization
- **Implementation:** Added 300ms timeout check to ensure canvas data loads even when plugin initializes on different tabs

### MAJOR IMPROVEMENTS
- **Canvas Data Loading Logic:** Complete overhaul of canvas initialization flow
- **New Method:** `handlePreloadedCanvasData()` checks for existing canvas data and Template 6 selection
- **Timing Fix:** Canvas now loads immediately if Template 6 is active and data exists
- **Fallback:** Graceful handling for scenarios where canvas data is not yet available
- **Enhanced Event Handling:** Improved template and profile change event processing
- **Template Switching:** Canvas data auto-loads when user switches to Template 6
- **Profile Changes:** Immediate canvas restoration when switching between profiles
- **Initial Load:** Proper canvas initialization on page load if Template 6 is selected
- **Robust Data Validation:** Enhanced canvas data validation and error handling
- **Input Validation:** Strict validation for canvas data format and structure
- **Error Handling:** Try-catch blocks with detailed error logging for each element
- **Data Recovery:** Graceful handling of corrupted or missing element data
- **Improved User Experience:** Enhanced notifications and feedback
- **Debug Logging:** Detailed console logs for canvas operations and data flow
- **User Feedback:** Clear status messages during canvas loading and operations
- **Persistence Guarantee:** Users now see their saved layouts immediately after login

### TECHNICAL CHANGES
- **JavaScript File:** `features/layout-templates-tab/advanced-template.js`
- **New Function:** `handlePreloadedCanvasData()` - Centralized canvas data loading logic
- **Enhanced `init()`:** Added timeout call to `handlePreloadedCanvasData()`
- **Improved `setValue()`:** Better validation, error handling, and element rendering
- **Robust `saveCanvasData()`:** Enhanced validation and safe data extraction
- **Enhanced `getValue()`:** Better handling of edge cases and empty data
- **New Helper:** `clearCanvasDisplay()` - Safe canvas clearing with data preservation
- **Profile Integration:** Enhanced data flow between profile loading and canvas rendering
- **Event System:** Improved `taics_template_changed` and `taics_profile_changed` event handling
- **Data Flow:** Profile data → TAICS_Advanced_Template.canvasData → Canvas rendering
- **Timing Synchronization:** Proper sequencing of profile data loading and canvas initialization
- **Security Enhancements:** Improved canvas data sanitization and validation
- **Input Validation:** Strict type checking for canvas data arrays
- **Element Validation:** Validation of element types and required fields
- **Config Validation:** Safe handling of element configuration data

### FIXES RESOLVED
1. **Login Issue:** Canvas preview not showing after user login
2. **Profile Switch:** Canvas layout not restoring when switching profiles
3. **Template Switch:** Canvas not loading when switching to Template 6 from other templates
4. **Tab Navigation:** Canvas data loss when navigating between different plugin tabs
5. **Timing Issues:** Race conditions between module initialization and data loading
6. **Data Corruption:** Graceful handling of missing or invalid canvas data
7. **Empty Canvas:** Proper placeholder display when canvas data is empty

### USER IMPACT
- **No More Canvas Loss:** Template 6 layouts now persist across all user actions
- **Instant Loading:** Canvas preview loads immediately after login or profile switch
- **Seamless Experience:** Users no longer need to rebuild custom layouts after login
- **Reliable Functionality:** Canvas data is preserved in all scenarios and edge cases
- **Better Feedback:** Clear status indicators and logging for troubleshooting

### DEVELOPER NOTES
This fix addresses a critical user experience issue that was preventing Template 6 from being usable in production environments. The solution focuses on timing synchronization between asynchronous operations and provides robust error handling for edge cases.

## Version 3.2.2 - Internationalization Update (2025-10-14)
* **NEW:** Added full interface translations for Spanish (es_ES), Mexican Spanish (es_MX), French (fr_FR), Serbian (sr_RS), Russian (ru_RU), German (de_DE), Japanese (ja), and Chinese (zh_CN).
* **IMPROVEMENT:** The plugin interface will now automatically switch to the user's selected WordPress language.
* **IMPROVEMENT:** If a translation is missing for a specific string, it will correctly fall back to English.

## Version 3.2.1 - Custom Builder & Advanced Canvas (2025-10-13)
### IMPROVEMENTS
- **Technical:** Name postions of Templates 1-6

## Version 3.2.0 - Bulk Article Generation & Queue Management (2025-10-12)

### MAJOR FEATURES
- **Bulk Article Generation:** Generate multiple articles at once with intelligent queue management
- **Batch Processing:** Process 1-5 articles simultaneously in configurable batches
- **Queue Management:** Real-time queue with Pause/Resume/Cancel controls
- **Bulk Analytics:** Live statistics showing Total/Completed/Processing/Failed articles
- **Progress Tracking:** Visual progress bar with estimated completion time
- **Topic Input:** Multi-line textarea for entering article topics (one per line)
- **Smart Delays:** Configurable delay between batches (0-60 seconds) to prevent API throttling
- **Error Handling:** Failed articles are marked and tracked, processing continues with remaining items
- **Profile Integration:** Uses Active Profile settings for all generated articles

### IMPROVEMENTS
- **Queue System:** Complete state management with pending/processing/completed/failed/cancelled statuses
- **Real-time Updates:** Live rendering of queue items with status icons (⏳ Pending, 🔄 Processing, ✅ Completed, ❌ Failed, ⛔ Cancelled)
- **Analytics Dashboard:** Average generation time and estimated remaining time calculations
- **Responsive UI:** Two-column layout (input + queue/analytics) with mobile support
- **User Experience:** Topic counter, batch size selector, delay configuration
- **Professional Design:** Color-coded status indicators, smooth animations, pulse effects for processing items

### UI COMPONENTS
- **Left Panel:** Article Topics textarea, Topic counter, Batch size selector (1/2/3/5), Delay selector (0/5/10/30/60s), Settings source, Control buttons (Start/Pause/Resume/Cancel/Clear)
- **Right Panel:** Generation Queue with scrollable list, Progress bar, Queue items (topic/status/duration), Bulk Analytics (Total/Completed/Processing/Failed), Time statistics (Avg. Time, Est. Remaining)

### TECHNICAL IMPLEMENTATION
- **JavaScript (bulk-generator.js):** Queue management with Promise-based async processing, Batch processing using Promise.all, Real-time DOM rendering, XSS protection with escapeHtml()
- **HTML (extras.php):** Semantic markup, Accessibility attributes, Internationalization ready
- **CSS (extras.css):** Modern CSS Grid/Flexbox, Smooth animations (pulse, progress), Color-coded status system, Dark mode compatible, Responsive design
- **Backend Integration:** Uses existing `taics_generate_content` AJAX handler, No new PHP/database required, Profile-based generation

### USE CASES
1. **Content Calendar Filling:** Generate 10-20 articles for the month in one session
2. **Topic Research Batch:** Process a list of keywords/topics from competitor analysis
3. **Multi-language Content:** Bulk generate translations by switching profiles
4. **SEO Content Creation:** Mass-produce SEO-optimized articles for keyword targeting
5. **Emergency Publishing:** Quickly generate multiple articles when content pipeline is empty

## Version 3.1.1 - Template 6 Canvas Persistence Hotfix (2025-10-11)

### CRITICAL FIX
- **Template 6 Canvas Persistence:** Resolved issue where canvas data was lost when plugin loaded on different tabs
- Problem: `TAICS_Advanced_Template` object didn't exist when profile loaded before Layout Tab was accessed
- Solution: Added placeholder object creation in `profile-buttons.js` if module hasn't loaded yet
- Canvas data now always sets `window.TAICS_Advanced_Template.canvasData` regardless of module load state

### IMPROVEMENTS
- **Profile Loading Enhancement:** `loadLayoutTemplateData()` now creates placeholder object before setting canvas data
- Ensures canvas data is available when user switches to Layout Tab later
- Prevents "Cannot read property 'canvasData' of undefined" errors
- **Asynchronous Module Loading:** Better handling of module initialization timing
- Canvas data persists even when modules load in different order
- Improved reliability across different browser and caching scenarios

### TECHNICAL CHANGES
- **profile-buttons.js (lines 299-332):**
```javascript
if (!window.TAICS_Advanced_Template) {
console.log('⚠️ TAICS_Advanced_Template not loaded yet - creating placeholder');
window.TAICS_Advanced_Template = { canvasData: null };
}
window.TAICS_Advanced_Template.canvasData = layoutTemplate.advanced_template_canvas;
```
- **Canvas Data Flow:** Profile load → Create placeholder object → Set canvasData → Layout Tab init → Render canvas
- **Backward Compatibility:** No changes required to existing profiles or canvas data structure

## Version 3.1.0 - Content Structure Builder & Enhanced Content Rules (2025-10-10)

### MAJOR FEATURES
- **Content Structure Builder:** Complete workflow for organizing and structuring AI-generated content
- **Structure Name Field:** Name and organize your custom content structures
- **Writing Guidelines Editor:** Define custom writing instructions, style guidelines, and formatting rules for AI to follow
- **Web Sources Input:** Add up to 5 reference URLs for AI to research and incorporate information
- **Structure Preview Panel:** Real-time visual preview of headings structure with proper formatting
- **URL Validation System:** Traffic light indicators (🔴 Red/🟡 Yellow/🟢 Green) show URL validity status

### IMPROVEMENTS
- **Unicode Character Support:** Serbian Cyrillic (Ћ, Ђ, Ж, Љ, Њ, Џ, Ш, Ч, Ц) and all special characters now save correctly
- Added `JSON_UNESCAPED_UNICODE` flag to profile manager
- Characters no longer convert to escape sequences (e.g., \u017e)
- **AI Content Quality Enhancement:** Increased `max_tokens` from 2x to 3x word count for all 5 AI providers
- **OpenAI:** `max_tokens => word_count * 3`
- **Anthropic:** `max_tokens => word_count * 3`
- **Google:** `maxOutputTokens => word_count * 3`
- **DeepSeek:** `max_tokens => word_count * 3`
- **Cohere:** `max_tokens => word_count * 3`
- AI now generates complete articles without premature cutoff (fixes 90% text issue)
- **Template 6 Canvas Persistence:** Enhanced initialization logic to properly restore canvas elements
- Canvas data loads even when plugin starts on different tab
- Added initialization checks for pre-loaded canvas data
- Canvas elements auto-restore when Layout Tab is accessed

### BUG FIXES
- **Template 6 Preview Loss:** Fixed canvas reset after plugin reload/page refresh
- Added persistent storage check in `advanced-template.js init()`
- Canvas data now loads from `this.canvasData` if set before initialization
- **Profile Save/Load for Structure Name:** Properly sanitized and stored in database
- Added `structure_name` field to Content Rules sanitization
- Field now loads and resets correctly when switching profiles
- **Headings Array Handling:** Fixed sanitization to support both array and string formats
- `sanitize_content_rules()` now checks `is_array()` before processing
- Prevents PHP errors when headings arrive as arrays from frontend
- **WordPress Coding Standards:** Added `phpcs:disable` comments for legitimate third-party embed scripts
- TikTok embed script: Required for TikTok functionality
- Twitter/X embed script: Required for Twitter/X functionality
- Instagram embed script: Required for Instagram functionality

### TECHNICAL CHANGES
- **Profile Manager Enhancement:**
- Added `JSON_UNESCAPED_UNICODE` flag to `wp_json_encode()` calls
- Enhanced `sanitize_content_rules()` to handle `structure_name` field
- Fixed array/string detection for headings field
- **JavaScript Improvements:**
- `advanced-template.js`: Added canvas data initialization check in `init()`
- `profile-buttons.js`: Added `structure_name` load/reset in profile switching
- Canvas loading logic now checks if Template 6 is active before rendering
- **AI Provider Updates:**
- Updated all 5 provider classes with increased `max_tokens` multiplier
- Ensures consistent content generation across all AI models

### CONTENT RULES TAB STRUCTURE
The Content Rules tab now provides a complete content structuring workflow:
1. **Structure Name:** Name your content structure (e.g., "Tech Review Template")
2. **Writing Guidelines:** Define tone, style, formatting rules
3. **Web Sources:** Add reference URLs (with validation indicators)
4. **Headings Editor:** Create custom heading structure
5. **Structure Preview:** See real-time formatted preview

## Version 3.0.0 - Custom Builder & Advanced Canvas (2025-10-09)

### MAJOR FEATURES
- **Template 6 - Custom Builder:** Revolutionary drag & drop canvas system for creating custom article layouts
- **Advanced Canvas Elements:** 5 draggable element types:
- AI Text: Position AI-generated content anywhere in your layout
- Photo Elements: Drag photos 1-3 to any position
- Custom Text: Insert custom-written content blocks with HTML formatting
- Video Embed: Embed YouTube, Vimeo, TikTok, Twitter/X, Instagram videos
- iFrame Embed: Embed external content with customizable height
- **Canvas Persistence:** Template 6 layouts are saved in user profiles and persist across sessions

### IMPROVEMENTS
- **Enhanced Progress Notifications:** Added 7 detailed progress steps during content generation (up from 3):
1. Content generation started
2. Loading profile settings
3. Connecting to AI provider
4. Building content prompt
5. Generating AI content (30-90 seconds notification)
6. Processing layout template and images
7. Finalizing article and saving
- **Layout Templates Reorganization:** Templates 1-3 in row 1, Templates 4-5 in left column, Template 6 as large 2x2 canvas
- **Always Visible Element Palette:** Element palette positioned below canvas for easy access
- **Profile Manager Enhancement:** Added `advanced_template_canvas` field with dedicated sanitization

### BUG FIXES
- **CRITICAL FIX:** Resolved canvas elements not being saved to database - added proper sanitization in Profile Manager
- **Canvas Reload Fix:** Added retry logic to ensure canvas loads properly after profile switch or page reload
- **Timing Issues:** Fixed canvas initialization timing issues when switching between profiles
- **Plugin Check Compliance:** Removed ALL debug error_log calls (0 warnings in WordPress Plugin Check)

### TECHNICAL CHANGES
- **Canvas Data Flow:** Implemented proper data flow: JavaScript → AJAX → Profile Manager → Database → Content Generator
- **Sanitization Methods:** Added `sanitize_advanced_canvas()` method with security measures:
- URLs sanitized with `esc_url_raw()`
- HTML content filtered with `wp_kses_post()`
- Text fields sanitized with `sanitize_text_field()`
- **Video Embed Support:** Regex patterns for YouTube, Vimeo, TikTok, Twitter/X, Instagram
- **Canvas Element Config:** Each element stores type, ID, and configuration data
- **Retry Logic:** Canvas loading uses retry mechanism to handle async initialization

### SECURITY
- All canvas elements are properly sanitized before saving
- Video URLs validated and escaped
- Custom text content filtered for XSS protection
- iFrame URLs validated and escaped

## Version 2.7.1 - Photo Link Functionality (2024-10-08)
- **NEW FEATURE:** Added photo link functionality - images in articles can now be clickable and redirect to custom URLs
- **IMPROVEMENT:** Photo links persist across profile switches and tab navigation
- **IMPROVEMENT:** Photo links are properly saved in user metadata (handle_save_photos) and included during content generation (handle_generate_content)
- **FIX:** Removed debug error_log calls from class-content-generator.php to comply with WordPress Plugin Check requirements
- **IMPROVEMENT:** Images with links are now automatically wrapped in anchor tags with target="_blank" and rel="noopener noreferrer" security attributes
- **IMPROVEMENT:** Added comprehensive validation for photo link URLs with automatic https:// prepending

## Version 2.6.1 - Dynamic History Tab and UX Overhaul
- **ENHANCEMENT:** Completely overhauled the "History" tab to be fully dynamic, eliminating the need for page reloads for any action.
- **FEATURE:** The dashboard now automatically switches to the "History" tab after an article is successfully generated, providing immediate feedback.
- **FEATURE:** The History tab list now auto-refreshes when a new article is created, ensuring the latest content is always visible.
- **FEATURE:** Replaced the standard post deletion link with an AJAX-powered inline deletion. Posts are now removed instantly from the list with a fade-out animation without opening a new page.
- **FIX:** Corrected the logic for refreshing the history content, which previously relied on a non-existent AJAX action, making the feature reliable.

## Version 2.6.0 - Critical Image Insertion Fix & Stability Improvements
- **CRITICAL FIX:** Implemented a robust HTML DOM parser (`DOMDocument` with `XPath`) for image insertion. This resolves the critical bug where images were not appearing in generated articles by correctly preserving all HTML tags (headings, lists, etc.) during manipulation.
- **IMPROVEMENT:** Refactored the JavaScript `setValue()` function for photo positions to handle multiple data formats (Array and Object), preventing errors when loading photo data from different sources (user meta vs. AJAX responses).
- **IMPROVEMENT:** Corrected the profile loading logic (`loadLayoutTemplateData`) to no longer interfere with photo selections, reinforcing that photos are dynamic content separate from static profiles.
- **FIX:** Resolved a bug where the `cleanup()` function in the photo management module was incorrectly clearing selected photos during tab switching, causing the generation process to fail. Photo data now persists correctly.

## Version 2.5.0 - Schedule Publishing & Critical Bug Fixes
- **NEW FEATURE:** Added "Schedule Publishing" for PRO and PREMIUM users, allowing automated content generation and publishing at a future date and time.
- **IMPROVEMENT:** Reworked the scheduler statistics logic to correctly filter and display user-specific scheduled articles.
- **FIX:** Resolved a critical bug where scheduled articles were not appearing in the schedule list due to incorrect user ID filtering.
- **SECURITY:** Hardened the AI provider class by adding escaping to error message outputs, passing WordPress Plugin Check requirements.

## Version 2.4.2 - UI Enhancements
- **UI IMPROVEMENT:** Enhanced the user interface for the "Add Content Title" field for better clarity and usability.
- **UI IMPROVEMENT:** Redesigned the "Generate Content" button with improved visual feedback during the content generation process.

## Version 2.4.0 - Reworked content generation logic and Bug Fixes
- **REFACTOR:** Reworked the entire content generation logic. The system now exclusively uses settings from the saved active profile, making generation more reliable and predictable.
- **FIX:** Resolved a series of bugs that prevented the "Generate Content" button from functioning correctly under various conditions.
- **FIX:** Corrected the data flow for API keys and AI model settings, ensuring the correct provider is used.
- **IMPROVEMENT:** Simplified the AJAX request for content generation, improving security and performance.

## Version 2.3.0 - Feature Enhancements and Bug Fixes

- **Feature:** Added a "Default Tone" selector to the Generate tab for setting a consistent writing tone.
- **Fix:** Resolved a persistent issue causing duplicate notifications on dashboard load.
- **Fix:** Corrected a CSS bug that displayed a "not-allowed" cursor on input fields.
- **Fix:** Addressed several visual and functional inconsistencies in Dark Mode.
- **UI:** Implemented minor visual enhancements to the header and footer.

## Version 2.2.0 - UI and Security Enhancements

- **Improvement:** Enhanced the footer UI with real-time information about the currently active profile and plugin usage statistics.
- **Fix:** Corrected an issue where the plugin version was hardcoded in the header and not dynamically displayed. The version now correctly shows 2.2.0.
- **Fix:** Hardened the plugin against various WordPress Plugin Check warnings, including output escaping, nonce sanitization, and fixing the stable tag mismatch.

## Version 2.1.0 - Security and Stability Update

- **Improvement:** Overhauled the license validation system to be more robust and secure. All AJAX calls now use a unified nonce system, resolving critical `403 Forbidden` errors and `Invalid nonce` issues.
- **Improvement:** Hardened the plugin against double-loading errors by implementing singleton initialization patterns, resolving `Cannot redeclare function` fatal errors.
- **Fix:** Corrected an issue where the plugin version was hardcoded in the header and not dynamically displayed. The version now correctly shows 2.1.0.
- **Fix:** Removed a duplicate and non-functional AJAX handler for license validation that was causing conflicts.

## Version 2.0.0 - Full rewrite and modernization

- Completely refactored plugin architecture
- Modular visual, functional, and backend separation
- Multiple AI providers integrated: OpenAI, Anthropic, Google, DeepSeek, Cohere
- User profile system with 6 profiles and full save/load support
- Layout templates with image upload and WordPress media library integration
- Content rules with live heading editing and premium web sources
- Scheduling publishing and bulk generation (premium feature)
- Dark mode and responsive design
- License system with online validation and plan enforcement
- Security enhancements: nonce verification, input sanitization, and escaping
- Performance improvements with lazy loading and AJAX optimization
- Numerous bug fixes and UI refinements

## Version 1.0.0 - Initial release

- Basic AI article generation
- Simple profile saving
- Basic layout and UI

Please Log in or Create an account to join the conversation.

Time to create page: 1.162 seconds
Powered by Kunena Forum