Cannot edit anything from links on the frontend.

5.12K viewsIssuesbug permission
0

It always says “You cannot edit this question/answer”. I am admin and I checked I have all the Anspress permissions. I am having this problem since 4.0. I can edit questions from within the admin area however.

Running the download from github branch 4.1.5 from today.

Got this in my logs:

[08-Dec-2017 01:54:55 UTC] WordPress database error Incorrect table definition; there can be only one auto column and it must be defined as a key for query ALTER TABLE wp_ap_activity ADD COLUMN `activity_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT made by activate_plugins, activate_plugin, do_action(‘activate_anspress-question-answer/anspress-question-answer.php’), WP_Hook->do_action, WP_Hook->apply_filters, AP_Activate::get_instance, AP_Activate->__construct, AP_Activate->activate, AP_Activate->insert_tables, dbDelta
[08-Dec-2017 01:54:55 UTC] WordPress database error Key column ‘activity_id’ doesn’t exist in table for query ALTER TABLE wp_ap_activity ADD PRIMARY KEY (`activity_id`) made by activate_plugins, activate_plugin, do_action(‘activate_anspress-question-answer/anspress-question-answer.php’), WP_Hook->do_action, WP_Hook->apply_filters, AP_Activate::get_instance, AP_Activate->__construct, AP_Activate->activate, AP_Activate->insert_tables, dbDelta

0

Hello Nico,

AnsPress does not check for AnsPress capability while in wp-admin. Post editing permission in wp-admin are controlled by WP. Please check if any other plugin is causing this.

You have some leftover in DB from old AnsPress. Please go to PHPMyAdmin and remove ap_activity table and try again. This table was removed since 3.0.

commented on answer

Thanks for that table removal. I do use the latest master now and reactivated the plugin to remove that table. I still have this issue though.

The strange thing is that opening and closing questions works. Editing gets the the “something went wrong”. But when the clone the database to my local development site it works.

Any idea how I can debug this?

Please check log for error and share with me.

https://pastebin.mozilla.org/9074741

I downgraded to 4.1.5 and then to 4.1.4 from master but no luck. There are a few errors from anspress in the logs.

Fixed in 4.1.5

You are viewing 1 out of 2 answers, click here to view all answers.