Can't edit FAQ answer

Hi,

I'm having trouble trying to edit an answer. I get "Something happened, and nothing was updated. Check your error logs." My sysadmin says there are no related errors in the log. Can anybody help?

  • webezy
    • Site Builder, Child of Zeus

    Hi bigonroad,

    Sure, I'm using latest plugin and latest release of wp multisite. Hosted on wpengine.com. I have disabled other plugins but still have problem. I have deactived and reactivated as suggested but still have error. See screenshot.

  • webezy
    • Site Builder, Child of Zeus

    Hi Phil,

    All I did was create my categories. Then created a FAQ in a category and saved it. No problem. Then I thought of editing the FAQ, so I made the changes then submit, but it never changed the original entry. Instead I get an error output as shown above.

  • webezy
    • Site Builder, Child of Zeus

    Hi Phil,

    I can try that but I'm guessing that it could be a config issue on wpengine, because I checked it on my localhost install and it worked. I have asked wpengine to double check their side. I'll wait and see what they come back with.

  • webezy
    • Site Builder, Child of Zeus

    Hi Phil,

    I have had a response from Mark at wpengine.

    He said:
    Is there a DB_HOST configuration specific to BBPress or the WPMUDev plugins, outside of DB_HOST in wp-config.php? If so, is it set to 'localhost'? Cause that would explain troubles writing to the database.

    In response to my trouble ticket on MU Support System plugin he also said:
    I think this is related to the other ticket we have open about pointing to the database connection to localhost. Which shouldn't be. Should be dbmaster-1.

    Do you have a response to that so I can rely it to him?

  • Philip John
    • DEV MAN’s Apprentice

    Is there a DB_HOST configuration specific to BBPress or the WPMUDev plugins, outside of DB_HOST in wp-config.php? If so, is it set to 'localhost'?

    Short answer is no. Support System uses the standard $wpdb just as it should.

    There's not reference to localhost in any our our plugins - I've literally just searched them all.

    Phil

  • webezy
    • Site Builder, Child of Zeus

    Hi Phil,

    Aaron Brazell has looked into this issue for me.

    He says...

    "On update, they are not using the correct POST field to update the database. They are looking for "answer" instead of whatever the textarea ID is. They need to fix this. Note that it only affects updates, not inserts.

    Here is a var dump of the data you can show them. This is the generated SQL that comes when I type "testing" into the textarea and then echo the SQL and the $_POST var_dump.

    UPDATE wp_support_faq SET site_id = '1', cat_id = '1', question = 'How to edit question?', answer = '<p>d</p> ' WHERE faq_id = '3' AND site_id = '1'

    Array
    (
    [_wpnonce] => e207c47896
    [_wp_http_referer] => /wp-admin/network/settings.php?page=faq-manager&action=questions&qid=3
    [question] => How to edit question?
    [category] => 1
    [answer] => d
    [faq_id] => 3
    [old_cat_id] => 1
    [updateq] => 1
    )

    The proper way for them to be doing this is to hook on wp_update_post and use the proper postdata that is passed via that hook. But then *they* have to do it. They also shouldn't be using raw SQL in the plugin but that's a totally different issue altogether. "

    Does this help you guys?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.