Title: Page-categories &#8211; Database error
Last modified: December 5, 2018

---

# Page-categories – Database error

 *  Resolved [ssmadsen](https://wordpress.org/support/users/ssmadsen/)
 * (@ssmadsen)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/page-categories-database-error/)
 * Hi
 * Trying to setup my page-categories for my user role.
    Here, im getting a database-
   error when assigning this page-category for my user-role.
 * Generel setting:
    Pages: Restrict all pages (assign access for pages on the specific
   user-role)
 * Following error is thrown:
 * WordPress databasefejl: [Unknown column ‘wp_term_relationships.term_taxonomy_id’
   in ‘where clause’]
    SELECT wp_posts.*, GROUP_CONCAT(DISTINCT t_page_category.
   term_id SEPARATOR ‘,’) AS ‘page_category’ FROM wp_posts LEFT JOIN `wp_term_relationships`
   AS tr_page_category ON tr_page_category.object_id = wp_posts.ID LEFT JOIN `wp_term_taxonomy`
   AS tt_page_category ON tt_page_category.term_taxonomy_id = tr_page_category.term_taxonomy_id
   AND tt_page_category.taxonomy = ‘page_category’ LEFT JOIN `wp_terms` AS t_page_category
   ON t_page_category.term_id = tt_page_category.term_id WHERE 1=1 AND wp_posts.
   post_type IN (‘page’, ‘np-redirect’) AND ((wp_posts.post_status = ‘publish’ OR
   wp_posts.post_status = ‘future’ OR wp_posts.post_status = ‘draft’ OR wp_posts.
   post_status = ‘pending’ OR wp_posts.post_status = ‘trash’ OR wp_posts.post_status
   = ‘private’)) AND ((((wp_posts.post_type = ‘page’ AND wp_posts.ID = 0) OR (wp_term_relationships.
   term_taxonomy_id IN (109) OR wp_posts.ID IN (56,6731)))) OR (wp_posts.post_type
   = ‘np-redirect’)) GROUP BY wp_posts.ID ORDER BY wp_posts.menu_order ASC
 * Any of you who has experiences the same?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [AAM Plugin](https://wordpress.org/support/users/vasyltech/)
 * (@vasyltech)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/page-categories-database-error/#post-10949030)
 * Hi [@ssmadsen](https://wordpress.org/support/users/ssmadsen/),
 * What WordPress version are you using? `wp_term_relationships` is a standard WP
   core database table that contains `term_taxonomy_id` column. At least in the 
   latest WordPress version.
 * Keep me updated.
    Regards, Vasyl
 *  Thread Starter [ssmadsen](https://wordpress.org/support/users/ssmadsen/)
 * (@ssmadsen)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/page-categories-database-error/#post-10949349)
 * Hi Vasyl.
    THank you for getting back.
 * Current version is:
    Version 4.9.8
 * So basically up-to-date. Not updating to 5.0 before a week or two.
 *  Plugin Author [AAM Plugin](https://wordpress.org/support/users/vasyltech/)
 * (@vasyltech)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/page-categories-database-error/#post-10951690)
 * [@ssmadsen](https://wordpress.org/support/users/ssmadsen/),
 * Oh, gotcha. Few months ago I’ve made mistake in one of the AAM extensions. Please
   make sure that you have all extensions up-to-date especially Plus Package 3.8.5.
 * If you need to continue this conversation, please email me as we should not use
   public forum for any premium extensions support.
 * Thank you,
    Vasyl
 *  Thread Starter [ssmadsen](https://wordpress.org/support/users/ssmadsen/)
 * (@ssmadsen)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/page-categories-database-error/#post-10953117)
 * [@vasyltech](https://wordpress.org/support/users/vasyltech/)
 * Whats’ your email? 🙂
 * I just installed the AAM PLus Package 5 days ago (together with the main extention),
   so i assume both are 100% up-to-date.
    -  This reply was modified 7 years, 6 months ago by [ssmadsen](https://wordpress.org/support/users/ssmadsen/).
    -  This reply was modified 7 years, 6 months ago by [ssmadsen](https://wordpress.org/support/users/ssmadsen/).
 *  Plugin Author [AAM Plugin](https://wordpress.org/support/users/vasyltech/)
 * (@vasyltech)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/page-categories-database-error/#post-10953153)
 * Hi [@ssmadsen](https://wordpress.org/support/users/ssmadsen/),
 * Sorry man, I’m not allowed to share any emails on this forum. However you can
   go to [https://aamplugin.com/support](https://aamplugin.com/support) and submit
   a message there.
 * Thank you,
    Vasyl
 *  Thread Starter [ssmadsen](https://wordpress.org/support/users/ssmadsen/)
 * (@ssmadsen)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/page-categories-database-error/#post-10956935)
 * [@vasyltech](https://wordpress.org/support/users/vasyltech/)
 * Posted in the (hopefully) right forum now 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Page-categories – Database error’ is closed to new replies.

 * ![](https://ps.w.org/advanced-access-manager/assets/icon-256x256.png?rev=3447421)
 * [Advanced Access Manager – Access Governance for WordPress](https://wordpress.org/plugins/advanced-access-manager/)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-access-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-access-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-access-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-access-manager/reviews/)

## Tags

 * [page categories](https://wordpress.org/support/topic-tag/page-categories/)

 * 6 replies
 * 2 participants
 * Last reply from: [ssmadsen](https://wordpress.org/support/users/ssmadsen/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/page-categories-database-error/#post-10956935)
 * Status: resolved