Add diagnostic debug output to thumbnail backfill for troubleshooting
Temporary debug version that returns query counts, URL resolution results, and OG scraping outcomes to identify why thumbnail scraping returns 0. Also adds Google News URL decoder (base64/protobuf approach). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -608,7 +608,13 @@ class Peptide_News_Admin {
|
||||
}, function(response) {
|
||||
$btn.prop('disabled', false).text('<?php echo esc_js( __( 'Fix Article Thumbnails', 'peptide-news' ) ); ?>');
|
||||
if (response.success) {
|
||||
$result.text(response.data.updated + ' thumbnail(s) scraped.');
|
||||
var d = response.data;
|
||||
var msg = d.updated + ' thumbnail(s) scraped. Query matched: ' + d.query_count;
|
||||
if (d.total_active !== undefined) {
|
||||
msg += ' | Total: ' + d.total_active + ', Has URL: ' + d.with_thumb_url + ', Has local: ' + d.with_thumb_local;
|
||||
}
|
||||
$result.text(msg);
|
||||
if (d.samples && d.samples.length) { console.log('Thumbnail debug:', JSON.stringify(d, null, 2)); }
|
||||
} else {
|
||||
$result.text('Error: ' + (response.data || 'Unknown error'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user