Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modules Not Loading #5

Open
RubenBroadnax opened this issue Jan 30, 2020 · 3 comments
Open

Modules Not Loading #5

RubenBroadnax opened this issue Jan 30, 2020 · 3 comments

Comments

@RubenBroadnax
Copy link

When creating course units the modules are not loading ... is there a fix for this issue?

@Mradmin-ops
Copy link

Mradmin-ops commented Jan 31, 2020

I have the Same question. In console I see: TypeError: this.$ is not a function which comes from coursepress-unitsbuilder.js:1459:11

Somewhere in this part:
fetchModules: function( unit_id, page ) {

It keeps loading the modules so saving or making changes to a course is impossible

units

driving me crazy as that never happened before! Tried de-activating all plugins, cache etc nothing works

@jojomccid
Copy link

Solution: Please don't update your WordPress version to the latest. The newest version does not recognize the $ even if you convert it with jQuery. You can downgrade your version to the older one, say 5.2.4 at least. You can install the WP Downgrade | Specific Core Version plugin and select a lower version. Make sure you have a backup of your site. Then re-install CoursePress Pro. It will surely work. The downside is that you cannot upgrade to the latest version.

@RedDragon2X5
Copy link

Hi @Mradmin-ops ,

I was researching the problem you mentioned and came across this possible solution on WordPress' support forum which is :

https://wordpress.org/support/topic/problem-with-loading-modules-in-coursepress-modules-not-loading-and-stuck/

I'm new to web dev, so I'm feeling my way through and have not tried the proposed solution.
I hope it helps.

Proposed solution by daniduarte:

I went to check what changed with that in the update of WordPress to 5.3 and I saw the reference to this error “Uncaught TypeError: $ is not a function” in this post here: https://wordpress.org/support/topic/read-this-first-wordpress-5-3-master-list/#post-12124062

I searched about it and managed to solve (for now) my problem by changing the following file:

wp-content/plugins/coursepress/2.0/asset/js/coursepress-unitsbuilder.js

  in the line 1459, i change $ for jQuery, getting like this:
  this.jQuery(‘.unit-save-button’).removeClass( ‘disabled’ );

Find:
this.$(‘.unit-save-button’).removeClass( ‘disabled’ );

Replace it with:
this.jQuery(‘.unit-save-button’).removeClass( ‘disabled’ );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants