콘텐츠로 건너뛰기 사이드바로 건너뛰기

Waiting for author

Topic Tags: Compatibility

Overview of the issue

When using WPBakery Page Builder with WPML, you might experience the following issue: vc_raw_html shortcodes are removed during translation when using the Advanced Translation Editor (ATE). This results in missing content on the translated page.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open the …/wp-content/plugins/js_composer/include/helpers/helpers.php file.
  • Look for line 1946.
  • Replace:
    		if ( vc_user_access()->part( 'unfiltered_html' )->checkStateAny( true, null )->get() ) {
            
  • With:
    		if ( vc_user_access()->part( 'unfiltered_html' )->checkStateAny( true, null )->get() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) {
            
  • Save your original page and translate it using the “+” icon.

응답 2개 대상 “WPBakery Page Builder - Raw HTML Shortcodes Removed When Translating with ATE”

  1. Hi,

    Thank you for sharing this workaround.

    We’ve tested it on our side and can confirm that after applying the change, the issue is resolved and the content is displayed correctly.

    However, we have two important concerns:

    The fix modifies a plugin file, so it will be overwritten during future updates (WPBakery / Uncode). This makes it difficult to maintain long-term.

    It broadens the conditions under which raw HTML is allowed, which could potentially introduce a security risk. In the event of an attack, this could be considered a security vulnerability.

    Because of this, we see the workaround as a temporary solution rather than something safe to rely on in production long term.

    We wanted to flag this early and would appreciate guidance on a more permanent and update-safe approach.

    Kind regards,

    • Hi Agata,

      Thanks for your feedback! This issue appears to be a regression introduced in WPBakery 8.7. The workaround is quite similar to the original code that was in place up to version 8.6.1, which is (for reference):

      function wpb_remove_custom_html( $content ) {
      $is_rest_request = ( defined( 'REST_REQUEST' ) && REST_REQUEST );
      if ( ! empty( $content ) && ! $is_rest_request && ! vc_user_access()->part( 'unfiltered_html' )->checkStateAny( true, null )->get() ) {

      We’ve already reported the issue to the plugin author, but it might help to reinforce the urgency if you also reach out to them as a customer.

답글 남기기

주제에 집중하고 다른 사람을 존중해 주세요. 이 게시물과 관련 없는 문제에 도움이 필요하면 지원 포럼을 사용하여 채팅을 시작하거나 티켓을 제출하세요.

다음 태그를 사용할 수 있습니다:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>