• Resolved Simon McKeown

    (@nativenannygmbh)


    Hi Support

    With version 5.0.1 we experience the issue as described in the thread: “Conflict between Font Awesome 5.0.1 and Toolset types 3.5.2”. I posted in that thread too but got no response. It was stated that version 5.0.2 should resolve the issue.

    In the meantime, we upgraded to 5.0.2 and are still not able to edit the post_content field of posts when your plugin is active!

    Please advise on how and when this is to be resolved.

    Thanks and kind regards

    Simon

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter Simon McKeown

    (@nativenannygmbh)

    Hi there

    Any update on this bug?

    Kind regards

    Simon

    Plugin Author mlwilkerson

    (@mlwilkerson)

    @nativenannygmbh yeah, it seems that the cause of your bug isn’t quite the same as what was fixed in 5.0.2. Sorry about that.

    Could you provide detailed steps for how to reproduce your bug? I need to be able to reproduce it in order to fix it. What steps do you take to see the defective behavior? What exactly do you click? What does it look like when the defective behavior occurs (screenshot please)? What do you expect it to look like (screenshot please)?

    Is there a way to reproduce the bug without buying Toolset?

    We’ve been hyper-focused on releasing Font Awesome 7, which is rolling out today. I expect to have an opportunity to circle back to look more deeply into this issue later this week.

    I’d hoped to find a quick fix today as part of the release to support FA7, but without a way to reliably reproduce it, I can’t do much.

    Thread Starter Simon McKeown

    (@nativenannygmbh)

    @mlwilkerson Thanks for the reply, and apologies for the delay in my own response, there was an old email address in my wordpress.org account, so wasn’t receiving notifications from you that you had updated this bug. I’ve updated it, so should receive your notifications going forward.

    Regarding steps to reproduce:

    1. Simply log in to the backend of WordPress, go to a Toolset custom post type, and click one of the records. There the first field we see is the post_content field, however it is not working for only SOME of our custom post types when your plugin is active, but for others it is working fine.
    2. When it is not working the post_content field appears blank (even if there is something written in there) and it is not possible to click on the Visual tab or Code tab. Clicking either “Visual” or “Code” has no effect, and the editor does not “switch” to the clicked tab either, although the tab title gets highlighted. (See screenshots)

    https://snipboard.io/RKVmwx.jpg

    https://snipboard.io/oKIeDb.jpg

    https://snipboard.io/4b8nSv.jpg

    Is there a secure way to allow you access to our development site, where you can reproduce at will?

    I will re-open a ticket with Toolset again in parallel to see if they can help isolate why it is working fine for SOME CPTs but not others.

    Kind regards

    Simon

    Thread Starter Simon McKeown

    (@nativenannygmbh)

    @mlwilkerson Quick update – I contacted Toolset support, and they tested with and without FA plugin active. They referrred me back to you, as everything works fine when the FA plugin is not active.

    I hope we can reach a solution soon. Let me know if you want access to our dev site to reproduce.

    Kind regards

    Simon

    jedymaster

    (@jedymaster)

    Hello

    I have the exact same problem. I deactivated Font Awesome plugin for now.

    Hopefully, you will quickly find a fix for that problem.

    Best regards !

    Denis

    • This reply was modified 4 months ago by jedymaster.
    Thread Starter Simon McKeown

    (@nativenannygmbh)

    @mlwilkerson Any further updates here?

    Kind regards

    Simon

    marfernandez

    (@marfernandez)

    Hi,
    I have exactly the same problem on several websites. For now, I have deactivated the Font Awesome plugin.
    I look forward to hearing from you about the resolution of this issue.
    Thanks,
    Mar

    Plugin Author mlwilkerson

    (@mlwilkerson)

    @nativenannygmbh I’m back at this. Yes, if you can provide me with access to a dev site of yours where this is reproduced, that would be helpful. Please don’t post private info here, however. Email hello at fontawesome dot com

    In the meantime, I have acquired a copy of Toolset and have attempted to reproduce it. Unfortunately, I still don’t have enough detail from your description to reproduce it. The experiments I tried all worked as expected–no bug.

    I installed the Toolset Types plugin, and activated it. I created a custom post type called Animals. On that type, I set the Editor property to the value “Classic” (because this bug seems to occur only in the Classic editor, right?)

    Then I created a new Post of type Animal in the Classic Editor.

    I successfully added text content to the post, successfully added a Font Awesome icon, and successfully switched between the Visual and Code tabs. I saved the post with content, and viewed it on the front end. Everything worked and looked as expected as far as I can tell. No errors in the JavaScript console.

    So I still have not been able to reproduce the bug. I’ll need more detailed steps to reproduce it.

    You said:

    it is not working for only SOME of our custom post types when your plugin is active, but for others it is working fine.

    Could look at your post types and see what differences there in the properties between those that exhibit the bug versus those that don’t?

    You also said:

    go to a Toolset custom post type, and click one of the records. There the first field we see is the post_content field

    I might have figured out what you meant by that, but I’m not sure. Could you say it more precisely?

    • What do you mean precisely by “go to a Toolset custom post type”? Can you show a screenshot of this?
    • What do you mean by “click one of the records”? Screenshot?

    If you think the steps I took above do not match what you intended, please provide more detailed walkthrough steps.

    I also notice from your screenshots that there are media buttons labeled “Fields and Views” and “Toolset Forms”. Those are not present by default in a minimal WordPress installation, so they must be coming from some other component you have installed.

    When I downloaded Toolset, I noticed that there are multiple Toolset modules that might be installed in addition to Toolset Types. After my first attempt to reproduce the bug failed, I also downloaded and installed Toolset Forms. The bug still did not reproduce, even with Toolset Forms installed.

    It seems possible that one of these other Toolset components contributes conditions required to reproduce the bug. If you’re able to provide more specific reproduction steps, please note what other Toolset components you have installed. Ideally, you’d provide minimal reproduction steps. Meaning: if possible, reproduce the bug with only the Toolset Types plugin and one custom post type where the properties are set that will cause the bug to occur.

    Here’s an example template for a minimal reproduction that would be helpful to me:

    1. from a clean install of WordPress, what Toolset modules must be installed?
    2. create a new custom post type that will exhibit the bug: what properties must be selected?
    3. after creating the new custom post type, what links or buttons on which views must be clicked in which order to arrive at the view where you see the bug?
    Plugin Author mlwilkerson

    (@mlwilkerson)

    I seem to have reproduced the bug, and I’ll explain it below. I’ve included some additional detail here in case it helps someone at Toolset to be able to confirm or correct what I think I’ve found.

    TL;DR: Toolset seems to be loading the tinymce JavaScript and/or modifying the tinymce global object in a way that conflicts with our plugin’s dependence on it. If so, then it doesn’t yet seem appropriate for us to change our plugin in order to work around this problem in Toolset.

    Reproduction

    • From a clean WordPress installation version 6.8.2
    • Install, activate, and configure the Font Awesome plugin version 5.0.2
    • Install and activate the Toolset Type plugin version 3.6.1
    • In Toolset, create a post type such as “Buildings”. Change the Editor property to have the value “Classic”.
    • In Toolset, create a post type such as “Addresses”. Change the Editor property to have the value “Classic”.
    • In Toolset, create a new Relationship, of type One-to-one. Select Buildings for the left side and Addresses for the right side. (Adding the Relationship is the piece that I added in addition to my previous reproduction attempt. The bug does not manifest without adding the Relationship.)
    • Create a new Buildings post.

    Toggle between the Visual and Code tabs while viewing the JavaScript console to see the error message.

    When SCRIPT_DEBUG is defined in WordPress, the stack trace for that JavaScript console error looks like this:

    Uncaught TypeError: Cannot read properties of undefined (reading ‘getSelection’)
    at findBookmarkedPosition (editor.js?ver=6.8.2:657:31)
    at switchEditor (editor.js?ver=6.8.2:161:23)
    at HTMLDocument. (editor.js?ver=6.8.2:38:7)
    at C (tinymce.min.js?ver=49110-20250317:2:10800)
    at HTMLDocument.d (tinymce.min.js?ver=49110-20250317:2:10946)

    The code there in editor.js where undefined is encountered is here:

    var TinyMCEWindow = editor.getWin(),
    selection = TinyMCEWindow.getSelection();

    It’s TinyMCEWindow that is undefined. So invoking undefined.getSelection() throws the Error.

    Our plugin code declares a dependency on tinymce, because our Classic Editor integration depends on tinymce. Here’s where that dependency is declared:

    wp_register_script(
    self::RESOURCE_HANDLE_CLASSIC_EDITOR,
    trailingslashit( FONTAWESOME_DIR_URL ) . 'classic-editor/build/index.js',
    array(
    self::ADMIN_RESOURCE_HANDLE,
    self::RESOURCE_HANDLE_ICON_CHOOSER,
    'wp-tinymce',
    'jquery',
    ),
    self::PLUGIN_VERSION,
    true
    );

    I think that’s a standard way for our plugin to declare its actual dependence on tinymce (what powers the WordPress Classic Editor).

    When that 'wp-tinymce' line is commented out–thus removing our plugin’s explicit dependence on tinymce–the bug that’s reproduced by using the above steps disappears.

    So, when our plugin declares its dependence on tinymce, then this produces undefined:

    TinyMCEWindow = editor.getWin()

    When our plugin does not declare its dependence on tinymce, that same line produce the expected result.

    Declaring our plugin’s dependency on tinymce changes the order in which some of the related scripts are loaded in the browser, which seems to disrupt some of Toolset’s assumptions. Yet it seems to me that our plugin should declare its dependence on tinymce, because it does actually depend on it, and this is a standard way to declare that dependence.

    This suggests that Toolset might be doing some modification of the tinymce global, or otherwise changing things such that it breaks when the scripts loading order changes or script execution timing changes. If so, then that would seem like a flaky, error-prone implementation in Toolset that should be corrected there. That could be causing a problem not only with the Font Awesome plugin, but any other theme or plugin that declares a dependence on tinymce.

    If something like that in Toolset is indeed the root cause, then it’s not clear to me that we should try to change our plugin to accommodate it. Because, if I’ve understood correctly, it would amount to us hacking our code to work around a problem in Toolset.

    Having the same issue on a bunch of client sites where I use Toolset. My workaround is to not use the Font Awesome plugin and load Font Awesome by script instead. Since I don’t need access to font awesome in classic or block editor, this works for me but I’d still prefer if Toolset and Font Awesome can work this out and fix it in either or both plugins.

    Plugin Author mlwilkerson

    (@mlwilkerson)

    After giving it some further thought, the risk may be low enough to omit our plugin’s explicit dependence on tinymce as a way to work around what I currently believe is an error in Toolset’s code. Would you join me in an experiment?

    I’ve posted a development release here in our GitHub repo. It simply omits our plugin’s explicit dependence on wp-tinymce. Otherwise, it’s functionally equivalent to the 5.1.1 version of the plugin that I also released today (the curious can see diffs here).

    For the bug as I was able to reproduce it above, this resolves it.

    It would be helpful if those who’ve encountered the problem could try this development release, perhaps on a staging or development site, and let me know if it resolves your manifestation of the problem.

    To try it:

    1. Navigate to the Release Page in GitHub.
    2. Click link to download font-awesome-5.1.2-1.zip from that page.
    3. In WordPress admin, go to install a new plugin, click to Upload, and upload that zip file to install it.

    That 5.1.2-1 experimental release does fix the problem on the sites where I use Toolset and Font Awesome. I tested on a copy on localhost.

    I opened a ticket with Toolset today referencing this support post as they seemed to want proof it was a Toolset issue before doing more work on their side of things in older, now closed, tickets. Your post from yesterday seems to explain it pretty well. Not sure if they’ll act on that or not.

    Thread Starter Simon McKeown

    (@nativenannygmbh)

    @mlwilkerson Thanks for this.

    I have just returned from holiday and created a new ticket in Toolset forum asking for their take on your detailed technical assessment:

    https://toolset.com/forums/topic/follow-up-conflict-ts-with-font-awesome-plugin-unable-to-edit-post_content/

    I guess they will get back to us on Monday as it’s the weekend now.

    I installed your 5.1.2-1 experimental release version of the plugin to test. I can confirm that with that version I can edit the post_content field correctly as expected and can switch correctly between “Visual” and “Code” tabs.

    Kind regards
    Simon

    Plugin Author mlwilkerson

    (@mlwilkerson)

    I’ve just released plugin version 5.1.3 with that change. Does that still fix the problem here?

    Yes, 5.1.3 still works correctly in my test site here.

Viewing 15 replies - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.