• Resolved Jurriaan Koops

    (@jurriaankoops)


    Hi,

    After updating mxchat (not sure from which version I was coming), the chatbot is not styled correctly.

    Observed behavior:

    • The chatbot UI renders without proper styling
    • CSS from mxchat-basic (specifically chat-style.css) does not appear to be applied correctly
    • The interface looks unformatted or partially broken compared to expected appearance

    Context:

    • There is also a preload warning for this stylesheet, which may be related:
      The resource at “https://gravitywp.com/wp-content/plugins/mxchat-basic/css/chat-style.css?ver=3.1.8” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly.”

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support m4xw3ll

    (@m4xw3ll)

    Hey @jurriaankoops! I took a look at your site and found the issue. The chat-style.css file is being loaded correctly by the plugin, but something on your site (likely a caching or performance optimization plugin, or a server-level optimization like LiteSpeed) is converting the stylesheet link into a preload link. The preload is supposed to switch back to a regular stylesheet after the file loads, but that switch isn’t firing on your site, so the CSS never actually gets applied.

    The fix is to either clear your optimization/preload cache, or exclude the following stylesheet from your CSS optimization:

    /wp-content/plugins/mxchat-basic/css/chat-style.css

    If you’re using LiteSpeed at the server level, you may need to add that exclusion in your server config since the plugin already adds a data-no-optimize attribute but it’s being ignored.

    The CSS itself and all the selectors are working perfectly. Once the caching layer stops converting it to a preload, everything should display as expected.

    Hi @m4xw3ll,

    I was looking into the issue and found this in the page source:

    <link rel="preload" as="style" id="mxchat-chat-css-css" href="https://gravitywp.com/wp-content/plugins/mxchat-basic/includes/../css/chat-style.css?ver=3.1.8" media="all" onload="this.onload=null;this.rel='stylesheet' data-no-optimize='1'">

    It looks like the plugin modifies its CSS tag (to add data-no-optimize), and something else on the site is also converting it to a preload. Those two conflict and end up breaking the tag, so the CSS never actually loads.

    As a temporary fix, I added a small MU plugin that removes all modifications to <link> tag with id “mxchat-chat-css-css”, which resolved the issue.

    You might want to reconsider forcing data-no-optimize='1', as it seems to interfere with other optimizations.

    Plugin Support m4xw3ll

    (@m4xw3ll)

    Hi @sylveex it does appear that even when trying to prevent caching plugins from causing issues they still cause issues… I did remove this in the most recent update today.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.