Support

Account

Home Forums Search Search Results for 'Wysiwyg'

Search Results for 'Wysiwyg'

reply

  • I ran a query and spit out all of the fields I have published in my DB. You can see the output below. I could only find one field that had the same name as another field with different field types for the same name.

    In my case I have multiple options pages. So I have the standard ‘options’ page and then I have another one called ’60day’. Now I tried moving my one issue field between these two pages, but that didn’t fix the issue. Reverting back to ACF 5.3.1 did fix this issue though. A week later I was doing some performance tuning and decided to move the field groups to PHP files. With this move, even with ACF 5.3.1 I was getting the item count output for my repeater fields. So I had to move my one ’60day’ field group back to the DB.

    I have gone through the usual steps of switching to a default theme and also disabled all non-standard plugins. I think the main question is what’s different between the field getting populated in my edit pages, which does work, versus getting the field values in the theme.

    THIS FIELD HAD NO NAME FOR SOME REASON
    -tab (1)
    Thumbnail
    -image (1)
    _copy
    -tab (1)
    add_photo_gallery
    -true_false (1)
    add_title_butterfly
    -true_false (1)
    affirmation_mp3
    -file (1)
    audio_file
    -file (1)
    author_link
    -text (1)
    author_location
    -radio (1)
    auto_play_video_once_on_load
    -true_false (1)
    background_image
    -image (4)
    boxed_content
    -true_false (1)
    button_label
    -text (2)
    button_link_type
    -radio (1)
    button_link_url
    -text (1)
    category_name
    -text (1)
    challenge_mp3
    -file (1)
    column_title
    -text (1)
    content
    -wysiwyg (1)
    content_colour
    -radio (3)
    daily_email_body
    -wysiwyg (1)
    daily_email_files
    -repeater (1)
    daily_email_subject
    -text (1)
    daily_emails
    -tab (1)
    date
    -textarea (1)
    -date_picker (2)
    dates
    -repeater (1)
    days
    -repeater (1)
    deal_start_date
    -date_picker (1)
    deck
    -post_object (1)
    description
    -textarea (7)
    -wysiwyg (2)
    fancy_title
    -true_false (1)
    feature_blocks
    -repeater (1)
    feature_image
    -image (2)
    feature_logos
    -image (1)
    footer_note
    -textarea (2)
    freebies
    -repeater (1)
    gallery
    -gallery (1)
    gallery_photos
    -gallery (1)
    gallery_position
    -radio (1)
    gratitude_mp3
    -file (1)
    gravity_form_id
    -number (1)
    highlight
    -textarea (2)
    highlight_cirlces
    -repeater (1)
    highlights
    -repeater (1)
    icon
    -select (1)
    -image (1)
    icon_features
    -repeater (1)
    intro*******
    -textarea (2)
    -wysiwyg (2)
    -repeater (1)
    intro_column_text
    -wysiwyg (1)
    intro_content_footer
    -text (1)
    intro_sub-title
    -wysiwyg (2)
    intro_title
    -text (2)
    item
    -textarea (1)
    job/location
    -text (1)
    link_feature_to_page
    -url (1)
    link_url
    -url (1)
    list_items
    -repeater (1)
    listing_type
    -radio (1)
    mailchimp_newsletter_group_name
    -text (1)
    monday_email_body
    -wysiwyg (1)
    monday_email_subject
    -text (1)
    monday_emails
    -tab (1)
    more_info_page
    -page_link (1)
    name
    -text (3)
    num_registrants
    -number (3)
    num_tickets
    -text (1)
    on_sale_products_only
    -true_false (1)
    outline_photos
    -true_false (1)
    page
    -post_object (1)
    page_blocks
    -repeater (1)
    page_icon
    -image (1)
    photo
    -image (6)
    product
    -post_object (2)
    product_category
    -taxonomy (1)
    purchase_buttons
    -repeater (1)
    purchase_date
    -date_picker (2)
    quote
    -textarea (1)
    recipients
    -repeater (1)
    registration_page
    -page_link (1)
    section_title
    -text (6)
    show_add_to_cart
    -true_false (1)
    side_scroll_on_mobile
    -true_false (1)
    sold_out
    -true_false (1)
    sub-title
    -text (2)
    subscriber_user
    -user (2)
    testimonials
    -repeater (1)
    thumbnail
    -image (1)
    ticket_type
    -text (1)
    time
    -text (3)
    time_of_day_to_switch_deals
    -text (1)
    title
    -text (14)
    title_icon
    -image (1)
    user
    -user (1)
    video_thumbnail
    -image (1)
    video_title
    -text (1)
    videos
    -repeater (1)
    vimeo_id
    -text (2)
    vimeo_video_url
    -url (1)
    -text (1)
    weekly_videos
    -repeater (1)
    worksheet
    -file (1)
    youtube_video_id
    -text (2)
    youtube_video_ids
    -repeater (1)

  • *************************************
    When I am adding below content in editor for custom field(using wysiwyg editor), it giving us a error and it is not saving
    *******************************************************************

    The affordable care act imposes penalties for those not having qualified healthcare coverage. For 2016, a penalty of $695 or 2.5% (whichever is higher) of income will apply to individuals not having any healthcare coverage. Families with no healthcare coverage will see a significant increase from a $975 maximum penalty to $2,085 maximum household penalty or 2.5% of household income (whichever is higher).

  • OK, I just exported the 10 test fields to PHP and copied the ‘fields’ portion of the array (and not the ‘locations’ part) into my theme config.php

    The second I uploaded that PHP file I hit update on the fields group and BOOM, 1 field left.

    So I can create fields, just not use them?

    Here is the code:

    
    if(function_exists("register_field_group")){
        register_field_group(array (
            'id' => 'acf_template-one-a',
            'title' => 'Template One: A',
            'fields' => array (
                array (
                    'key' => 'field_56a2ce14c3f0d',
                    'label' => 'one',
                    'name' => 'main_content_text_color',
                    'type' => 'color_picker',
                    'required' => 1,
                    'default_value' => '#000000',
                ),
                array (
                    'key' => 'field_56a2ce42c3f0e',
                    'label' => 'two',
                    'name' => 'conversion_text_color',
                    'type' => 'color_picker',
                    'required' => 1,
                    'default_value' => '#000000',
                ),
                array (
                    'key' => 'field_56a2f4376cc20',
                    'label' => 'three',
                    'name' => 'another_damn_field',
                    'type' => 'text',
                    'instructions' => 'blah blah blah',
                    'default_value' => '',
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56a2f4d283faa',
                    'label' => 'four',
                    'name' => 'four',
                    'type' => 'text',
                    'instructions' => 'grrrrr',
                    'default_value' => '',
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56a30600484a1',
                    'label' => 'five',
                    'name' => 'five',
                    'type' => 'image',
                    'save_format' => 'object',
                    'preview_size' => 'thumbnail',
                    'library' => 'all',
                ),
                array (
                    'key' => 'field_56a3061ef00f1',
                    'label' => 'six',
                    'name' => 'six',
                    'type' => 'image',
                    'save_format' => 'object',
                    'preview_size' => 'thumbnail',
                    'library' => 'all',
                ),
                array (
                    'key' => 'field_56a30657f81a1',
                    'label' => 'sevin',
                    'name' => 'sevin',
                    'type' => 'wysiwyg',
                    'required' => 1,
                    'default_value' => 'foo',
                    'toolbar' => 'full',
                    'media_upload' => 'yes',
                ),
                array (
                    'key' => 'field_56a3066fdf65c',
                    'label' => 'eight',
                    'name' => 'eight',
                    'type' => 'wysiwyg',
                    'default_value' => '',
                    'toolbar' => 'full',
                    'media_upload' => 'yes',
                ),
                array (
                    'key' => 'field_56a306cdc3924',
                    'label' => 'nine',
                    'name' => 'nine',
                    'type' => 'color_picker',
                    'required' => 1,
                    'default_value' => '#ff0000',
                ),
                array (
                    'key' => 'field_56a306ea011a1',
                    'label' => 'ten',
                    'name' => 'ten',
                    'type' => 'color_picker',
                    'required' => 1,
                    'default_value' => '#00ff00',
                ),
            ),
            'location' => array (
                array (
                    array (
                        'param' => 'post_type',
                        'operator' => '==',
                        'value' => 'landing-page',
                    ),
                    array (
                        'param' => 'template_id',
                        'operator' => '==',
                        'value' => $key,
                    )
                ),
            ),
            'options' => array (
                'position' => 'normal',
                'layout' => 'no_box',
                'hide_on_screen' => array (
                ),
            ),
            'menu_order' => 0,
        ));
    }
    
  • The fields are not actually there. The stored sort order values for the fields that were not deleted are just never updated. And the count for the total number of fields that shows at the “Field Groups” root level is also not updated.

    I originally did view the source to see if they were just hidden in the UI, but they are gone. And if I touch any of them to change the sort order they update to the proper 1, 2, 3, 4.

    It’s like they are being removed by some process that does not trigger any UI or DB updates for the stored sort and total fields values.

    I currently have a test going with 10 fields. 4 color pickers, 2 text, 2 WYSIWYG, and 2 images. (to see if somehow a specific field type is being removed) or if modifying a specific field type somehow triggers the series of events that ends up with random deletions.

    So far I’ve done everything I can think to do… update values change sort orders, exit the page, export to PHP, click the dreaded update button, and all 10 fields remain.

    That said, I don’t feel even remotely safe as fields have been randomly deleted on no fewer than 6 occasions so far.

    The only difference so far is that this field group has not been exported and used in my template config.php for the Landing Pages plugin. I wonder if somehow the config.php accessing these fields is deleting some of them?

    This is maddening.

  • Although this seems to be an old topic, it looks like I have exactly the same problem.

    get_post_meta isn’t really a solution because it doesn’t wrap regular text in <p> tags when you have mixed content in a wysiwyg field

  • ACF is struggling with text-area. Some of text-areas i have don’t have full editing capabilities (wysiwig) and are simply text areas. These areas are detected by the plugin, but the content pulled was null:

    In the code there are multiple cases for different type of content, i.e.:

    case 'wysiwyg' :
        value = $el.find('textarea').val();
        break;
     case 'textarea' :
        value = $el.find('textarea').val();
        break;

    When i’ve added case textarea – it fixed the issue.

    case 'textarea' :
        value = $el.find('textarea').val();
        break;

    I’m on WP 4.4
    Yoast SEO 3.0.7
    ACF Pro 5.3.3.1

  • Hi @buylov

    To remove the Visual/Text tab, you can edit your WYSIWYG field and set the “Tabs” as “Visual Only”.

    I hope this helps.

  • Hi Elliot,

    Thanks for the great work on this pluginβ€” always the first one I install on all projects.

    Most of the work I do is multilingual using the multisite approach. This incompatibility has been a burden from the beginning, but has really hit a serious problem for my most recent client who is a pro photographer.

    For complex portfolio layouts involving flexible content and repeater fields, the WYSIWYG field workaround is simply not an option.

    I have no idea what’s involved to add the “sidebar” functionality/compatibility, but given this thread is over 2 years old, I would love to hear if this is even in the works? …please say it is πŸ™‚

    Thanks a lot!

  • I found a solution so that ACF creates the correct code from a WYSIWYG field. You only have to add

    add_filter( 'acf_the_content', 'wp_make_content_images_responsive' );

    to your functions.php. I hope Elliot will add this direct into the code, so that ACF filters the WYSIWYG content like WP does.

    For the image field this code works for me:

    $image = get_field('my_image');
    $img_src = wp_get_attachment_image_url( $image['id'], 'full' );											$img_srcset = wp_get_attachment_image_srcset( $image['id'], 'full' ); ?>
    											<img src="<?php echo esc_url( $img_src ); ?>"
    	width = "<?php echo $image['sizes']['Stripe-width']; ?>"
    	height = "<?php echo $image['sizes']['Stripe-height']; ?>"
    	srcset="<?php echo esc_attr( $img_srcset ); ?>"
    	sizes="(max-width: 100vw) 480px" alt="<?php echo $image['alt']; ?>"
    >
  • I think it would be possible to parse the HTML from the editor on load and replace the image tag with one that includes srcset, but that seems like a poor solution. In addition to being a pain to code, you probably don’t want a preg_replace running every page load on every WYSIWYG field.

    Hopefully ACF issues an update that will start including srcset in img tags when they are added to the WYSIWYG editor on the admin side.

    Regarding your snippet above, I would return the image ID instead of array whenever possible. Again, per Joe McGill’s recommendation, it will be faster. Not the end of the world, but if possible might as well speed it up.

  • OK, only one issue I can see is with images inserted through the WYSIWYG editor. These don’t seem to get parsed in the same way as images inserted into the regular WP post editor.

  • same issue w/ 5.3.2.2

    first two flexible content modules work great, the third is what throws up the error:
    Warning: Illegal string offset 'acf_fc_layout' in /Users/harbinger-air/Dropbox/sites/bootstrap/wp-content/plugins/advanced-custom-fields-pro/pro/fields/flexible-content.php on line 232

    for reference, i have a flex content field w/ various layouts (col_6,col_4 etc…) each layout has tabs for each column to keep things tidy for clients.

    edit:
    this issue only affects the third column – all columns follow the same structure and have the same options (img, plain text or wysiwyg).

  • Hi @elliot.
    I have created ajax function, where inside are repeater fields.
    Once of them has wysiwyg and in the content I have youtube video link (in admin area those was converted to iFrame).
    In ajax response videos are as string.
    I have tried to use apply_filters( 'the_content', $tab['content'], true ); but it doesn’t work.
    format_value_wysiwyg (function above) doesn’t work for me.
    Hope you can help me. Thanks

  • I’ve tried the setup you describe.

    The thing is that this field group should not be showing up anywhere because the page template cannot be both templates. Your locations rules should be OR rather than AND.

    So the next question is, do you have any other field groups that include a WYSIWYG editor?

    If not, what other plugins or acf add ons do you have installed on the site? Does the problem go away if you deactivate them?

  • What version of ACF are you using? I’m assuming 5 because the wysiwyg field in 4 does not have the visual/text tabs.

    What other plugins do you have installed? I’ve tested in out and I’m not seeing the behavior you describe. You need to deactivate other plugins, especially anything that modifies the behavior of the editors. You may also need to try switching themes to one of the default 20XX themes to see if that clears it up.

    It’ll be easier to figure out what to do one you know where the incompatibility is.

  • What is the field name of the first wysiwyg field that’s not showing the toolbar?

    Does it contain any characters other than letters, numbers and underscores?

  • Yes, I’ve actually used this idea to build a site, we called them panels. The client can create a panel with 1, 2, 3 or 4 columns and specify much of the formatting used. The main content area is removed on these pages.

    The main problem is that the standard WP search will not search this content. You need to install something like https://wordpress.org/plugins/search-everything/

    One other thing that you may run into is the admin timing out if too many content areas are added. On another site I built I the client has up to 7 content areas for each section plus quite a few fields that control the layout of these fields on the front end. At about 10 sections using all of the available content areas for them (70 wysiwyg fields) the admin might time out when they save the page.

  • To be honest, no. I found this, it was posted a year ago, but there’s nothing specific to wysiwyg editors.

    In the file /fields/wysiwyg.php there are two methods in the class get_toolbars and input_admin_footer_js that I think are responsible for the code that needed, although I could be wrong. If all else fails you could try to replicate what those function are doing. Don’t know if it will work but it might be worth a try.

  • I’ve tried to do some digging around in the code. Without setting up a ajax loading acf form myself I can’t really find a solution.

    I believe that inserting a WYSIWYG field causes ACF to enqueue scripts that load into the footer of the page that format the field and since you’re loading the form by ajax these scripts are missing.

    Look at the footer script on a page with a form loaded normally and on a page with a form loaded by AJAX and see if there is a difference. If there is then you’ll need to figure out how to load the scripts that are missing.

    Not sure if this will help but I found it after writing the above. Have you looked at this http://www.advancedcustomfields.com/resources/acf_form/#AJAX

  • I have the same thing happening to me on version 5.3.1

    The problem
    When having a WYSIWYG field under a tab in a Flexible Content layout, the output of the_sub_field() stripped the content of its tags. Shortcodes did not work either.

    The solution
    Moving the WYSIWYG field to the top of the Flexible Content (meaning not under a tab field). This worked for me and it formats shortcodes and tags again.

    I could also place the field back under the tab now, and it worked just fine.

  • Hmm okay. You’re not experiencing the same issue with the regular media button in WP?

    If you add a wysiwyg field and click the media button, nothing?
    If you add a file field and click it? Image field?

  • The problem I’m having is with the fields within the layouts. The layouts aren’t moving after save. When I have the fields in the order I need and I click Update, majority of the fields from Column 2+3 move “up.”

    For example — looking at the columns, after saving I now have:

    Column 1 (Flexible Content)
        Title (Layout)
            Button Text (text)
            Title (text)
            Video (oEmbed)
            Button Link (url)
            Link (image)
        Blurb (Layout)
            Blurb (wysiwyg)
        Image (Layout)
            Image (image)
        Video (Layout)
        Button (Layout)

    Column 2 looks like this:

    Column 2 (Flexible Content)
        Title (Layout)
            Title (text)
            Blurb (wysiwyg)
            Image (image)
            Video (oEmbed)
            Button Text (text)
            Link (image)
            Button Link (url)
        Blurb (Layout)
        Image (Layout)
        Video (Layout)
        Button (Layout)

    and Column 3 has only layouts containing no fields.

    Could it be the names I’m giving fields? Instead of calling each Column’s Layout’s Fields something like “link,” instead call it “col1_link”?

  • Bump!

    I’ve just discovered that I’m also having this problem. Captions added to images in WYSIWYG field are not being assigned the .wp-caption class as they would be via the built in editor and calling the_content()

    This isn’t a plugin or theme conflict, core and plugins all up to date as of todays date.

  • Hi Jonathan,

    I used the WordPress import tool to import the xml from a custom post type.

    The fields missing are all text and wysiwyg.

  • Hi @inhouse

    This is a bit confusing… πŸ˜‰

    So you want to do these steps

    get a text sub field
    if radio button value equals β€˜x’…
    get image sub field (with thumbnail size)
    if url sub field, wrap image in a link
    if radio button equals β€˜y’…
    get oembed sub field
    get wysiwyg editor

    ONLY for the last row in your repeater?

Viewing 25 results - 701 through 725 (of 1,298 total)