[SOLVED] Issue with some plugins in ACP v0.5.2

Bug Reports
  • Hey @julian thanks for your quick reply. As it's happening with all the SSO plugins like the Facebook one you made, I thought you would maybe have got an idea 🙂

  • @julian I found the problem, it's not the ACP. The plugins I mentioned "Blog Comments, Facebook SSO, Twitter SSO, Steam SSO, Google SSO and Emailer Local" uses this in their admin template:

    require(['forum/admin/settings'], function(Settings) {
    

    I changed it to:

    require(['admin/settings'], function(Settings) {
    

    and now it's working fine, it retrieves the info from the db and the save buttons works.

  • @psychobunny was the base root for require.js changed to no longer point to the modules folder?

  • @Alex

    Glad I bumped into your post. Can you share where you are making this modification so that I can test it on my end? I'm hoping it will resolve the crashing issue with blog comments. I was reinstalling so many things thinking I misconfigured wordpress and nodebb somehow and kept trying to find where the admin error was coming from. It was really frustrating.

  • Hey @peter, unfortunately it didn't fix the crashing issue when publishing an article from wordpress to nodebb. Each time I press the button on wordpress it still crashes and get this in the console:

    Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (http.js:689:11)
    at ServerResponse.header (/home/www/nodebb/node_modules/express/lib/response.js:662:10)
    at ServerResponse.res.location (/home/www/nodebb/node_modules/express/lib/response.js:776:8)
    at ServerResponse.redirect (/home/www/nodebb/node_modules/express/lib/response.js:815:8)
    at /home/www/nodebb/node_modules/nodebb-plugin-blog-comments/library.js:166:10
    at /home/www/nodebb/src/topics/create.js:164:5
    at fn (/home/www/nodebb/node_modules/async/lib/async.js:641:34)
    at Object._onImmediate (/home/www/nodebb/node_modules/async/lib/async.js:557:34)
    at processImmediate [as _immediateCallback] (timers.js:345:15)
    info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    info: [app] Database connection closed.
    info: [app] Web server closed to connections.
    info: [app] Shutdown complete.
    [cluster] Child Process (14399) has exited (code: 1)
    [cluster] Spinning up another process...
    [cluster] Child Process (7088) listening for connections.
    [cluster] Child Process (7088) listening for connections.
    

    The post has been successfully published to nodebb though.

    For the modification I made in the plugin it's simply in "node_modules/nodebb-plugin-blog-comments/public/templates/comments/admin.tpl" line 29.

  • My youtube plugin no longer works in 0.5.2 either, seems something has been changed. No idea what mind. Pretty big gotcha. I'm almost being wedgied. 😆

  • Ah you too? I thought I was getting crazy, imgbed neither works for me. Well any plugin which parse content doesn't work for me excepted Markdown Parser 🙂

  • @Alex said:

    Ah you too? I thought I was getting crazy, imgbed neither works for me. Well any plugin which parse content doesn't work for me excepted Markdown Parser 🙂

    Yeah, imgbed broke too. 😢

  • @Alex said:

    Ah you too? I thought I was getting crazy, imgbed neither works for me. Well any plugin which parse content doesn't work for me excepted Markdown Parser 🙂

    That's really worrisome... let's see.

    Edit: @a_5mith @Alex How recent is this breakage?

    Edit 2: Damn, it's Markdown.

  • Upstream or regression?

  • @a_5mith Regression, fixing shortly 😄

  • @julian, fixed it yet? 😛

  • @Ted no, I had thanksgiving dinner and watched David Tennant's last episode of Doctor Who instead XD

  • @julian but that's the worst episode ever...
    Loved Matt Smith in the role, but he's not Tennant

  • Kind of difficult to fix, because of the change made to Markdown... if the new "noFollow" option is turned on (which it is, by default), a link as returned by markdown would look like this:

    <a rel="nofollow" href="//mysite.com">Site</a>

    instead of...

    <a href="//mysite.com">Site</a>

    ... which means all of the existing regex won't match any longer. Drat.


    Both the "workaround" and the "solution" involve one crappy step: All of the affected plugins need to rewrite their regex or refactor their entire plugin.

    The workaround:

    • All plugins need to rewrite their regex to accommodate the rel="nofollow" addition
    • If more changes get added to Markdown, all of the affected plugins will break again
    • = Bad solution

    The solution:

    See gh#2263

    ... and to round it out

    The cop-out

    • @julian just removes the rel="nofollow" from Markdown XD ... but that's a step back.

    Example 1:

    [ { type: 'blockquote_start' },
      { type: 'paragraph',
        text: 'i am using marked.' },
      { type: 'blockquote_end' },
      links: {} ]
    
  • It seems to be a bit laborious to fix it 🙂

  • @julian said:

    Kind of difficult to fix, because of the change made to Markdown...

    Ill go through my list of plugins and update as necessary.

  • EDIT: Right, for anyone that's facing this issue, rel="nofollow" needs to be placed BEFORE the href tag. Despite the source code displaying it afterwards...

    Untitled.png

  • @a_5mith Keep in mind you should wrap rel="nofollow" in (?: and )?, as it does not always appear (e.g. if the user has disabled the nofollow option)

  • @julian said:

    @a_5mith Keep in mind you should wrap rel="nofollow" in (?: and )?, as it does not always appear (e.g. if the user has disabled the nofollow option)

    I seeee. Thanks. 👍


Suggested Topics


  • 0 Votes
    8 Posts
    645 Views

    @julian Seems to do the trick. Thanks for the pointer.

    For others if you are passing multiple tags through curl here is a working example.

    curl --location --request PUT 'https://forum.com/api/v3/topics/14/tags' --header 'Authorization: Bearer ffee84f8-2afd-4ab5-91d6-b57afa12a2025' --data-urlencode 'tags[]=visit' --data-urlencode 'tags[]=cambodia' --data-urlencode '_uid=1'
  • 0 Votes
    1 Posts
    1k Views

    Hi,

    I am vision impaired and use a screen reader so maybe it is just an accessibility issue.

    I have just signed up for the hosted demo and looking into different solutions for a forum such as NodeBB, Muut, Vbulletin etc.

    I am trying to install a new plugin and get to the page where you can search for plugins under the admin menu.

    There is no labelled search button so I type in a search phrase such as "question answer" without the quotes as I want to check out the question and answer plugin. I then hit enter to presumably submit the search request.

    The page refreshes but no plugins are shown.

    Am I doing the search process incorrectly or is adding plugins banned in the demo perhaps,

    Thanks,
    Dale.

  • 1 Votes
    2 Posts
    2k Views

    I see he same issue as @Technowix was just going to report. Plugins that are upgradable for me seem to want to downgrade to previous version.

  • 0 Votes
    10 Posts
    4k Views

    @Tanner write API could help with that, but until then, here's the high-level implementation/workaround:

    FTPP (form-to-post plugin) establishes new POST route at /feedback When that route is called, take req.body.text (where text is the id in the corresponding form) and call Topic.post as a pre-registered user.

    That's pretty much it. There's more to expand on (such as spam prevention/throttling/auth/security), but yeah.

  • 10 Votes
    34 Posts
    14k Views

    The idea behind this is great but sadly for me it censors parts of words like these below.

    Screenshot_2021-05-10 Match Preview County v Dagenham amp; Redbridge(1).png

    Screenshot_2021-05-10 County Podcasts.png

    is there a fix for this?

    many thanks