• Resolved twwoodward

    (@twwoodward)


    We’re running WordPress Multisite v 4.9.8 and H5P v 1.10.3. This is happening on all the sites I’ve tested but I linked to one on Russian.

    The console is giving me an ‘Invalid überName’ error in addition to ‘Uncaught SyntaxError: Unexpected token u in JSON at position 0’ when attempting to use a newly installed content type.

    The library doesn’t seem to be connected to the content type browser for the individual site. I’ve tried manually updating these libraries but that doesn’t get recognized either.

    I think this all tied to the way the h5peditor.js file gets the library location but I’m not sure why/how it’s failing.

    We had to make line 65 in class-h5p-content-query.php more explicit to get the library content to show up.* It now reads . . .
    'u' => " LEFT JOIN rampageswp.wp_users u ON hc.user_id = u.ID",

    Maybe something similar is going on with line 64 in that file? I’m guessing there but maybe that’s a clue for someone who knows the plugin more deeply.

    Any tips or hints are appreciated.

    *I know this isn’t good practice and is actively a bad idea but it’s been the only way we can get it to work so far.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author icc0rz

    (@icc0rz)

    I’ve seen a similar issue previously and then the problem was another plugin printing characters before the actual response from the H5P plugin.

    If you haven’t already could you check what the actual response to the AJAX request is? You can do this by opening the Network tab in the browser’s console(Ctrl+Shift+J in Chrome). Filtering on XHR will make the request easier to see.
    Have a look at the first characters. They should only be ‘[{‘ or ‘{‘.

    Thread Starter twwoodward

    (@twwoodward)

    Thanks very much @icc0rz.

    The AJAX stuff seems to be clean.

    I turned on error logging in WP and am seeing

    WordPress database error Field 'tutorial_url' doesn't have a default value for query INSERT INTO ...

    I’m looking into whether strict mode in the db may be at least partially to blame.

    Thread Starter twwoodward

    (@twwoodward)

    Yeah, it was a result of strict mode on the database.

    Plugin Author icc0rz

    (@icc0rz)

    Ah, I see.
    Please let me know if there is something obvious you see that we can change to make it compatible.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Invalid überName’ is closed to new replies.