WordPress.org

Ready to get started?Download WordPress

Forums

Simple Fields
[resolved] Problem with repeatable fields (18 posts)

  1. DogHustler
    Member
    Posted 7 months ago #

    I have a problem when using a repeatable field group on a custom post type (not sure if the problem only happens on CPTs though).

    When clicking "+Add" while editing a CPT post it gets stuck. It displays the text "Adding" but then it stays there.

    Anybody have a solution for this?

    Thanks,
    Dan

    http://wordpress.org/plugins/simple-fields/

  2. DogHustler
    Member
    Posted 7 months ago #

    For some reason it seems to work in Chrome, but not in Firefox, Safari and Opera. I'm using a MacBook...

    I also use Simple Fields on the regular "Pages" post type and it works there. Very strange.

  3. mahlerthetitan
    Member
    Posted 6 months ago #

    I, too, am stuck with 'Adding...', if I use Firefox (which I prefer to do). It works fine in Chrome, just like DogHustler.

    I'm also on a Mac (using Mountain Lion).

    If the author needs any more info, I'm happy to provide it.

    Thanks,
    Chris

  4. Pär Thernström
    Member
    Plugin Author

    Posted 6 months ago #

    Does any of you have access to firebug or web inspector and can check what the "console" says when you click Add?

  5. mahlerthetitan
    Member
    Posted 6 months ago #

    Hi Pär,

    Sure thing. Here is the output from Firebug's Console.
    Sorry the formatting isn't ideal, here:

    10:43:44.051 Use of getUserData() or setUserData() is deprecated. Use WeakMap or element.dataset instead. requestNotifier.js:64
    10:43:45.755 Use of getPreventDefault() is deprecated. Use defaultPrevented instead. load-scripts.php:4
    10:43:46.875 "init simple_fields_file_field" scripts.js:22
    10:43:47.191 Use of Mutation Events is deprecated. Use MutationObserver instead. script.js:19
    10:43:48.497 Use of getUserData() or setUserData() is deprecated. Use WeakMap or element.dataset instead. requestNotifier.js:64
    10:43:57.109 Use of getUserData() or setUserData() is deprecated. Use WeakMap or element.dataset instead. requestNotifier.js:64
    10:43:57.141 SyntaxError: unmatched ) in regular expression load-scripts.php:4

    Do let me know if you need any more information. Thanks for looking into this. :)

  6. DogHustler
    Member
    Posted 6 months ago #

    I have found out part of the problem. If I deactivate TinyMCE Advanced the plugin works again so there seems to be a conflict between these two plugins.

    I use the textarea field type and I think that TinyMCE tries to change the tool bar for these (as the are HTML enabled). For some reason this no longer works. But if the problem is in Simple Fields or TinyMCE, I don't know.

    //Dan

  7. mahlerthetitan
    Member
    Posted 6 months ago #

    Ahhh. Good call, DogHustler.

    I'm also using TinyMCE Advanced on my site and can confirm that, when I deactivate TinyMCE Advanced, the "adding" function in Simple Fields works perfectly, in Firefox.

  8. cokeyblokey
    Member
    Posted 4 months ago #

    I have a variation of this problem too.

    I'm using WP 3.9 (multi-site)

    If I try and add a repeatable field set to any page, post or custom post type, it gets stuck on the 'adding' message. If I then 'update' the page then the new set is there.

    This happens with Chrome, Firefox and IE (all on win7)

    I'm sure it's something to do with the new TinyMCE editor that ships with WP 3.9 but it's a problem that definitely needs addressing.

  9. ishanbansal
    Member
    Posted 4 months ago #

    Just wanted to throw in my two cents:
    1. I don't have TinyMCE Advanced plugin and I am still getting this problem.
    2. I tried installing TinyMCE Advanced and then disabled it, just to see if that works, but no luck.
    3. I can confirm cokeyblokey's observation that if we click on update or save draft etc., then the new set of fields is added.

    And this does needs addressing, or at least a workaround.

  10. cokeyblokey
    Member
    Posted 4 months ago #

    If you uncheck 'Use HTML editor' in the repeatable field options of Simple Fields then the fields get added as they should. Developers are working on a fix (as per another thread).

  11. tscok
    Member
    Posted 3 months ago #

    I'm having the same issue with adding a repeatable field. In my case the console stated there was an unexpected ; in or near jQuery.

    The event function in scripts.js of the simple-fields plugin requests the field group (repeatable field) from the server using a XHR post request. The respons data has a very confusing line of code in it

    if ( ( tinymce.DOM.hasClass( wrapper, 'tmce-active' ) || ! tinyMCEPreInit.qtInit.hasOwnProperty( edId ) ) &amp:&amp: ! init.wp_skip_init ) {

    I asumed that the &amp:&amp: in the middle of the if statement was the culprit so I added replace('&amp:&amp:','&&') on line 415 in the simple-fields scripts.js which solved the problem.

    (Because this forum editor converts any attempt of writing the entity name of ampersand into ampersands I have replaced the comma with a colon in the code above.)

    Editing the plugin is of course not ideal but in my opinion better than editing WP core files.

  12. ishanbansal
    Member
    Posted 3 months ago #

    I was not able to find the code that tscok mentioned, but the code on following thread fixed the issue for me:

    http://wordpress.org/support/topic/error-in-wordpres-39?replies=1

  13. robalan
    Member
    Posted 3 months ago #

    So was this not fixed in the update? C'mon...

  14. Pär Thernström
    Member
    Plugin Author

    Posted 3 months ago #

    I hear ya! Let me know if the latest update fixes it.

  15. robalan
    Member
    Posted 3 months ago #

    That did it! Thank you!

  16. loopcustom
    Member
    Posted 2 months ago #

    I too am having the same problem...

    Mac 10.9.2
    Firefox - stuck at Adding...
    Chrome - no problem
    Safari - stuck at Adding...

    ...and I believe I have found the culprit. Within the TinyMCE Advanced settings under Advanced Options, there is a checkbox that reads: Stop removing the <p> and
    tags when saving and show them in the HTML editor. When this is checked, the problem arises; uncheck it, it ceases.

    I hope this helps...

    Thanks!

  17. fantara
    Member
    Posted 2 months ago #

    Hello! I'm On Safari 7.0.4 and it stucks on "Adding..."

    Console says there's an expected token on jQuery v.11.1.

    Thanks!

  18. fantara
    Member
    Posted 2 months ago #

    By the way, I disabled the TinyMCE Advanced option to remove the <p> but no luck.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.