Support

Account

Home › Forums › ACF PRO › Paragraph, space, br inserted at top of WYSIWYG fields if first element is block

Solving

Paragraph, space, br inserted at top of WYSIWYG fields if first element is block

  • I’m having a somewhat mind boggling problem with my WYSIWYG editor, in combination with qtranslateX.

    I’m not sure where the issue lies as:

    ACF WYSIWYG field is fine with qtranslate-x disabled
    Normal ‘Content Editor’ WYSIWYG field is fine with q-translate-x enabled

    With qtranslate-x enabled, any ACF WYSIWYG fields are always adding a:

    
    <p>
    &nbsp;
    <br/>
    </p>
    

    At the top of a post if the first element is a block element such as a header (h1, h2 etc…)

    Screencast: http://d.pr/v/1eugP/5VFFUkQ3

    In a freeze frame you can also quickly see the language codes such as [:en] being wrapped in <p> tags.

    Screencap

    I don’t know where to begin, I’ve tried so many combinations of the three plugins (ACF Pro, ACF qTranslate, qtranslate-x), every combination yields some broken functionality, and so far the current combination I’ve found is the only one that even works in the basic respect of saving and updating data.

    —

    qTranslate-x 3.3
    ACF 5.2.3 (translation broken unless using this version)
    acf-qtranslate 1.7.6 (translation broken unless using this version)
    Wordpress 4.2.2

    —

    Links to respective issues:
    qtranslate-x: https://github.com/qTranslate-Team/qtranslate-x/issues/167
    acf qtranslate: https://github.com/funkjedi/acf-qtranslate/issues/40

  • I seriously have never had such a perplexing problem before, I feel like there isn’t a single working solution for translation and ACF right now, and every incremental version for any one of the three above mentioned plugins breaks everything.

    I know this is a long shot, but it would be an absolute dream if ACF just supported qtranslate-x out of the box, to eliminate one further point of failure. It’s just so incredibly hard to troubleshoot when there are three plugins involved.

  • Hi @waffl

    It would seem like either acf-qtranslate or qtranslate-x is adding the code and then it gets wrapped with wpautop. I’m guessing qtranslate-x has some code to prevent that in the regular editor but it doesn’t run in ACFs.

    It seems there’s a lot of people having issues with the wysiwyg-editor as well if you check the support forums:
    https://wordpress.org/support/topic/wysiwyg-not-working-properlly?replies=7
    https://wordpress.org/support/topic/wysiwyg-qtranslatex-editor-is-multiplying-content?replies=7

    I think it’s something that needs to be fixed by either acf-qtranslate or qtranslate-x. ACF supports WPML out of the box and if you’re up for switching Polylang is a great free alternative. I’ve used it myself with ACF on multiple occasions 🙂
    https://wordpress.org/plugins/polylang/

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Paragraph, space, br inserted at top of WYSIWYG fields if first element is block’ is closed to new replies.