Comme prévu, cela n’est pas apparu dans l’interface graphique. Mais quelles sont les étapes minimales ? Dois-je ajouter des données à d’autres tables, ou y a-t-il un redémarrage à effectuer ?
Je m’attends à ce que quelqu’un dise que ce n’est pas la bonne façon de faire les choses, et je le comprends, mais pour moi, cela pourrait être nécessaire comme je l’expliquerai ci-dessous (certaines de mes hypothèses peuvent être incorrectes, mais voici ma compréhension) :
Tous les scripts d’importation qui importent depuis un autre forum basé sur une base de données supposent pouvoir se connecter à l’autre forum depuis l’instance Discourse. Mais pouvoir accéder à l’autre forum (jforum) depuis l’instance Discourse en production sera difficile, voire impossible. De même, tenter d’installer un environnement de développement Discourse où résiderait l’ancien forum (un serveur très ancien) n’est pas possible.
Je ne comprends pas Ruby on Rails, je ne peux donc pas modifier les scripts existants, mais je comprends SQL.
Je pourrais utiliser l’API (je n’ai que 5000 utilisateurs), mais je souhaite pouvoir utiliser un plugin ou une méthode qui conserve le hachage de mot de passe MD5 plutôt que de demander à tous les utilisateurs de réinitialiser leurs mots de passe. Je ne pense donc pas pouvoir le faire via l’API.
Il existe un script d’importation pour jforum, je peux donc l’utiliser pour examiner le SQL nécessaire afin d’extraire les données de jforum sans problème, puis les placer dans des fichiers CSV à charger dans la base de données.
Les importateurs par lot pourraient offrir un moyen d’ajouter du SQL dans Discourse, mais je peine à voir le SQL requis.
Il semble que l’ajout des utilisateurs soit l’élément clé ; ajouter ensuite les catégories, les sujets et les messages ne devrait pas être trop difficile.
The likelihood that you’ll end up with a corrupt database is pretty high. And then no one will be able to help you.
Dump your database and restore on your local Discourse server (or anywhere that it can connect to–I’ve done larger imports with a remote database over my home internet connection) and then run the existing script.
It’ll be much easier to use Ruby that you don’t understand than to understand it well enough to figure out how to write the SQL. I learned Ruby a long time after I wrote my first importer.
That is a bit condesensing !
If the bulk import script is running sql (as I think it is)then documenting the SQL required to create a user is really no more dangerous then trying to use a bulk import script. And since I currently have a vanilla discourse install it wouldn’t terribly matter it if got messed up.I expect I have many more years in development than yourself.
What I don’t have great experience is all the admin tasks, and my first attempt to install a local Discourse server just opened a can of worms, and if I cant connect to my JForum mysql server from my discourse server then I’m going to have to install mysql as well and transfer the database. The existing jforum script isn’t checked into the main source tree, and Im on a very old version of jforum so not expecting it to work.
Sometimes free advice from someone that’s worked with Discourse full time for over three years, has done scores of imports, and written several importers from scratch is worth what you pay for it.
Je l’ai installé, mais comment redémarre-t-on Discourse ?
Comment insérer le champ personnalisé ? Pouvez-vous fournir la requête SQL, ou cela peut-il être fait via l’API avec la partie "user_fields[1]": "string" ? Je suis actuellement capable de créer des utilisateurs de manière programmatique via l’API, mais j’ignore pour le moment ce champ.
Si vous avez installé le plugin, la valeur du mot de passe passée dans l’appel API de création d’utilisateur est-elle sans importance ?
no, it will prevail over the md5 digest in the custom field.
The answers to the other two questions can easily be found on this forum. If you want to save time we can do the import and/or hosting for you as a paid service.
I did search for both answers, was unable to find. In the first case it is confusing that some installs are done via editing the yaml file and then relaunching the docker , and some seem such as this are installed whilst in the docker container, its not cxlear what restart means in this case.
I cant really find any pure sql in this forum
Surprised there seems such a push to sale paid services for using this opensrc software , never like this when i ask questions on stackoverflow.
I love to think along, innovate and contribute. But I also need to make a living and that means that I need to draw a line somewhere, and I try to draw it where I get the idea that I’m doing work instead of innovating, contributing and thinking along.
Looking up the SQL query for a user custom field is work for me, and as you’re an experienced dev I estimate that you can figure it out as well
Okay I found it ./launcher restart app
but doesnt seem to be restarting, I can enter app and connect to db, but cant connect to website. May just rebuild and start again
So I ran ./launcher rebuild app and now it is back and working.
I thought this would recreate the database but it has not so I guess that is because the actual database is persisting outside of docker and rebuild just rebuilds the docker app. Also I see the dataexplorer plugin I added (by modifying the yaml file is still there). But is the passwordmigration plugin there or does it get wiped out by rebuild, there is certainly nothing in the plugs in section of the adminpage.
Right I tried installing passwordmigration and then ran restart again, and once again my site is down, it does seem like passwordmigration is breaking something ?
So rebuilt again, got it working (but now passwordmigration plugin missing). If I run ./launcher restart app without installing migrationpassword first it restarts okay, so does seem to be a particular problem with migrationpassword on my setup
Last time I tried, the passwordmigration plugin was incompatible with running an import, so you’ll want to install it after you do the import.
It could be that it’s breaking your rebuild, but that’d be fairly surprising, as Richard uses it in his hosting. I recommend that you install it in app.yml just as you did the data explorer after you’ve done your import.
rm -rf the postgres directories in /var/discourse/shared/standalone if you want to get a new database. Maybe have a look at Advanced Troubleshooting with Docker
Weird, dropped database and ran ./discourse-setup so had a brand new install, everything fine.
Installed migrationpassword with rake and restarted, again website fails with 502 !
DataExplorer plugin still existed, so removed that, rebuilt, ok, then reinstalled migrationpassword and fails with 502 again.
So confusing because clearly works for others but doesn’t work on my vanilla install.
Will try to install via editing the app.yml file next.
(Les achats de Noël ont pris le dessus), mais j’ai enfin essayé d’installer migratepassword en modifiant app.yml et en reconstruisant, et… ça a fonctionné !
Mais l’option bundle exec rake plugin:install repo=http://github.com/[Communiteq](https://www.communiteq.com) (anciennement DiscourseHosting)/discourse-migratepassword ne fonctionne pas sur mon installation vanilla. Il faudrait peut-être vérifier ou supprimer cela dans le README.md de GitHub - communiteq/discourse-migratepassword: Support migrated password hashes · GitHub