• Resolved olsbradshaw

    (@olsbradshaw)


    I am having some issues with H5P when it comes to either creating new content or editing existing content in the WordPress backend. I can select different content types, but when I go to either edit or create a new instance, I get a loading screen which never completes. The console throws up several warnings and errors:

    Ajax Request Failed
    h5peditor.js?ver=1.13.1:236 Ajax request failed
    error	@	h5peditor.js?ver=1.13.1:236
    c	@	jquery.js?ver=1.13.1:2
    fireWith	@	jquery.js?ver=1.13.1:2
    k	@	jquery.js?ver=1.13.1:4
    r	@	jquery.js?ver=1.13.1:4
    h5peditor.js?ver=1.13.1:237 
    Object
    abort: ? (e)
    always: ? ()
    complete: ? ()
    done: ? ()
    error: ? ()
    fail: ? ()
    getAllResponseHeaders: ? ()
    getResponseHeader: ? (e)
    overrideMimeType: ? (e)
    pipe: ? ()
    progress: ? ()
    promise: ? (e)
    readyState: 4
    responseText: "https://rarebooks.ollybradshaw.com/wp-content/themes/unlocking-the-archive{"name":"H5P.ImageHotspots","version":{"major":"1","minor":"8"},"upgradesScript":"\/wp-content\/uploads\/h5p\/libraries\/H5P.ImageHotspots-1.8\/upgrades.js","semantics":[{"label":"Background image","importance":"high","name":"image","type":"image","description":"Image shown on background."},{"name":"backgroundImageAltText","type":"text","label":"Alternative text for background image","description":"If the browser can't load the image this text will be displayed instead. Also used by assistive technologies.","optional":true},{"name":"iconType","type":"select","label":"Hotspot Icon","options":[{"value":"icon","label":"Predefined icon"},{"value":"image","label":"Uploaded image"}],"default":"icon"},{"name":"icon","type":"select","label":"Predefined icon","importance":"medium","description":"Using a predefined icon for the hotspot.","widget":"showWhen","showWhen":{"rules":[{"field":"iconType","equals":["icon"]}]},"options":[{"value":"plus","label":"Plus"},{"value":"minus","label":"Minus"},{"value":"times","label":"Times"},{"value":"check","label":"Check"},{"value":"question","label":"Question"},{"value":"info","label":"Info"},{"value":"exclamation","label":"Exclamation"}],"default":"plus"},{"name":"iconImage","type":"image","label":"Uploaded image","optional":false,"description":"Use your own image for the hotspot icon.<br>75px by 75px is recommended for your image.","widget":"showWhen","showWhen":{"rules":[{"field":"iconType","equals":["image"]}]}},{"name":"color","type":"text","label":"Hotspot color","importance":"medium","description":"The color of the hotspots","optional":true,"default":"#981d99","widget":"showWhen","spectrum":{"showInput":true},"showWhen":{"widget":"colorSelector","rules":[{"field":"iconType","equals":["icon"]}]}},{"name":"hotspots","type":"list","entity":"hotspot","label":"Hotspots","importance":"high","min":1,"defaultNum":1,"field":{"name":"hotspot","type":"group","label":"Hotspot","importance":"high","fields":[{"name":"position","type":"group","widget":"imageCoordinateSelector","imageFieldPath":"..\/..\/image","label":"Hotspot position","importance":"high","description":"Click on the thumbnail image to place the hotspot","fields":[{"name":"x","type":"number"},{"name":"y","type":"number"},{"name":"legacyPositioning","type":"boolean"}]},{"name":"alwaysFullscreen","type":"boolean","label":"Cover entire background image","importance":"low","description":"When the user clicks the hotspot the popup will cover the entire background image"},{"name":"header","type":"text","label":"Header","importance":"low","description":"Optional header for the popup","optional":true},{"name":"content","type":"list","label":"Popup content","importance":"medium","field":{"name":"action","type":"library","label":"Content Item","options":["H5P.Text 1.1","H5P.Video 1.5","H5P.Image 1.1"]}}]}},{"name":"hotspotNumberLabel","type":"text","label":"Hotspot label for assistive technologies","default":"Hotspot #num","description":"Will help announce what hotspot element has been navigated to if there is no header specified for a hotspot. #num can be used to replace the hotspot number.","common":true},{"name":"closeButtonLabel","type":"text","label":"Close button label for assistive technologies","default":"Close","common":true}],"language":null,"defaultLanguage":null,"languages":["en","af","ar","bs","ca","cs","da","de","el","es","et","eu","fi","fr","he","hu","it","ja","ko","nb","nl","nn","pl","pt","pt-br","ro","ru","sr","sv","tr","uk","vi","zh-hans","zh-hant","zh-tw"],"javascript":["\/wp-content\/uploads\/h5p\/libraries\/H5PEditor.ColorSelector-1.2\/scripts\/spectrum.js?ver=1.2.4","\/wp-content\/uploads\/h5p\/libraries\/H5PEditor.ColorSelector-1.2\/scripts\/color-selector.js?ver=1.2.4","\/wp-content\/uploads\/h5p\/libraries\/H5PEditor.ImageCoordinateSelector-1.2\/scripts\/image-coordinate-selector.js?ver=1.2.0","\/wp-content\/uploads\/h5p\/libraries\/H5PEditor.ShowWhen-1.0\/h5p-show-when.js?ver=1.0.5"],"css":["\/wp-content\/uploads\/h5p\/libraries\/H5PEditor.ColorSelector-1.2\/styles\/spectrum.css?ver=1.2.4","\/wp-content\/uploads\/h5p\/libraries\/H5PEditor.ColorSelector-1.2\/styles\/color-selector.css?ver=1.2.4","\/wp-content\/uploads\/h5p\/libraries\/FontAwesome-4.5\/h5p-font-awesome.min.css?ver=4.5.4","\/wp-content\/uploads\/h5p\/libraries\/H5PEditor.ImageCoordinateSelector-1.2\/styles\/image-coordinate-selector.css?ver=1.2.0","\/wp-content\/uploads\/h5p\/libraries\/H5PEditor.ShowWhen-1.0\/h5p-show-when.css?ver=1.0.5","\/wp-content\/uploads\/h5p\/custom-hp5.css?ver=0.1"],"translations":{"H5PEditor.ImageCoordinateSelector":{"libraryStrings":{"resize":"Resize"}}}}"
    setRequestHeader: ? (e,t)
    state: ? ()
    status: 200
    statusCode: ? (e)
    statusText: "OK"
    success: ? ()
    then: ? ()
    __proto__: Object
    parsererror
    error	@	h5peditor.js?ver=1.13.1:238
    c	@	jquery.js?ver=1.13.1:2
    fireWith	@	jquery.js?ver=1.13.1:2
    k	@	jquery.js?ver=1.13.1:4
    r	@	jquery.js?ver=1.13.1:4
    SyntaxError: Unexpected token h in JSON at position 0
        at JSON.parse (<anonymous>)
        at parseJSON (VM1057 jquery.js:2)
        at Fn (VM1057 jquery.js:4)
        at k (VM1057 jquery.js:4)
        at XMLHttpRequest.r (VM1057 jquery.js:4)

    I don’t know if H5P have any services which are currently down, but this wasn’t happening before the weekend…I basically cannot edit or create any content using H5P.

    Any ideas guys? ??

    • This topic was modified 5 years, 8 months ago by olsbradshaw.
Viewing 1 replies (of 1 total)
  • Plugin Author icc0rz

    (@icc0rz)

    Did you install any new plugins or themes? It appears a URL is being prepended to the response of the AJAX requests: https://rarebooks.ollybradshaw.com/wp-content/themes/unlocking-the-archive
    This is most likely a plugin or theme not following the conventions/rules and responding to AJAX requests that were meant for other plugins – this can cause a lot of issues down the road so you should try to figure out where this is coming from. Try disabling any new plugins or themes you may have installed.

Viewing 1 replies (of 1 total)
  • The topic ‘Problems with H5P and AJAX failing in WordPress Backend.’ is closed to new replies.