Ready to give up on nodebb. nodebb-plugin-import phpbb


  • Not even a freelancer developer could figure out why this plugin is not working. Surely, someone here has some ideas, leads, something?

    I'm trying to convert a small phpbb board which has only 160 members and around 600 posts. The conversion cannot get past this point and I keep seeing nodebb restarting over and over. I cannot tell what it's doing so not quite sure what to do.

    ER_BAD_FIELD_ERROR: Unknown column 'phpbb_topics.topic_approved' in 'field list'

    I cannot find anything what so ever on what is causing this, how to fix it, what to do to get past it.

    It's odd because the plugin says to use nodebb version 1.12.2 which I am yet the first complaint is about this plugin.

    2021-06-29T16:21:42.098Z [4567/41732] - info: Initializing NodeBB v1.12.1

    2021-06-29T15:33:09.011Z [4567/41130] - error: ER_BAD_FIELD_ERROR: Unknown column 'phpbb_topics.topic_approved' in 'field list' {"code":"ER_BAD_FIELD_ERROR","errno":1054,"sqlState":"42S22","index":0}
    2021-06-29T15:33:09.011Z [4567/41130] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    2021-06-29T15:33:09.015Z [4567/41130] - info: [app] Web server closed to connections.
    2021-06-29T15:33:09.015Z [4567/41130] - info: [app] Live analytics saved.
    2021-06-29T15:33:09.023Z [4567/41130] - info: [app] Database connection closed.
    2021-06-29T15:33:09.023Z [4567/41130] - info: [app] Shutdown complete.
    2021-06-29T15:33:09.577Z [4567/41152] - info: Initializing NodeBB v1.12.1 https://domain.com
    2021-06-29T15:33:12.433Z [4567/41152] - info: [socket.io] Restricting access to origin: https://domain.com:*
    Tue, 29 Jun 2021 15:33:12 GMT hsts deprecated The "includeSubdomains" parameter is deprecated. Use "includeSubDomains" (with a capital D) instead. at node_modules/helmet/dist/index.js:52:34
    Tue, 29 Jun 2021 15:33:12 GMT hsts deprecated The "setIf" parameter is deprecated. Refer to the documentation to see how to set the header conditionally. at node_modules/helmet/dist/index.js:52:34
    
    2021-06-29T15:33:12.586Z [4567/41152] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it.
      * nodebb-plugin-import
    
    

    Eventually, this seems to happen.

    NodeBB Running (pid 39312)
            "./nodebb stop" to stop the NodeBB server
            "./nodebb log" to view server output
            "./nodebb restart" to restart NodeBB
    
    NodeBB]# events.js:174
          throw er; // Unhandled 'error' event
          ^
    
    Error [ERR_STREAM_WRITE_AFTER_END]: write after end
        at writeAfterEnd (_stream_writable.js:248:12)
        at LogStream.Writable.write (_stream_writable.js:296:5)
        at Socket.ondata (_stream_readable.js:710:20)
        at Socket.emit (events.js:198:13)
        at Socket.Readable.read (_stream_readable.js:505:10)
        at flow (_stream_readable.js:974:34)
        at resume_ (_stream_readable.js:955:3)
        at process._tickCallback (internal/process/next_tick.js:63:19)
    Emitted 'error' event at:
        at errorOrDestroy (internal/streams/destroy.js:107:12)
        at LogStream.onerror (_stream_readable.js:734:7)
        at LogStream.emit (events.js:203:15)
        at errorOrDestroy (internal/streams/destroy.js:107:12)
        at writeAfterEnd (_stream_writable.js:250:3)
        at LogStream.Writable.write (_stream_writable.js:296:5)
        [... lines matching original stack trace ...]
        at flow (_stream_readable.js:974:34)
    
    

    No idea how to start using nodebb since starting over is not an option.

  • Plugin & Theme Dev

    @nodeham said in Ready to give up on nodebb. nodebb-plugin-import phpbb:

    ER_BAD_FIELD_ERROR: Unknown column 'phpbb_topics.topic_approved' in 'field list'

    Hey, well, with no offense to that freelance developer πŸ˜„ but this error is clearly coming from the database, literally saying that a column does not exist.

    I am 100% sure that whatever PHPBB version you are using is way past what the exporter supports, which is 6-7 years old.

    Having said that, I am more than happy to help, basically what needs to be done is to upgrade the PHP exporter's support https://github.com/psychobunny/nodebb-plugin-import-phpbb which is possible, but we're going to need to look at the new database structure.

    @NodeHam are you willing to share a PHPBB database dump with us? privately of course, and if it has sensitive information, I recommend obfuscating them, maybe just usernames, emails, names, dob, whatever else.... If you can't share the actual data, maybe an empty database so structure only, that usually works 99% of the time, but we can't fully test it without some sample data.

  • Plugin & Theme Dev

    if you prefer going through the nodebb communication channel, just so you won't be sending your database to some stranger on the internet, feel free to email it to support@nodebb.org, link this thread, they will forward the content to me and connect us via email, we might have to get some back and forth communication done.


  • @nodeham as @bentael pointed out, this is the origin of the issue

    2021-06-29T15:33:09.011Z [4567/41130] - error: ER_BAD_FIELD_ERROR: Unknown column 'phpbb_topics.topic_approved' in 'field list' {"code":"ER_BAD_FIELD_ERROR","errno":1054,"sqlState":"42S22","index":0}
    

    That column doesn't exist, which is why the import fails. Any developer worth their salt should have spotted that a mile off.


  • @phenomlab I mean, I'm the Freelancer, While importing that DB I had to update for sure the exporter ...

    Exporting and importing done and it deleted BBCodes but sadly HTML tags remain which made trouble.


  • This is what I've learned. This plugin will need to be updated as it won't work with anything as of phpbb 3.2. The last version to use those columns was 3.1.12.

    Since I don't know how to modify the plugin, I guess I have wasted weeks of time trying to convert to nodebb. No idea where to go from here.

  • Plugin & Theme Dev

    @nodeham i can help out updating the php plugin, did you consider sending a db dump?

    or @Freelancer can, it's basically going to consist updating this file
    https://github.com/psychobunny/nodebb-plugin-import-phpbb/blob/master/index.js

    to match the new phpbb 3.2 schema, shouldn't be that bad to be honest.

  • Plugin & Theme Dev

    @freelancer said in Ready to give up on nodebb. nodebb-plugin-import phpbb:

    Exporting and importing done and it deleted BBCodes but sadly HTML tags remain which made trouble.

    which HTML tags exactly? can you share a sample post?

    if the bbcode tag is not supported, I usually them here
    https://github.com/akhoury/bbcode-to-markdown/blob/master/src/newBBCodeTags.js
    or here https://github.com/akhoury/bbcode-to-markdown/blob/master/src/newToMarkdownOptions.js if it's a weird HTML tag that's native.

    Assuming you've ran the Conversion process after you were done importing

  • Plugin & Theme Dev

    also, im confused, it seems as @Freelancer has made progress, but @NodeHam is not aware of that progress.


  • @bentael Sorry,

    I have done the conversion but still it has few dublicates and posts had HTML tag in which made trouble for @NodeHam .

    Yeah, I already edited that file and matched it. Conversion done and upgrading also done successfully. What remained was the HTML Tag inside posts and they were even in Description.

    Otherwise not sure what NodeHam trying to do. Maybe he wants to do the conversion again.


  • Yeah, HTML Tags seems also native to me as I couldn't even remove them. @NodeHam Looks like HTML tags are native and remained while converting.

  • Global Moderator Plugin & Theme Dev

    @freelancer PLEASE share a sample of the html tags that are left behind if you can, and share what settings you're using during import and conversion.


  • @pitaj The problem is that I prefer not to post the domain information publicly since I'm not the owner.

    Yes, since freelancer wasn't able to complete this, I've been trying to do it on my own since then otherwise, it is weeks of lost time with nothing to show and still no chance of using nodebb.


  • Ok, let's see if I can clear some things up :).

    I hired freelancer on freelancer to convert a small phpbb to nodebb. After spending a lot of time on it, we ended up with a nodebb that had all sorts of bb/html code stuck in all of the posts, even categories text.

    He spent much more time than expected on it so I didn't want to keep burdening him to keep working on it so figured I would try it for myself.

    I can clearly see that the db column names have changed which is the problem but trying a number of things have failed. About the only way I could continue would be if I knew how to mod the nodebb import plugin but that is beyond my knowledge so am stuck, hence, posting for ideas on how to proceed.

    Today, I also confirmed how far back the phpbb version I have is and it seems the nodebb import plugin works with the newer version.

    Therefore, one more option is to try upgrading phpbb it to the most current then trying the plugin. Everything is backed up so I have nothing to lose by trying this next.

    Why don't I try that first and if I cannot solve it, I'd love to take you up on your offer to help. That would be very appreciated.

  • Plugin & Theme Dev

    @nodeham sure, feel free to reach out.
    FWIW I wasn't trying to get a gig out of it, I am willing to do it pro bono.

    As far the bb/html tag, seriously, if you got that far, that's very easy to fix on my end.


  • @bentael I wasn't implying that, only appreciate it :).
    Happy to go into PM if you like and I can share what I have.


  • PLEASE share a sample of the html tags that are left behind if you can, and >share what settings you're using during import and conversion.

    I'm trying to reach bentael and take him up on his offer to help.

    With all of the plugins disabled, I do not see the html codes but the bb codes are still stuck inside of posts. For example, someone posted something in bold and it looks like this.

    [b](sleep 10;/usr/sbin/agentfilename)&[/b]

    Then all of the urls that were shared in posts are all broken as well.
    Again, from someone's post;

    [url=https://www.xxx.com/item/440602.html?spm=214.1612.4148356.4.61ee94fbI3aniy]EmbPC[/url]
    [url=https://www.xxx.com/item/4054.html?spm=a2g0o.product3e0e7c11t922z4&Card[/url]

    The above is exactly how the shared link looks.

    Then, if I enable all of the default plugins again;

    nodebb-plugin-composer-default
    nodebb-plugin-emoji
    nodebb-plugin-emoji-android
    nodebb-plugin-markdown
    nodebb-plugin-mentions
    nodebb-plugin-soundpack-default
    nodebb-rewards-essentials
    nodebb-theme-persona
    nodebb-widget-essentials

    then this adds html code to everything.

    For example, the little preview widgets on the side show...

    O 10 May 2021, 11:50
    <r>I was able to get the software working on the new PC and also got it to run

    O 24 Mar 2021, 17:15
    <r>Here is a short <URL url="https://youtu.be/wf4hDr9hnh"><s>[url="https://youtu.be

    The posts are then filled with both html and bb code, in this case, the snippet shows html and maybe bb where it's showing the url.

    O
    OutagesUser2021 10 May 2021, 11:50

    <r>blah blah blahI:<br/>
    <br/>
    blah blah blah: <URL url="https://www.xxx.org/software/">https://www.xxx.org/software/</URL><br/>
    blah blah blah<br/>
    <br/>

    I can disable the markdown plugin but then I lose many of the nice editing options such as bold, code, etc.

  • Plugin & Theme Dev

    for anyone else migrating from phpbb, my fork of the exporter https://github.com/akhoury/nodebb-plugin-import-phpbb has been updated to support phpbb 3.3 there is also a PR to merge it in @psychobunny 's repo https://github.com/psychobunny/nodebb-plugin-import-phpbb/pull/10

    Thanks @NodeHam for providing a database dump.

Suggested Topics

  • 23
  • 4
  • 9
  • 1
  • 5
| |