Upgraded one live site and got:
[11-Feb-2017 16:41:59 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘post_type IN (‘question’, ‘answer’) LIMIT 0,50′ at line 1 for query SELECT SQL_CALC_FOUND_ROWS ID, post_type, post_parent, post_status FROM wp_posts LEFT JOIN wp_ap_qameta ON post_id = ID WHERE ptype IS NULL post_type IN (‘question’, ‘answer’) LIMIT 0,50 made by do_action(‘wp_ajax_ap_migrator_4x’), WP_Hook->do_action, WP_Hook->apply_filters, AnsPress_Admin_Ajax::ap_migrator_4x, AP_Update_Helper->__construct, AP_Update_Helper->migrate_post_data
Rahul. Here they are along with row numbers and times.
SELECT count(*) as count, p.post_status
FROM wp_posts p
INNER JOIN wp_ap_qameta qameta
ON p.ID = qameta.post_id
WHERE p.post_status NOT IN (‘trash’, ‘draft’)
AND p.post_type = ‘question’
AND qameta.flags > 0
GROUP BY p.post_status
ap_total_posts_count()
wp-content/plugins/anspress/includes/functions.php:748
+ Plugin: anspress 0 2.0631
SELECT count(*) as count, p.post_status
FROM wp_posts p
INNER JOIN wp_ap_qameta qameta
ON p.ID = qameta.post_id
WHERE p.post_status NOT IN (‘trash’, ‘draft’)
AND p.post_type = ‘answer’
AND qameta.flags > 0
GROUP BY p.post_status
ap_total_posts_count()
wp-content/plugins/anspress/includes/functions.php:748
+ Plugin: anspress 0 2.0062
SELECT post_status, COUNT( * ) AS num_posts
FROM wp_posts
WHERE post_type = ‘question’
GROUP BY post_status
wp_count_posts()
wp-includes/post.php:2213
+ Plugin: anspress 1 5.0544
SELECT post_status, COUNT( * ) AS num_posts
FROM wp_posts
WHERE post_type = ‘answer’
GROUP BY post_status
wp_count_posts()
wp-includes/post.php:2213
+ Plugin: anspress 1 4.4439
I’m stumped, I know I can add a custom reputation option via Anspress > Reputation.
But how do I use this in a function?
I’ve already got a button hooked up to ajax, so a function is called on click. I just need to have it trigger the action/hook/filter to register the extra reputation but despite trawling through the code, docs, support I can’t find anything to work out what’s required to connect the custom rep event and the code I have.
Any suggestions or examples would be very, very helpful.
I need to pull in the template file ID of the author of the best answer how to do it?
I just created a demo system and the only plugin installed is anspress4 like this:
wp plugin install https://github.com/anspress/anspress/archive/master.zip –activate –allow-root
these urls work.
http://192.241.211.135/questions/categories/
http://192.241.211.135/questions/tags/
these do not:
category page
http://192.241.211.135/questions/category/frank1/
(no display of a category)
tag page (404)
http://192.241.211.135/questions/tag/tag2/
there is nothing installed on this system except anspress4 – (latest from master yesterday)
+————-+———-+——–+————–+
| name | status | update | version |
+————-+———-+——–+————–+
| akismet | inactive | none | 3.2 |
| anspress | active | none | 4.0.0-beta.4 |
| hello | inactive | none | 1.6 |
| wp-fail2ban | must-use | none | 3.5.3 |
+————-+———-+——–+————–+
you can see here both tags and categories are turned on.
https://www.dropbox.com/s/7nhw9rztz9c5nlt/Screenshot%202017-02-08%2023.14.24.png?dl=0
Hi,
I installed Anspress 4 beta 4. Upgraded from beta 3. When I load the site by itself and navigate to tags pages. I get a 404 error. Tags used to load in beta 3. Any idea what the issue might be?
Thanks,
Tony