Imported Bookmarks Missing

סיכום מבוסס בינה מלאכותית

The discussion revolves around imported bookmarks not appearing after an import from another board software. Ghan reports that while the import process completes without errors, no bookmarks are created in the database. pfaffman suggests checking the PostAction creation, and martin identifies that the base importer was missing the create_bookmarks function. He provides a workaround using the rake task bundle exec rake bookmarks:sync_to_table and later confirms that a PR has been merged to fix the issue martin. Ghan confirms that the fix resolves the problem and bookmarks are now importing correctly.

I’m working on an import test from another board software, and I’m running into an issue with trying to import bookmarks. The base importer has the create_bookmarks function, and I’m passing in user_id and post_id values. The script does not throw any errors, and it shows the normal progress output:

25 / 25 (100.0%)

However, no bookmarks are created. The bookmarks table is empty (checking via the data explorer). Any ideas on why this would not be working as expected?

You could add a puts after it calls the PostActionCreator and see if it’s creating anything.

Ah, I may have missed the importers. I will take a look first thing today (I start in about an hour). There is a rake task you can run to sync bookmarks from post actions into the new table in the meantime.

bundle exec rake bookmarks:sync_to_table

This is a non destructive action and can be run as many times as you want.

Hmm. I looked in the post_actions table and it is empty as well. Is the import code using an outdated process here? I was considering just doing a direct insert query into the database but I’ll see if I can dig a bit deeper here as well.

I was quite surprised to see that there was support in the importers!

I checked, and I did miss create_bookmarks in the base import script. I will get a PR up for that today so it creates bookmarks in the new table. It is very odd that it’s not making PostAction bookmarks for you though.

@Ghan I merged a PR FIX: Change base importer to create new Bookmark records by martin-brennan · Pull Request #9603 · discourse/discourse · GitHub that now creates the new bookmarks. Please give it a go and let me know whether it works for you!

I updated earlier today and bookmarks are now importing! Thank you for the quick fix!