Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to the Nynaeve theme will be documented in this file.

For project-wide changes (infrastructure, tooling, cross-cutting concerns), see the [project root CHANGELOG.md](../../../../../CHANGELOG.md).

## [2.0.12] - 2025-11-24

### Fixed
- **Infinite Recursion Bug**: Fixed critical error caused by `query` filter in `setup.php`
- **Root cause**: Filter called `$wpdb->query()` which triggered the same filter again, causing infinite recursion
- **Error**: "Maximum call stack size reached. Infinite recursion?" in `class-wpdb.php`
- **Solution**: Simplified filter to just return empty string for WooCommerce duplicate key queries
- WooCommerce handles missing indexes gracefully, so queries don't need to be executed at all
- Prevents stack overflow on all page loads

## [2.0.11] - 2025-11-22

### Fixed
Expand Down
18 changes: 5 additions & 13 deletions app/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,26 +328,18 @@ class="text-center w-full px-4 py-3 bg-indigo-600 flex items-center
* Suppress WooCommerce duplicate key database errors
* These errors are harmless - they occur when WooCommerce tries to add indexes that already exist
* This prevents them from cluttering debug.log
*
* Note: We simply return empty string for these queries - WooCommerce handles
* duplicate key errors gracefully, so we don't need to execute them at all.
*/
add_filter('query', function ($query) {
global $wpdb;

// Suppress duplicate key errors for known WooCommerce indexes
if (
strpos($query, 'ADD KEY `session_expiry`') !== false ||
strpos($query, 'ADD INDEX woo_idx_comment_date_type') !== false
) {
// Check if the index already exists before attempting to add it
$suppress_errors = $wpdb->suppress_errors();
$wpdb->suppress_errors(true);

// Execute the query (it will fail silently if index exists)
$result = $wpdb->query($query);

// Restore error suppression state
$wpdb->suppress_errors($suppress_errors);

// Return empty to prevent the original query from running
// Return empty to skip this query entirely
// WooCommerce handles missing indexes gracefully
return '';
}

Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Theme Name: Nynaeve
Theme URI: https://imagewize.com
Description: Modern WordPress theme built on Sage 11 with reusable custom blocks using WordPress native tools and the Roots.io stack.
Version: 2.0.11
Version: 2.0.12
Author: Jasper Frumau
Author URI: https://magewize.com
Text Domain: nynaeve
Expand Down