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

Compatibility with WP 5.5.x #119

Open
Trehu opened this issue Nov 20, 2020 · 5 comments
Open

Compatibility with WP 5.5.x #119

Trehu opened this issue Nov 20, 2020 · 5 comments

Comments

@Trehu
Copy link

Trehu commented Nov 20, 2020

Hi,

I encountered an issue, when trying to create new H5P content in WP-admin panel. Can this be compatibility issue with the latest WP version 5.5.3.

Console error that it spits out:

h5peditor-editor.js?ver=1.15.0:49 GET https://wp-content/plugins/h5p/h5p-editor-php-library/styles/css/application.css?ver=1.15.0 net::ERR_NAME_NOT_RESOLVED

@icc
Copy link
Member

icc commented Nov 20, 2020

It looks like WordPress is having trouble determining the URL of your site. This could be related to the setup.
Have you tried adding the following to your wp-config.php file?

define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );

@Trehu
Copy link
Author

Trehu commented Nov 20, 2020 via email

@jlariza
Copy link

jlariza commented Mar 24, 2021

@icc I am having the same issue but it is not wordpress related; I think it is produced by Jquery. The issue is that on this file
wp-content/plugins/h5p/h5p-editor-php-library/scripts/h5peditor-editor.js:44 both ns.assets.js and ns.assets.css links are being loaded with double slash // so JS assumes it is an absolute path, not a relative path.

I tried to find what is happening but got no luck. I implemented an ugly fix to make it work for now

    ns.assets.js = ns.assets.js.map(
      function(item){
        return item.replace("//", "/");
      }
    );
    ns.assets.css = ns.assets.css.map(
      function(item){
        return item.replace("//", "/");
      }
    );

Thank you

@icc
Copy link
Member

icc commented Apr 8, 2021

Thanks for sharing, I'll be on the lookout for this.

@otacke
Copy link
Contributor

otacke commented Apr 8, 2021

@icc Maybe something similar to h5p/h5p-editor-php-library#125

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