+ Reply to Thread
Results 1 to 1 of 1
Like Tree3Likes
  • 3 Post By forbiddenlake

Thread: Magelo integration not working on the forums

  1. #1
    Ascendant forbiddenlake's Avatar
    Join Date
    Jun 2013
    Posts
    5,761

    Default Magelo integration not working on the forums

    Problem: Magelo integration doesn't work on these forums anymore (probably since 1 July 2017)
    Repro: (Edited) The forum has started adding a redirect to links?? Breaking my repro that works only on the FIRST page load.... Instead, repro is next:
    Expected: When a link to Magelo is put in, like Empower. and you hover over it, a popup with a lot of info, and not just the word "Loading", should pop up. Also the forum probably shouldn't modify the link to include a redirect. I did not see that at first
    Likely problem: You're including the JS file via http, and Magelo is expecting https

    Evidence:
    HTML from this page shows you guys are including over http, not https:


    Here are the network requests from the debugger - Magelo's sense of self comes out as undefined, and the last network request fails:


    Proof that Magelo's JS knows you're including it as http only, despite the 302 redirect to https:


    This is likely because Magelo's code is expecting only https (the "s" is not optional in the regular expression):
    Code:
    var re=/https:\/\/www\.([a-z]{0,5}magelo[cdn]{0,3}\.com)
    which causes _origin to not be defined which causes Magelo.origin and Magelo.domain to not be defined which ultimately causes the JS to try to load CSS from www.undefined.

    Resolution:
    There's a good argument that this is Magelo's problem, but there's another good argument that you can fix it, and improve on the situation too (securing the request), by switching your script tag include to https.
    Last edited by forbiddenlake; 04-29-2018 at 08:00 AM.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts