Comments (5)
I also ran an export/import but wasn't able to reproduce the issue :/
from customizr.
What do you think if we put a call to action button in the post list customize section to re-generate the thumb field (this button should have a description which doesn't make users think we re-generate the thumbnails ). The code could be something simple like the following (the LIMIT is to avoid memory issues - we'll actually avoid them this way? need to test this aspect):
function generate_tc_thumb_fld(){
global $wpdb;
$_has_posts = true;
$_offset = 0;
while ( $_has_posts ) {
$_posts = $wpdb->get_results( "
SELECT `ID` FROM $wpdb->posts
WHERE `post_status` = 'publish'
LIMIT 20 OFFSET " . $_offset
);
$_has_posts = count($_posts) > 0;
if ( $_has_posts ) {
$_offset = $_offset + count($_posts);
if ( ! class_exists( 'TC_post_thumbnails' ) )
TC___::$instance -> tc__( array('content' => array( array('inc/parts', 'post_thumbnails') ) ), true );
foreach ( $_posts as $_post)
TC_post_thumbnails::$instance -> tc_set_thumb_info( $_post -> ID );
}
}
}
(maybe with an sql to remove the tc-thumb-fld occurrences before set them again)
But I'm assuming the issue is related to something which prevents the automatic refresh which your code already properly provides.
from customizr.
FYI the user having the issue solved it after this suggestion:
- disable your plugins (maybe one of them might have conflicted)
- browse the whole blog (post-lists) as admin
point 2 because we always refresh the thumb fld when user can upload images (right?).
I'm not sure if the user followed the 1) step too or if it was needed.
from customizr.
After all this is an edge case.
instead of adding a new button to the customizer, wouldn't it possible to hook at the end of the import process (there must a be a hook there) and run your code ?
from customizr.
A better version of it, yes, makes sense.
Anyway I tried to reproduce it but I couldn't reproduce it.
Hopefully will not be so much expensive.
from customizr.
Related Issues (20)
- [PHP 8] error Uncaught ValueError: Unknown format specifier β;β in route to files/wp-content/themes/customizr-pro/core/czr-customize-ccat.php:966
- [performance] prevent loading flickity.min.css ?
- Conflict with OptimizePress3
- [header] top offset issue when user logged in.
- [WooCommerce] explore a better display of product groups
- Google Mobile friendly notice about preload delay for font awesome
- Mobile menΓΉ issue: is difficult to understand the menu can be scrolled. HOT 1
- Unsupported operand types: string / int (in class-fire-resources_fonts.php:190) HOT 1
- [header] when centered on desktop, the site title stays left aligned
- [WooCommerce] checkout checkboxes broken when Font Awesome is not loaded
- compatibility with Nimble Builder when using a site template, lazy load not triggered
- Using wp_cache_set() can break sites using persistent caching like Memcached.
- [accessibility] improve accessibility of checkbox toggle for slider options
- remove W3C deprecated attributes for script and style tags HOT 6
- Possible interfering with Jetpack plugin "Widget Cookies & Consent Banner" HOT 1
- Possible year picker conflict with plugin Fluent forms
- [PHP 8] Possible display issue with header tagline and social links
- javascript breaks with WooCommerce cross sell item at checkout HOT 1
- Using Tickets add-on for The Events Calendar breaks website
- WooCommerce : Make sure property WC()::cart exists
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from customizr.