The wp-caption class is only given if the image has a caption. I’m guessing the image you have inserted into the ACF WYSIWYG field doesn’t have a caption.
Hi Elliot
I’m having this issue as well. In the default WP Editor you get the “wp-cation” class added when the content is outputted to the site. With an ACF WYSIWYG editor it outputs the following:
<div>
<dl id="attachment_166">
<dt><img title="Steve van Doren / BBC News" alt="" src="http://URL.com/new/wp-content/uploads/2012/11/NG_VFC_DTSD-110820-8864-600x400.jpg" width="600" height="400"></dt>
<dd>Steve van Doren / BBC News</dd>
</dl>
</div>
I think it should output:
<div id="attachment_166" class="wp-caption aligncenter"><img class="size-medium wp-image-166 " title="Steve van Doren / BBC News" alt="" src="http://URL.com/wp-content/uploads/2012/11/NG_VFC_DTSD-110820-8864-600x400.jpg" width="600" height="400"><p class="wp-caption-text">Steve van Doren / BBC News</p></div>
Any thoughts?
If you require the standard HTML tab, please take a look at the add-on for ‘WP WYSIWYG’.
This field type can’t be used within a repeater / flexible content field, but it will contain the correct rendered tabs!
Thanks
E
There is an HTML editor on the ACF WYSIWYG editor. Click the last button on the right to reveal an extra row of buttons. You’ll see the HTML button there. Sadly, once you’ve entered HTML, the next time you open it it’s a complete mess (all line breaks and white space removed). There may be a setting to fix that, I haven’t looked into it.
I spent some time trying to figure a similar issue out this evening. In my case, I saw the error “switchEditors is not defined” on the Edit Media page and wanted to figure out why. I’m running WP 3.8 and ACF 4.3.4.
From the code it looks like ACF always inserts a WYSIWYG editor in the footer of any post page, including Media. Not sure why this needs to happen, but it’s added in acf_field_wysiwyg::input_admin_head, which appears to run with the ‘acf/input/admin_head’ action…regardless of whether or not a wysiwyg field is used on that page…and actually it appears regardless of whether or not there are any ACF elements that page. Not sure why this needs to be there…?
Anyhow, there is inline onclick JS on the #acf_settings-tmce element which is the cause of the problem. When my user-settings in the options table specify the “html” editor then input.js fires off a click event to this element. The edit Media page doesn’t have switchEditors defined though, hence the error. When my user settings are for the “tinymce” editor, no error occurs, because input.js will not attempt to click the element. Otherwise, the only way to avoid this error is to deactivate ACF entirely.
I hope this helps!
Harold
Hi @iamilkay
ACF already has a shortcode which you can read about in the docs.
Are you asking to add a button to the WYSIWYG field, where you can simply insert an ACF shortcode / value?
Thanks
E
Hi @Exelmans Graphics
I don’t believe ACF has the functionality to modify the table wihtin your WYSIWYG field. There must be somethign else going on here.
Perhaps you have some JS which is modifying the table? It looks like the jQuery may have a bug and is modifying all cells html / text value.
Hope that helps.
Thanks
E
Hi! I have the same problem. I’m trying to do the exact same thing as ewestlund.
1. Choose number of columns
2. Add content to the column
I’m set up my Repeaters and Flexible Content like this:
-Flexible
— Column 1 as repeater
—— image as Flexible
—— “new layout”
—— Google maps as Flexible
—— “new layout”
—— Wysiwyg editor as Flexible
—— Column 2 as repeater
—— image as Flexible
—— “new layout”
—— Google maps as Flexible
—— “new layout”
—— Wysiwyg editor as Flexible
— Column 3 as repeater
—— image as Flexible
—— “new layout”
—— Google maps as Flexible
—— “new layout”
—— Wysiwyg editor as Flexible
What happens is that when I try to add a new layout they jump out of the hyrarki, and goes in the same hyraki as my columns, but they are empty. The layouts are not being saved. You can see the result in ewestlund’s attached image. This is happening in both page edit screen and the field group edit screen.
Is it not possible to do it this way? Do you have any other idea how to accomplish the same thing?
I love your plugin but this is very frustrating.
Best regards
dmon
Hi @Nitruc
Thanks for the follow up. Perhaps the solution is to remove the ‘wpautop’ filter from the formating of the WYSIWYG value.
Normally, this would be done via:
remove_filter ('the_content', 'wpautop');
But ACF uses a custom filter called ‘acf_the_content’, so try this in your functions.php file:
remove_filter ('acf_the_content', 'wpautop');
Hope that helps.
Thanks
E
Hi @SimonPrice
I just tested this myself with WP 3.8, ACF 3.4.4 and can confirm that the WYSIWYG field is correctly working on an options page.
Perhaps there is some theme code / plugin conflict?
Can you try on a fresh install of WP and add in plugins / themes until you hit the issue?
Thanks
E
Hi @tolga
Can you please better explain why a default of 0 does not work?
The filter code you have provided is for a WYSIWYG field, and I can’t imagine how this helps the issue…
Hi @Nitruc
This is a normal WP behaviour – to turn all new lines into paragraph tags.
To remove this, you can try loading the value without any formatting.
You can do this by providing a ‘false’ for the format parameter in the get_field / the_field funcions like so:
the_field('wysiwyg_field', false, false);
Hope that helps.
Thanks
E
Hi @Elliot,
Below the XML export, sorry if ther field names are in French & therefore sometimes not so explicit…:( :
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->
<!-- To import this information into a WordPress site follow these steps: -->
<!-- 1. Log in to that site as an administrator. -->
<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
<!-- 3. Install the "WordPress" importer from the list. -->
<!-- 4. Activate & Run Importer. -->
<!-- 5. Upload this file using the form provided on that page. -->
<!-- 6. You will first be asked to map the authors in this export file to users -->
<!-- on the site. For each author, you may choose to map to an -->
<!-- existing user on the site or to create a new user. -->
<!-- 7. WordPress will then import each of the posts, pages, comments, categories, etc. -->
<!-- contained in this file into your site. -->
<!-- generator="WordPress/3.8" created="2014-01-07 07:22" -->
<rss version="2.0"
xmlns:excerpt="http://wordpress.org/export/1.1/excerpt/"
xmlns:content="http://purl.org/rss/1.0/modules/wp-content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.1/"
>
<channel>
<title>Association pour l'Histoire du Commerce</title>
<link>http://localhost/AHC</link>
<description></description>
<pubDate>Tue, 07 Jan 2014 07:22:42 +0000</pubDate>
<language></language>
<wp:wxr_version>1.1</wp:wxr_version>
<wp:base_site_url>http://localhost/AHC</wp:base_site_url>
<wp:base_blog_url>http://localhost/AHC</wp:base_blog_url>
<wp:author><wp:author_id>1</wp:author_id><wp:author_login>admin</wp:author_login><wp:author_email>[email protected]</wp:author_email><wp:author_display_name><![CDATA[admin]]></wp:author_display_name><wp:author_first_name><![CDATA[Jean Marc]]></wp:author_first_name><wp:author_last_name><![CDATA[Brosselin]]></wp:author_last_name></wp:author>
<wp:author><wp:author_id>3</wp:author_id><wp:author_login>CB</wp:author_login><wp:author_email>[email protected]</wp:author_email><wp:author_display_name><![CDATA[Claude Brosselin]]></wp:author_display_name><wp:author_first_name><![CDATA[Claude]]></wp:author_first_name><wp:author_last_name><![CDATA[Brosselin]]></wp:author_last_name></wp:author>
<wp:author><wp:author_id>5</wp:author_id><wp:author_login>FM</wp:author_login><wp:author_email>[email protected]</wp:author_email><wp:author_display_name><![CDATA[François Malaterre]]></wp:author_display_name><wp:author_first_name><![CDATA[François]]></wp:author_first_name><wp:author_last_name><![CDATA[Malaterre]]></wp:author_last_name></wp:author>
<wp:author><wp:author_id>6</wp:author_id><wp:author_login>Judas Paysant</wp:author_login><wp:author_email>[email protected]</wp:author_email><wp:author_display_name><![CDATA[Judas Paysant]]></wp:author_display_name><wp:author_first_name><![CDATA[Judas]]></wp:author_first_name><wp:author_last_name><![CDATA[Paysant]]></wp:author_last_name></wp:author>
<item>
<title>Saisie des Fiches de Publications</title>
<link>http://localhost/AHC/?acf=acf_saisie-des-fiches-de-publications</link>
<pubDate>Fri, 29 Nov 2013 17:44:07 +0000</pubDate>
<dc:creator>admin</dc:creator>
<guid isPermaLink="false">http://localhost/AHC/?post_type=acf&p=167</guid>
<wp:post_id>167</wp:post_id>
<wp:post_date>2013-11-29 18:44:07</wp:post_date>
<wp:post_date_gmt>2013-11-29 17:44:07</wp:post_date_gmt>
<wp:comment_status>closed</wp:comment_status>
<wp:ping_status>closed</wp:ping_status>
<wp:post_name>acf_saisie-des-fiches-de-publications</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>acf</wp:post_type>
<wp:post_password></wp:post_password>
<wp:postmeta>
<wp:meta_key>_edit_last</wp:meta_key>
<wp:meta_value><![CDATA[1]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>position</wp:meta_key>
<wp:meta_value><![CDATA[normal]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>layout</wp:meta_key>
<wp:meta_value><![CDATA[default]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>hide_on_screen</wp:meta_key>
<wp:meta_value><![CDATA[a:10:{i:0;s:11:"the_content";i:1;s:7:"excerpt";i:2;s:13:"custom_fields";i:3;s:9:"revisions";i:4;s:4:"slug";i:5;s:6:"author";i:6;s:6:"format";i:7;s:14:"featured_image";i:8;s:10:"categories";i:9;s:15:"send-trackbacks";}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5298d272b927b</wp:meta_key>
<wp:meta_value><![CDATA[a:14:{s:3:"key";s:19:"field_5298d272b927b";s:5:"label";s:5:"Titre";s:4:"name";s:17:"publication_titre";s:4:"type";s:4:"text";s:12:"instructions";s:0:"";s:8:"required";s:1:"1";s:13:"default_value";s:0:"";s:11:"placeholder";s:0:"";s:7:"prepend";s:0:"";s:6:"append";s:0:"";s:10:"formatting";s:4:"html";s:9:"maxlength";s:0:"";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";s:5:"value";s:0:"";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:1;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5298d2eab927d</wp:meta_key>
<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_5298d2eab927d";s:5:"label";s:5:"Sujet";s:4:"name";s:17:"publication_sujet";s:4:"type";s:7:"wysiwyg";s:12:"instructions";s:57:"Indiquer en quelques lignes le sujet de cette publication";s:8:"required";s:1:"1";s:13:"default_value";s:0:"";s:7:"toolbar";s:4:"full";s:12:"media_upload";s:2:"no";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5298d96b297a3";s:8:"operator";s:2:"==";s:5:"value";s:28:"L'auteur est membre de l'AHC";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:2;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5298d29eb927c</wp:meta_key>
<wp:meta_value><![CDATA[a:8:{s:3:"key";s:19:"field_5298d29eb927c";s:5:"label";s:22:"Auteur Membre de l'AHC";s:4:"name";s:0:"";s:4:"type";s:3:"tab";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"1";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5298d96b297a3";s:8:"operator";s:2:"==";s:5:"value";s:28:"L'auteur est membre de l'AHC";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:5;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5298d394a3a51</wp:meta_key>
<wp:meta_value><![CDATA[a:8:{s:3:"key";s:19:"field_5298d394a3a51";s:5:"label";s:17:"Infos Publication";s:4:"name";s:0:"";s:4:"type";s:3:"tab";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";s:5:"value";s:0:"";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:0;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5298d58d9846a</wp:meta_key>
<wp:meta_value><![CDATA[a:13:{s:3:"key";s:19:"field_5298d58d9846a";s:5:"label";s:19:"Type de Publication";s:4:"name";s:16:"publication_type";s:4:"type";s:8:"taxonomy";s:12:"instructions";s:0:"";s:8:"required";s:1:"1";s:8:"taxonomy";s:16:"publication_type";s:10:"field_type";s:6:"select";s:10:"allow_null";s:1:"0";s:15:"load_save_terms";s:1:"1";s:13:"return_format";s:6:"object";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";s:5:"value";s:0:"";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:3;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5298d96b297a3</wp:meta_key>
<wp:meta_value><![CDATA[a:13:{s:3:"key";s:19:"field_5298d96b297a3";s:5:"label";s:31:"L'auteur est il membre de l'AHC";s:4:"name";s:22:"publication_author_ahc";s:4:"type";s:5:"radio";s:12:"instructions";s:0:"";s:8:"required";s:1:"1";s:7:"choices";a:2:{s:28:"L'auteur est membre de l'AHC";s:28:"L'auteur est membre de l'AHC";s:34:"L'auteur n'est pas membre de l'AHC";s:34:"L'auteur n'est pas membre de l'AHC";}s:12:"other_choice";s:1:"0";s:17:"save_other_choice";s:1:"0";s:13:"default_value";s:28:"L'auteur est membre de l'AHC";s:6:"layout";s:8:"vertical";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";s:5:"value";s:0:"";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:4;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5298d9e4297a4</wp:meta_key>
<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_5298d9e4297a4";s:5:"label";s:42:"Trouver l'auteur dans la liste des membres";s:4:"name";s:21:"publication_author_id";s:4:"type";s:9:"page_link";s:12:"instructions";s:0:"";s:8:"required";s:1:"1";s:9:"post_type";a:1:{i:0;s:6:"member";}s:10:"allow_null";s:1:"0";s:8:"multiple";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"1";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5298d96b297a3";s:8:"operator";s:2:"==";s:5:"value";s:28:"L'auteur est membre de l'AHC";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:6;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5299a58668e7a</wp:meta_key>
<wp:meta_value><![CDATA[a:10:{s:3:"key";s:19:"field_5299a58668e7a";s:5:"label";s:77:"L'auteur de cette publication a-t-il déjà rédigé des articles pour l'AHC?";s:4:"name";s:30:"publication_ahc_author_contrib";s:4:"type";s:10:"true_false";s:12:"instructions";s:0:"";s:8:"required";s:1:"1";s:7:"message";s:0:"";s:13:"default_value";s:1:"1";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"1";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5298d96b297a3";s:8:"operator";s:2:"==";s:5:"value";s:28:"L'auteur est membre de l'AHC";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:7;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5299a61868e7b</wp:meta_key>
<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_5299a61868e7b";s:5:"label";s:54:"Confirmer en le selectionnant dans la liste ci-dessous";s:4:"name";s:29:"publication_author_ahc_author";s:4:"type";s:4:"user";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:4:"role";a:1:{i:0;s:3:"all";}s:10:"field_type";s:6:"select";s:10:"allow_null";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"1";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5299a58668e7a";s:8:"operator";s:2:"==";s:5:"value";s:1:"1";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:8;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5299a9ccb6b76</wp:meta_key>
<wp:meta_value><![CDATA[a:8:{s:3:"key";s:19:"field_5299a9ccb6b76";s:5:"label";s:34:"L'auteur n'est pas Membre de l'AHC";s:4:"name";s:0:"";s:4:"type";s:3:"tab";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"1";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5298d96b297a3";s:8:"operator";s:2:"==";s:5:"value";s:34:"L'auteur n'est pas membre de l'AHC";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:9;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5299aa22b6b77</wp:meta_key>
<wp:meta_value><![CDATA[a:14:{s:3:"key";s:19:"field_5299aa22b6b77";s:5:"label";s:4:"Nom:";s:4:"name";s:27:"publication_author_lastname";s:4:"type";s:4:"text";s:12:"instructions";s:0:"";s:8:"required";s:1:"1";s:13:"default_value";s:0:"";s:11:"placeholder";s:0:"";s:7:"prepend";s:0:"";s:6:"append";s:0:"";s:10:"formatting";s:4:"html";s:9:"maxlength";s:2:"50";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5298d96b297a3";s:8:"operator";s:2:"==";s:5:"value";s:28:"L'auteur est membre de l'AHC";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:10;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5299aa58b6b78</wp:meta_key>
<wp:meta_value><![CDATA[a:14:{s:3:"key";s:19:"field_5299aa58b6b78";s:5:"label";s:8:"Prénom:";s:4:"name";s:28:"publication_author_firstname";s:4:"type";s:4:"text";s:12:"instructions";s:0:"";s:8:"required";s:1:"1";s:13:"default_value";s:0:"";s:11:"placeholder";s:0:"";s:7:"prepend";s:0:"";s:6:"append";s:0:"";s:10:"formatting";s:4:"html";s:9:"maxlength";s:2:"50";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5298d96b297a3";s:8:"operator";s:2:"==";s:5:"value";s:28:"L'auteur est membre de l'AHC";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:11;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5299aa99b6b79</wp:meta_key>
<wp:meta_value><![CDATA[a:12:{s:3:"key";s:19:"field_5299aa99b6b79";s:5:"label";s:13:"Adresse mail:";s:4:"name";s:24:"publication_author_email";s:4:"type";s:5:"email";s:12:"instructions";s:0:"";s:8:"required";s:1:"1";s:13:"default_value";s:0:"";s:11:"placeholder";s:0:"";s:7:"prepend";s:0:"";s:6:"append";s:0:"";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5298d96b297a3";s:8:"operator";s:2:"==";s:5:"value";s:28:"L'auteur est membre de l'AHC";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:12;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5299ab72e0331</wp:meta_key>
<wp:meta_value><![CDATA[a:8:{s:3:"key";s:19:"field_5299ab72e0331";s:5:"label";s:14:"La Publication";s:4:"name";s:0:"";s:4:"type";s:3:"tab";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5298d96b297a3";s:8:"operator";s:2:"==";s:5:"value";s:28:"L'auteur est membre de l'AHC";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:13;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5299ab8de0332</wp:meta_key>
<wp:meta_value><![CDATA[a:13:{s:3:"key";s:19:"field_5299ab8de0332";s:5:"label";s:12:"S'agit-il...";s:4:"name";s:18:"publication_format";s:4:"type";s:5:"radio";s:12:"instructions";s:0:"";s:8:"required";s:1:"1";s:7:"choices";a:3:{s:26:"... d'un ouvrage publié ?";s:26:"... d'un ouvrage publié ?";s:46:"... d'un article à retranscrire sur le site ?";s:46:"... d'un article à retranscrire sur le site ?";s:57:"... d'un lien vers un article publié sur un autre site ?";s:57:"... d'un lien vers un article publié sur un autre site ?";}s:12:"other_choice";s:1:"0";s:17:"save_other_choice";s:1:"0";s:13:"default_value";s:0:"";s:6:"layout";s:8:"vertical";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5298d96b297a3";s:8:"operator";s:2:"==";s:5:"value";s:28:"L'auteur est membre de l'AHC";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:14;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5299acd116f44</wp:meta_key>
<wp:meta_value><![CDATA[a:14:{s:3:"key";s:19:"field_5299acd116f44";s:5:"label";s:18:"Titre de l'ouvrage";s:4:"name";s:22:"publication_book_title";s:4:"type";s:4:"text";s:12:"instructions";s:0:"";s:8:"required";s:1:"1";s:13:"default_value";s:0:"";s:11:"placeholder";s:0:"";s:7:"prepend";s:0:"";s:6:"append";s:0:"";s:10:"formatting";s:4:"html";s:9:"maxlength";s:0:"";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5299ab8de0332";s:8:"operator";s:2:"==";s:5:"value";s:26:"... d'un ouvrage publié ?";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:15;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5299ad2716f45</wp:meta_key>
<wp:meta_value><![CDATA[a:15:{s:3:"key";s:19:"field_5299ad2716f45";s:5:"label";s:21:"Année de publication";s:4:"name";s:21:"publication_book_year";s:4:"type";s:6:"number";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:13:"default_value";s:0:"";s:11:"placeholder";s:0:"";s:7:"prepend";s:0:"";s:6:"append";s:0:"";s:3:"min";s:4:"1900";s:3:"max";s:4:"2015";s:4:"step";s:1:"1";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5299ab8de0332";s:8:"operator";s:2:"==";s:5:"value";s:26:"... d'un ouvrage publié ?";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:16;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_5299af1173901</wp:meta_key>
<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_5299af1173901";s:5:"label";s:47:"Rediger - Copier / Coller l'article ci-dessous";s:4:"name";s:24:"publication_article_text";s:4:"type";s:7:"wysiwyg";s:12:"instructions";s:0:"";s:8:"required";s:1:"1";s:13:"default_value";s:0:"";s:7:"toolbar";s:4:"full";s:12:"media_upload";s:2:"no";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:19:"field_5299ab8de0332";s:8:"operator";s:2:"==";s:5:"value";s:46:"... d'un article à retranscrire sur le site ?";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:17;}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>rule</wp:meta_key>
<wp:meta_value><![CDATA[a:5:{s:5:"param";s:9:"post_type";s:8:"operator";s:2:"==";s:5:"value";s:11:"publication";s:8:"order_no";i:0;s:8:"group_no";i:0;}]]></wp:meta_value>
</wp:postmeta>
</item>
</channel>
</rss>
Thanks for the trouble ! strange bug !
Rgds,
JM
Hi @willthemoor
The flexible content field will be your best bet for creating the editing interface for this level of customized content.
I agree that you should use a select field in each layout to allow for layout specific alteration such as column width and alignment.
You can also use some conditional logic to hide sub fields within the layout if you fear that there may be too many fields at once.
As for the pull quote issue, perhaps think about using shortcodes in your WYSIWYG field to allow for the alignment instead of classes.
Good luck
Thanks
E
Hi @elliot
I can send you log in details, I’ll do that shortly.
No, the edit page half loads but the wysiwyg doesn’t along with any media buttons then it looks like it gets stuck in an endless loop of loading. I’ve come across this on two completely separate sites now.
Thanks
Rob
Hi guys
If the wp object does not exist. Do any WYSIWYG fields / image fields work on the page?
I am still not able to reproduce the error on my end. Would someone be kind enough to email me / comment (private) with login details?
Thanks
E
The issue occurs when there is one WYSIWYG editor as well as multiple, and the replacement of the main content is very random. Sometimes it will be the full text of what was typed in the full screen mode, other times it will be missing a few characters. If you add an image to the full screen editor, it may or may not appear in the main content editor. Unfortunately, I haven’t been able to find a pattern to the issue yet.
Hi @elliot,
Yeah that is the issue, but what you mentioned is not true about the WordPress WYSIWYG, if you add an image/file with it it will get attached to the post even if it was in the media library originally.
Using your WYSIWYG does it correctly as well. Any chance to get that same outcome with the image or file fields?
Thanks
Hi @whodeee
Thanks for the extra info.
I think I can see what the issue is here. When ‘selecting’ an image for the image field, the image itself is not updated.
This explains why the ‘Unattached’ is showing.
This data is only set when an image is first uploaded. If you upload it to the Media library, there is not post to attach it it. If you upload the image within a post, then it will be attached to the post.
I believe this is the same as how WP treats images in the WYSIWYG.
Please let me know if there is something I have missed, but I hope that explains what is going on.
Thanks
E
Yes, has always been happening with WYSIWYG. Thank you for the suggestion Elliot, I will try setting up a testing environment today.
Thanks again for the amazing plugin.
@elliot, thanks so much for looking into this. I just started working with ACF and it is freakin awesome. I just happened to notice today that the HTML in the WYSIWYG seemed to be minified and then came across this post. I would be very happy if it can be made to emulate the native WordPress editor, but I also understand if it is an issue with tinyMCE object.
Hi @ericadecker
Can you please update the WP WYSIWYG add-on from github. I just released a fix so that now it uses the acf_the_content filter correctly, and your code should then work.
Thanks
E
Hi @tomfordweb
Is the same issue happening with the normal ACF WYSIWYG field?
If so, there is definitely a conflict between ACF and either a plugin or theme code.
Perhaps you could install a fresh WP + ACF, create a WYSIWYG field and slowly add in all the plugins / theme until the issue occurs.
That way, you can target exactly what code is causing the issue
Thanks
E
Hi @tomfordweb
It is possible that the WP WYSIWYG add-on has a bug with the current version of WP and ACF. I’ll do some testing and let you know what I find.
Just to clarify, no console errors on a refreshed page with the console already open?
Thanks
E
Hi @Excelmans Graphics
If you always want a text block before any other flex content could you not just create a separate textarea/WYSIWYG and place it before your flex content (on the front end – you could always place it before the flex field in admin too to ensure it makes more sense to your client)? That way you always know it’s going to appear before any content your client adds.
Not sure I can see the benefit to be able to lock content position for this use case – I guess it might be useful in cases where a certain content type needs to appear at a particular point in a loop e.g. every fifth item) but I think that’s possibly too edge to be worth baking in. Elliot might have other ideas!
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.