Skip to:

BP tamperes ajax output

  • The plugin wp-photo-album-plus uses frontend alax in many places. When BP is installed, the output of an ajax call that is sent to the client using echoing the result of
    wp_json_encode( ['html' => $html, 'js' => $js] );, in cases where there is a substantial amount of js code, the js code is damaged, only when BP is activated, resulting in errors like missing ) or unterminated string.

    I inspected the raw length of the output as it comes to the client in its ajax proc in both cases (with or without BP).

    Example: an ajax call that returns the code for a slideshow normally has a length of 598200 chars,
    with BP acitvated it has a length of only 212069 chars.

    Please tell me how i can prevent BP to tamper my ajax output.

    I tried remove_all_filters( 'wp_json_encode' ); just before the call to wp_json_encode() but that did not help.

  • You must be logged in to reply to this topic.
Skip to toolbar