Home › Forums › ACF PRO › 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>
<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.
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/
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?
— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.