-
AuthorPosts
-
February 26th, 2021 at 09:25 #114522
When the Roseta/Codex theme is applied to a WordPress site that is using the wpForo forum plugin, most of the post moderation tools (such as like, approve, delete, etc.) are unusable, even as an admin. When the Roseta/Codex theme is deactivated, the wpForo plugin works again.
In the developer console, when loading the wpForo forum page with Roseta/Codex active, I get an error in a wpForo js file, namely an Uncaught ReferenceError that $wpf is not defined in /wp-content/plugins/wpforo/wpf-assets/ajax.js, ver=1.9.4 at line 3.
The code in question is
$wpf.ajaxSetup({ url: wpforo.ajax_url, data:{ referer: window.location.origin + window.location.pathname } });
ajaxSetup
refers to a function in/wp-includes/js/jquery/jquery.js
and/wp-includes/js/jquery/jquery.min.js
This error arises in a clean install of WordPress 5.6.2 with only Roseta/Codex, 2019, 2020 and 2021 themes and only wpForo, Hello Dolly and Akismet plugins installed, with only wpForo activated.
WordPress is running on a Linux/SUSE server with:
Apache 2.4.43
PHP 7.4.6
MySQL 5.5.5Let me know if there is any more information that is needed. Suggestions welcome.
Thanks
February 26th, 2021 at 17:27 #114533Problem solved.
The wpForo team pointed me to topics that discussed the <script> defer attribute. Examining my site’s page source revealed the presence of the defer attribute on wpForo scripts. Turning off the JS Defer option in the Miscellaneous section of the theme solved the problem.
March 1st, 2021 at 01:01 #114716ZedCryout Creations mastermindHi,
Deferring some scripts can speed up loading and improve score with site scrapers, but can cause issues with more complex scripts where execution order matters.
This is why we’re including the control option in the theme – which I’m glad you found and used to resolve the issue on the site.If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.March 1st, 2021 at 01:15 #114718@Zed, thanks for the reply.
If deferring javascript has the benefits you suggest, then a good feature request might be to implement a whitelist system where you could choose to not defer some problematic scripts when the JS Defer option is ON.
March 2nd, 2021 at 15:30 #114753ZedCryout Creations mastermindIf deferring needs to be handled on a per-script basis, there are plugins that provide that level of control.
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic. -
AuthorPosts
The topic ‘Roseta and Codex Incompatible with wpForo’ is closed to new replies.