Hi,
today I upgraded from Newspaper 4 to Newspaper 8.
What I noticed is that all my reviews are completely gone.
They are still in the database fortunately (wp_postmeta -> metakey td_review) but I am unable to understand how to make the theme load them back from the database.
I hope you can help me out, this is really important for us!
Thanks
Hi,
Please send us an email at contact@tagdiv.com and we will try to give you a solution. Provide admin login information and FTP access. Also paste a link to this topic, so we can identify you.
Thanks
Thanks for the follow-up via mail. To sum-up the problem:
If on td_first_install.php I use the code
// empty -> any version
if (!empty($td_db_version)) {
// wp_parse_args format
$args = array(
'post_type' => array('page', 'post'),
'numberposts' => '10',
'offset' => 0,
'orderby' => 'post_date',
'order' => 'DESC',
'meta_query' => array(
'relation' => 'OR',
array('key' => 'td_homepage_loop_filter'),
array('key' => 'td_unique_articles'),
array('key' => 'td_smart_list'),
array('key' => 'td_review')
),
'update_post_term_cache' => false,
);
I get the error
Warning: Invalid argument supplied for foreach() in /home/laplayst/public_html/wp-content/themes/Newspaper/includes/wp_booster/td_first_install.php on line 313
which refers to the line
foreach ($td_review[0] as $filter_key => $filter_value) {
I am not sure where the error is, I am running PHP 5.6 and even if my plugins are disabled the problem persists.
I know it’s the weekend but I hope someone will be able to help before the beginning of next week đ
-
This reply was modified 9 years by
SnakeEater.
I additionally realized that if I process 2000 items at the time, I get the error message 949 times.
If through phpmyadmin I go and check how many entries have a td_review field, they are 475, exactly half of it.
Wouldn’t it also be possible to fix the problem with an sql query?
-
This reply was modified 9 years by
SnakeEater.
I solved the problem by using the following SQL query:
UPDATE wp_postmeta dt1, wp_postmeta dt2
SET dt1.meta_value = dt2.meta_value
WHERE dt1.post_id = dt2.post_id AND dt1.meta_key = "td_post_theme_settings" AND dt2.meta_key = "td_review"
-
This reply was modified 9 years by
SnakeEater.
Hello!
After executing this SQL query:
UPDATE wp_postmeta dt1, wp_postmeta dt2
SET dt1.meta_value = dt2.meta_value
WHERE dt1.post_id = dt2.post_id AND dt1.meta_key = "td_post_theme_settings" AND dt2.meta_key = "td_review"
reviews will appear on the website? Right?
How to correctly run the SQL query on the website running C-Panel?