Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paragraph, nbsp and br inserted at beginning of WYSIWYG fields after update #167

Closed
alancwoo opened this issue May 28, 2015 · 2 comments
Closed
Labels

Comments

@alancwoo
Copy link

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:

ACF: http://support.advancedcustomfields.com/forums/topic/paragraph-inserted-at-top-of-wysiwyg-fields-if-first-element-is-block/edit/
acf qtranslate: funkjedi/acf-qtranslate#40

@johnclause
Copy link
Member

I was not able to reproduce it so far. It works correctly for me on standard post.php TyniMCE editor.

It looks like the TinyMCE editor in your video is not the standard one. Which plugin does it belong to? Contact the author of that plugin and ask them to initialize TiniMCE by the WP standard as it is done on main post.php page. It may have something to do with incorrect use or absence of 'autop' handling.

@alancwoo
Copy link
Author

alancwoo commented Jun 2, 2015

Ok, I started a completely fresh new install of Wordpress to test with and installed only:

  1. qtranslate-x 3.3
  2. ACF Pro 5.2.6
  3. ACF qtranslate 1.3.9

The issue was still happening unless I configure exactly:

  1. WYSIWYG fields are qTranslate WYSIWYG fields
  2. Language tabs are on in acf qtranslate settings (otherwise repeater overwrites the other language on update)

Somehow this seems to be working now, I will notify the acf qtranslate maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants