Closed stpaultim closed 3 weeks ago
Yes, I wasn't able to get the sample nodes created during hook_install()
, hence the separate call required. (There is a user notice about that upon enabling.) If you know a better way to generate the content upon enablement, let me know!
I was able to create nodes with images during the hook_install process, but the images are stored with temporary names and are not managed in the files table - which is far from ideal.
https://github.com/backdrop-contrib/sample_animal_content/blob/1.x-1.x/sample_animal_content.install
I'm hoping to fix this with what I learned from you. I have an idea of what the problem might be and will let you know if I am able to both add the images during hook_install and have them managed by the file system properly.
Latest update to the 1.x-3.x branch now creates the sample content upon installation (and removes it at deinstallation).
@bugfolder - If I understood correctly, the 1.x-3.x branch should be ready for testing.
I tested it and enabled the demo module, but didn't get any sample content. I do see a bunch of sample views, but there is no content in them and it appears that no content was generated.
I'm not seeing any error messages in the log.
OK, wait a second. You seem to be working some node voodoo, or at least trying.
OK, I found the special "create nodes" tab and that seems to have generated the content. That was weird.
OK, nevermind. I'll leave this issue open overnight so you can see that I was puzzled, but figured it out. Would love to talk to you about this module soon.