Moderation plugin: 'report this ..' link shows blank white box

Howdy Y'all. I'm working on a site: wp 3.0.1 multi-site, with buddypress 1.2.5.2. I've got the moderation plugin installed but when you click the "report this" link you get a blank box, and just to make it even more mysterious, I have a local mirror of the site for devel where it works..

I checked the javascript console in Chrome, which lists moderation.js (in the scripts tab, which I thought meant it had loaded, but perhaps not). But then I get an error (in chrome's javascript console) that says 'resource failed to load: the server responded with a status of 403 (forbidden)' when I click the link.

Anyone got any insight? I'm a little stumped what else[1] to try.

Thanks,
Bethany

[1] Other things I've been through:
* Ok, I found this old thread that looked potentially related last night: https://premium.wpmudev.org/forums/topic/moderation-plugin-is-not-working-with-wpmu-284a

* I checked my server log and I'm not seeing any errors or flags about mod-security going up (is apache log where I should be looking for this?), and the guy with the original problem didn't go into much detail about how mod-security was related.

* stripped out all the plugins including mu-plugins and buddypress, and swapped out our custom theme for twenty-ten, but still getting a blank box.

  • firedoglake
    • WPMU DEV Initiate

    I managed to fix this finally, by changing the plugin to use wordpress's built-in ajax. So I went in and added in the "hooks" section of moderation_framework.php:

    add_action('wp_ajax_moderation', 'moderation_init');

    And then in the function moderation_report_link(), where it builds the 'report this' link, I changed the link from:

    $link = '<p class="wp-report-this"><a href="' . get_option( 'siteurl' ) .
    '?moderation_action=report_form&object_type=' .
    rawurlencode( $object_type ) . '&object_id=' .
    rawurlencode(  $object_id ) .
    '&width=250&height=300" class="thickbox" title="Report this ' .
    $object_type . '">' . __('Report This ' . ucfirst($object_type) ) .
    '</a></p>';

    to:

    $link = '<p class="wp-report-this"><a href="' . admin_url('admin-ajax.php') .
    'action=moderation&moderation_action=report_form&object_type=' .
    rawurlencode( $object_type ) .
    '&object_id=' . rawurlencode(  $object_id ) .
    '&width=250&height=300" class="thickbox" title="Report this ' .
    $object_type . '">' . __('Report This ' . ucfirst($object_type) ) .
    '</a></p>';

    Voila.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.