[Hummingbird] Hummingbird Asset Optimization Breaks Forums with jquery Error

Here's another fun one for you superheroes to help me figure out...thanks in advance for any help!

Activation of Hummingbird Asset Optimization breaks our SimplePress discussion forums with a jquery error. If activated, users cannot add a new topic or post any reply. Clicking the Add Topic or Reply buttons results in no action, when either should open the forum post editor (tinyMCE, via AJAX) allowing users to submit their post.

Simply turning on Asset Optimization causes the problem. I have not made any changes to the default optimization settings.

With Asset Optimization ON, the Web Console reports:

Source map error: request failed with status 404
Resource URL: https://tripawds.net/wp-includes/js/jquery/jquery.form.min.js?ver=4.2.1
Source Map URL: jquery.form.min.js.map

This (file jquery.form.min.js) IS found and can be loaded directly in the browser at the Resource URL indicated.

The "missing" file, appears nowhere in the Assets list on the Hummingbird Asset Optimization page.

When selecting the option to Host my files on the WPMU DEV CDN, this error changes to:

Source map error: request failed with status 403
Resource URL: https://hb.wpmucdn.com/tripawds.net/79ae5c77-2dfa-4f81-b600-453aa71779d6.js
Source Map URL: jquery.form.min.js.map

With WPMU Dev CDN turned on, the "missing" file, does appear in the Javascript section of the Assets list on the Hummingbird Asset Optimization page, and shows as already minimized. However, the error and resulting issue persist.

Turning OFF Hummingbird Asset Optimization returns normal functioning to the forum buttons. I have not investigated if any other issues result from turning on optimization, but this alone is a deal breaker. We are therefore unable to take advantage of any Hummingbird Asset Optimization.

I enabled the debug log under the Asset Optimization tab of the Network Admin Hummingbird settings, but the resulting log file only renders the site's 404 template. No log data is included in the file.

Other Hummingbird functions (Caching & GZIP) are configured and working well so far. I would like to improve the score further by activating Asset Optimization, but am unable to do so without breaking the primary feature of our main site. (FYI: I am working to resolve this issue on our test install, before enabling optimization on our live site.)

What other information can I provide, or what other troubleshooting steps can I take to get Hummingbird playing nice with our forums?

  • Dimitris

    Hello there jcnjr,

    hope you're doing good and thanks for reaching us! :slight_smile:

    I am working to resolve this issue on our test install, before enabling optimization on our live site.)

    What other information can I provide, or what other troubleshooting steps can I take to get Hummingbird playing nice with our forums?

    I'd be awesome to have some additional access credentials for this testing/staging environment, so I can have a better look and troubleshoot this. :slight_smile:
    As this is public forum, you must send us your details through our safe contact form https://premium.wpmudev.org/contact/#i-have-a-different-question
    using this template:

    Subject: "Attn: Dimitris"

    - WordPress admin (login url/username/password)
    - FTP credentials (host/username/password/path of site in question)
    - cPanel/Plesk credentials (host/username/password)
    - link back to this thread for reference
    - any other relevant urls

    Keep in mind the subject line as ensures that it gets assigned to me.
    Warm regards,
    Dimitris

  • Dimitris

    Hello there jcnjr

    I investigated this further and I can see that this is around a JS file from our older WordPress Chat plugin (which is now considered retired https://premium.wpmudev.org/retiring-our-legacy-plugins/).

    I'm attaching you the latest version of the plugin, as I didn't want to make any changes, while you possibly working on site. Attached version included some fixes that could resolve that. Could you please try to replace the /wp-content/plugins/wordpress-chat/ folder via FTP, activate HummingBird's Asset Optimization and let me know how that goes. :slight_smile:

    Thank you,
    Dimitris

  • jcnjr

    :-\ So...I was able to optimize various assets while testing our forums to ensure functionality, and all worked well on our test site - improving the HB score to 85.

    When I attempted to replicate the settings on our live site, the forums completely fell apart with stylesheets and scripts breaking the layout immediately, before I had any chance to edit any of the asset optimization settings.

    I did install the updated version of the Chat plugin beforehand, and did not receive the same error in the web console. I even deactivated WordPress Chat to confirm that plugin is not causing a conflict. All css and js files were found and apparently loaded on the page, with only one console notice, shown in the attached screenshot.

    Troubleshooting this on the live site will be much more challenging, since our forums are always very active. Support access has been granted at tripawds.com and admin credentials are available upon request.

    Any further suggestions are greatly appreciated.

    Thank you Dimitris !

  • Dimitris

    Hello jcnjr,

    hope you're doing good today! :slight_smile:

    When I attempted to replicate the settings on our live site, the forums completely fell apart with stylesheets and scripts breaking the layout immediately, before I had any chance to edit any of the asset optimization settings.

    This means most probably that staging wasn't an exact and complete copy of live installation. Apart from having the same set of plugins and themes, you should also have the exact same settings in them, as this may also affect the loading assets in frontend pages.
    Can you make sure that staging is a proper clone and perform your Asset Optimization once more?

    Troubleshooting this on the live site will be much more challenging, since our forums are always very active. Support access has been granted at tripawds.com and admin credentials are available upon request.

    I can see that Asset Optimization is deactivated in live site now, I'd rather avoid of making any setup there, as it will need some trial&testing, thus I'd make sure about staging site first, as mentioned above.

    Warm regards,
    Dimitris

  • jcnjr

    Thanks for the feedback. This is clearly going to take longer than expected.

    After carefully comparing and confirming the same plugins are active, and network activated, on both sites, I am still unable to replicate the issue on the test install.

    Can anyone recommend a quick way to duplicate our live site site on the other domain without copying all the users, sites, and posts? Our live site is too big to clone, and I inly need to ensure the main site is identical regarding the theme and plugins.

    Will Shipper do this when it ships?

  • Dimitris

    Hello there jcnjr

    As long as live site has specific settings in its plugins and themes, then the only safe way to do that is to migrate the database (copy it from live site to staging site DB).
    After doing so, you can perform a search & replace operation, in order to replace domain name of live site with the domain name of staging site.

    The following link explains this procedure in details:
    https://premium.wpmudev.org/blog/set-up-staging-site-cheap-shared-hosting/

    About files, you don't have to migrate them (download and upload via FTP), as long as you can install WP core and any other plugins/MU-plugins/themes/child-themes separately, prior to migrating the database.

    Of course Shipper will do that, migrating websites will be the only thing that it will do actually! :slight_smile: But again, this will include all files and all database tables.
    You can find latest beta here:
    https://premium.wpmudev.org/forums/topic/new-plugin-shipper-version-1-beta-4

    Our Snapshot plugin also provides Managed Backups, which can backup your whole multisite, and also includes a restoration script (after completing a Managed Backup, go to your Hub, open the Backup tab of this site, select the Managed Backup you created, select "restore" and then "My website is down" so you can get the standalone restoration script and zipped backup file).

    Warm regards,
    Dimitris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.