FriendsOfFlarum / merge-discussions

Merge two or more discussions into one
MIT License
10 stars 7 forks source link

beta14: Error 'The "children" attribute of attrs should never be used.' #17

Closed dartrax closed 4 years ago

dartrax commented 4 years ago

This occured after update to flarum beta 14. After enabling it, the discussion list does not finish loading (only header, footer, banner message, left category/tags column and refresh/mark read-buttons are displayed). Dev console says:

mount-redraw.js:15 Error: [e] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute
    at e.u.setAttrs (Component.ts:114)
    at e.u.oninit (Component.ts:57)
    at Function.a (render.js:30)
    at M (render.js:917)
    at render.js:153
    at render.js:160
    at l (render.js:66)
    at u (render.js:50)
    at render.js:134
    at l (render.js:63)

Empty boards/tags display correctly. I did not change any discussions, all discussions are in the same state as when it still worked with beta 13. It is not just one discussion that does not display, different boards with different discussions do both trigger this error.

karaok491 commented 4 years ago

Can you please confirm if you are using version 0.4.0 of this extension?

dartrax commented 4 years ago

Oh no, indeed that's 0.3.3 No clue why this does not update to 0.4.0... Thank you!

dartrax commented 4 years ago
C:\xampp\htdocs\flarum>composer why-not fof/merge-discussions 0.4.0
flarum/flarum  -  requires  fof/merge-discussions (^0.3.3)

I do not understand composer enough to tell why it "requires" version 0.3.3, but I solved this by

composer remove fof/merge-discussions 
composer require fof/merge-discussions
dsevillamartin commented 4 years ago

@dartrax The version constraint ^0.3.3 only matches 0.3.x, so 0.4.0 isn't included. You could've also updated with composer require fof/merge-discussions "*" or composer require fof/merge-discussions ^0.4.0.

dartrax commented 4 years ago

Thanks for the hint! The problem was that in my composer.json I had

"require": {
        ...
        "fof/merge-discussions": "^0.3.3",
        ...

So even if I explicitly added the version to the update command, it would not update, reporting a problem. I should have used composer require "fof/merge-discussions:*" when installing that extension first time to be able to update later. I have replaced all version constraints in composer.json with "*" by editing that file manually, so now it will update every extension to the newest version automatically.