• NodeBB

  • GNU/Linux Admin

    gh@7e7366be1303c617a4c28a303b58cd8537e1d257 introduces a breaking change in themes, whereby toolsVisible is no longer used in post-menu-list.tpl

  • NodeBB

    /api/me renamed to /api/self this route returns the data for the logged in user. https://github.com/NodeBB/NodeBB/issues/8656

    /me redirects user to their profile page.

  • NodeBB

    utils.slugify deprecated in 1.15.0, will be removed in 1.16.0. Use the slugify module that will be available in 1.15.0.

    Client side

    require(['slugify'], function (slugify) {
       console.log(slugify('string to slugify'));
    });
    

    Server side

    const slugify = require.main.require('./src/slugify');
    console.log(slugify('string to slugify'));
    
  • GNU/Linux Admin

    The Write API plugin has been merged into core NodeBB and given the prefix /v3. The pre-existing write-api plugin should still work with NodeBB v1.15.x (and /v2 will be entering maintenance), but development will continue on /v3

    Breaking and Non-Breaking changes

    • Not Breaking POST /api/v1/users | admin.user.createUser
      • The POST route will now return a complete user object (a call to User.getUserData is made with the new uid)
    • Not Breaking PUT /api/v1/users/:uid | SocketUser.changeUsernameEmail | SocketUser.updateProfile
      • The PUT route will now return a complete user object (like above)
    • Breaking DELETE /api/v1/users | DELETE /api/v1/users/:uid | admin.user.deleteUserAndContent
      • The new DELETE route will now not return anything in response
    • Breaking PUT /api/v1/categories/:cid | admin.categories.update
      • The new PUT route will return the updated category object, instead of simply the cid that was updated
    • Breaking POST /api/v1/groups | admin.groups.create
      • The POST route will now return a complete group object (a call to Groups.getGroupData is made with the new group name)
      • ownerUid, previously returned, will now no longer be present in the response
    • Breaking PUT/DELETE /api/v1/groups/:slug/membership
      • Updated to be PUT/DELETE /api/v1/groups/:slug/membership/:uid, to better conform with RESTful API design (it takes uid as a route param now)
      • Admin-only Write API routes for group addition/removal have been merged into this one route
    • Not Breaking POST /api/v1/topics/:tid | posts.reply
      • The POST route will now return a complete post summary object instead of a smaller subset as before
    • Not Breaking PUT /api/v1/posts/:pid
      • The PUT route will now return a complete post summary object instead of a smaller subset as before
    • Breaking api/v1/categories/:cid/privileges route has been removed in favour of api/v3/users/:uid/privileges and api/v3/groups/:name/privileges
    • Breaking api/v1/categories/:cid/state removed as category disabled state is slated for removal in a future version of NodeBB
    • Breaking api/v2/util/maintenance is renamed api/v3/admin/settings and now allows modification of all ACP settings
    • Breaking api/v2/util/upload is renamed api/v3/files/upload

  • @baris said in 1.15.0 Breaking Changes:

    utils.slugify deprecated in 1.15.0, will be removed in 1.16.0. Use the slugify module that will be available in 1.15.0.

    Client side

    require(['slugify'], function (slugify) {
       console.log(slugify('string to slugify'));
    });
    

    Server side

    const slugify = require('slugify');
    console.log(slugify('string to slugify'));
    

    Hello @baris !

    I began to upgrade nodebb from 1.14 to 1.15 and, when I use these changes for slugify in my plugins, I get this error :

    2020-12-11T14:23:34.787Z [5678/37554] - error: Error: Cannot find module 'slugify'

    These changes for slugify are for nodebb 1.15 or nodebb 1.16 ? Or is it something else that I must do to make it works right ?

  • NodeBB

    Slugify module was added in 1.15.0, utils.slugify is being removed in 1.16.0. Check if you have slugify.js in public/src/modules and post how you are requiring the module.


  • @baris said in 1.15.0 Breaking Changes:

    Slugify module was added in 1.15.0, utils.slugify is being removed in 1.16.0. Check if you have slugify.js in public/src/modules and post how you are requiring the module.

    Hello @baris,

    I have slugify.js in public/src/modules .

    I require module in my library.js of my plugin like you said :

    const slugify = require('slugify');
    console.log(slugify('string to slugify'));
    

    and it gives :

    2020-12-12T11:40:23.482Z [5678/68409] - error: Error: Cannot find module 'slugify'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
        at Function.Module._load (internal/modules/cjs/loader.js:562:25)
        at Module.require (internal/modules/cjs/loader.js:692:17)
        at require (internal/modules/cjs/helpers.js:25:18)
    

    ...

  • NodeBB

    If you are using the core slugify module in plugins it is require.main.require('./src/slugify')


  • @baris Thanks, that was this ! This problem is solved now. 🙂

Suggested Topics

| |