[wp-trac] [WordPress Trac] #41264: Plugin Name: WPCoreSys - Database Prefix Issue - Categories and Tags Missing

WordPress Trac noreply at wordpress.org
Fri Jul 7 06:17:05 UTC 2017


#41264: Plugin Name: WPCoreSys - Database Prefix Issue - Categories and Tags
Missing
----------------------------+-----------------------------
 Reporter:  sanyamjain      |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  4.8
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 The database prefix has been hard coded in the line between 330 to 340.
 Due to this the categories have gone missing and we were not able to
 create new categories in Wordpress.


 {{{
                 if (!empty($excerpt))
                 {
                         $cats = $wpdb->get_col(
                                                 "SELECT key1.term_id FROM
 wp_term_taxonomy key1
                                                 INNER JOIN
 bct_term_relationships key2 ON key2.term_taxonomy_id =
 key1.term_taxonomy_id AND key1.taxonomy = 'category'
                                                 INNER JOIN wp_posts key3
 ON key3.id = key2.object_id AND key3.post_excerpt LIKE '%{$excerpt}%'"
                                                 );

                         $clauses['where'] .= " AND t.term_id NOT IN(" .
 implode(",", $cats) . ")";
                 }
 }}}

 Once the prefix was changed, the issue was resolved.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41264>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list