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

Jet Elements Dashboard Bug Causes Assets To Not Load - Fix Included #833

Closed
jasonhuntrods-toast opened this issue Jan 19, 2020 · 1 comment
Assignees
Labels

Comments

@jasonhuntrods-toast
Copy link

The Jet Elements Dashboard fails to instantiate on some hosts because the JS it depends on can't load.

This is similar to #831 but the bug is actually present in the plugin code - not a dependency.

In plugins/jet-elements/includes/module/loader.php - function include_modules()

This

$url = str_replace( '\\', '/', str_replace( untrailingslashit( ABSPATH ), esc_url( site_url() ), $dir ) );

should be changed to

$url = str_replace( '\\', '/', str_replace( plugin_dir_path( $dir ), plugin_dir_url( $dir ), $dir ) );

in order to ensure the JS loads properly.

Specifically this handles when WP is located in a subdirectory like "www" on some common WP hosts.

@kaskad88
Copy link
Collaborator

Hello. To solve this problem, try installing this plugin jet-fix-framework-url.zip. If the problem persists, please contact our support team at https://crocoblock.com/help-center/ for instructions on how to solve this problem (and mention that I was directed by you and refer to this problem).

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

No branches or pull requests

4 participants