Skip to content

Opening links in nodebb widget

Solved Configure
  • @phenomlab the convo we started on nodebb forum, I thought to continue it here.
    Still having the issue of links not loading often in widgets
    Have you been able to take a look?

  • A more efficient way of including this would be to not over complicate it and leverage a standard iframe (providing the CSP headers of the remote site permit this) like below

    <iframe src="https://www.classmarker.com/online-test/start/?quiz=gag66aea7922f0a5" width="700" height="800"></iframe>
    

    This works first time every time on your site as intended.

  • @Panda not yet, will do so later. For continuity, can you provide the code here that you want to use?

  • @phenomlab yes, its just a quiz.

    <script src="https://www.classmarker.com/public/js/embed-classmarker-1.0.0.js?quiz=gag66aea7922f0a5" data-quiz="gag66aea7922f0a5" data-width="700" data-height="800" ></script>
    

    The fact this is so problematic makes me wonder if something should be built into the widget code in nodebb to sort whatever the timing issue is, that causes loading to fail

  • @Panda I’ll test this and revert. Will get back to you later.

  • @Panda It’s not caused by NodeBB, but the way you are calling the URL - see the error message below reported in the console

    embed-classmarker-1.0.0.js?quiz=gag66aea7922f0a5:7  Uncaught TypeError: Failed to construct 'URL': Invalid URL
        at __createIframe (embed-classmarker-1.0.0.js?quiz=gag66aea7922f0a5:7:80)
        at load (embed-classmarker-1.0.0.js?quiz=gag66aea7922f0a5:3:100)
        at embed-classmarker-1.0.0.js?quiz=gag66aea7922f0a5:1:1
    
  • A more efficient way of including this would be to not over complicate it and leverage a standard iframe (providing the CSP headers of the remote site permit this) like below

    <iframe src="https://www.classmarker.com/online-test/start/?quiz=gag66aea7922f0a5" width="700" height="800"></iframe>
    

    This works first time every time on your site as intended.

  • phenomlabundefined phenomlab has marked this topic as solved

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

Related Topics
  • Test of youtube embeds

    Solved Configure
    5
    3 Votes
    5 Posts
    85 Views

    @Madchatthew no, you just need to be in NodeBB root

  • TNG + Nodebb

    General
    4
    0 Votes
    4 Posts
    95 Views

    @Madchatthew said in TNG + Nodebb:

    you have to try and use duck tape and super glue to change something to make it do what you want it to do

    I couldn’t have put that better myself.

  • Where are widgets stored?

    Solved Configure
    3
    1 Votes
    3 Posts
    203 Views

    @phenomlab Thanks, have DMed you

  • Smart Widgets

    Solved Configure
    9
    3 Votes
    9 Posts
    407 Views

    @Panda said in Smart Widgets:

    So why is that, or conversely why would the function to expose username ever be required, as it seems app.user is already an available global object?

    It is, yes, but not if you are using it outside of a widget. The function I wrote is also historical and comes from the 2.x train 🙂

  • Gettin Erors NodeBB

    Solved Configure
    7
    0 Votes
    7 Posts
    383 Views

    @phenomlab no forum is working goods.
    there is no eror message since yestarday.

  • MailGun Not Working NodeBB

    Solved Configure
    6
    1 Votes
    6 Posts
    433 Views

    @phenomlab did it 🙂 i did not create smtp user on mailgun. everything is working now.

    6cc6061f-ed5d-41f6-8eb7-5d98f98b3706-image.png

  • Configure SMTP for Nodebb

    Solved Configure
    14
    5 Votes
    14 Posts
    899 Views

    @marusaky based on the work completed thus far (in relation to PM exchanges), I’m going to mark this completed. Sending email from the server itself works fine without issue, and DNS appears to be clean (valid SPF, DMARC, and DKIM records).

    It appears that only Gmail marks incoming messages from your domain as spam - perhaps because of the domain age, which there is nothing we can do to prevent this. Mail delivery to all other domains appears to work fine in al of my tests.

  • background color of the footer area

    Solved Customisation
    7
    7 Votes
    7 Posts
    471 Views

    @phenomlab thank you very much 🙂