Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Re-use content on another platform #102

Open
rezeau opened this issue Jul 18, 2024 · 13 comments
Open

Cannot Re-use content on another platform #102

rezeau opened this issue Jul 18, 2024 · 13 comments

Comments

@rezeau
Copy link

rezeau commented Jul 18, 2024

the CLI interface offers to Reuse Content as Download etc but it does not work: when importing the saved content into another platform! I get error message "A valid content folder is missing".
Same problem if I use the CLI Export content command.

@otacke
Copy link
Contributor

otacke commented Jul 18, 2024

You may want to leave some more information. I can't reproduce/confirm this issue.

@otacke
Copy link
Contributor

otacke commented Jul 18, 2024

I'd just like to add a word of advice here. Be aware that the H5P CLI tool, when using the setup command, will use the sources of the master branches of the github repositories. That's usually not the release version, but a development version. If you use the H5P CLI tool blindly to build H5P files in order to install these on some other H5P integration, you risk installing untested buggy code on that platform and potentially even spread it if people download the respective content and upload it on their system. See also #55

So, if that applies to your case, please rather pack the libraries that you have been working on, and then install only those on the other platform, and then create demo content or whatever on that platform.

@rezeau
Copy link
Author

rezeau commented Jul 18, 2024

Thanks for the advice, @otacke ! I will be careful with contents created with the H5P CLI tool...

@rezeau
Copy link
Author

rezeau commented Jul 19, 2024

Here is more information as requested by @otacke
Scenario to test issue with a simple H5P content

  1. download True/False Question number 1 "Oslo is the capital of Norway" from https://h5p.org/true-false
  2. saved as true-false-question-34806.h5p
  3. in localhost CLI tool Import it, entitle it "Oslo true-false"
  4. View it and export it with Reuse button -> Download as an .h5p file
  5. Check that you've got the file Oslo-true-false.h5p in your Downloads folder on your computer
  6. Go to any one of these 3 platforms (local or online): Moodle, Drupal7 or WordPress
  7. and Download/Import the file Oslo-true-false.h5p
  8. Check that you get error message: A valid content folder is missing
  9. Open Lumi: Open Existing H5P -> Oslo-true-false.h5p
  10. Check that you can import it without errors
  11. In Lumi: Save As "Oslo-true-false-from-Lumi"
  12. Go back to any one of these 3 platforms (local or online): Moodle, Drupal7 or WordPress
  13. and Download/Import the file Oslo-true-false-from-Lumi.h5p
  14. Check that it is imported with no errors!

@otacke
Copy link
Contributor

otacke commented Jul 20, 2024

Still cannot reproduce this. Might be an issue with running adm-zip inside the H5P CLI tool on Windows (?) only.

@devland
Copy link
Collaborator

devland commented Aug 5, 2024

I cannot reproduce this either.
On Windows it is recommended that you run the h5p-cli commands inside git bash.

@rezeau
Copy link
Author

rezeau commented Nov 9, 2024

@devland and @otacke I am still experiencing this issue. When you say "cannot reproduce" do you mean you have actually tried my scenario on a Windows platform?
@devland Running the h5p-cli commands in git bash does not enter in consideration when Re-using the contents.
@otacke probably has the correct explanation, so, how about making adm-zip work on Windows?

@otacke
Copy link
Contributor

otacke commented Nov 9, 2024

@rezeau Nope. Did not try this on Windows. Otherwise I could have looked into the cause instead of speculating. You didn't mention Windows at all before, so I merely guessed because I know you that are bold enough to use it.

@rezeau
Copy link
Author

rezeau commented Nov 10, 2024

@otacke Yes, I am bold/foolish enough to stick to Windows.😵‍💫

In the h5p-cli tools the pack library command works OK. That command calls the adm-zip script, but only the first part of it.

The export content command (used by the Re-use link in the server interface) starts with exporting all the libraries needed by the particular content that is being exported, then it continues with the module.exports function.
As far as I can see the Windows bug lies somewhere in that function. It would be great if a fix could be found.

@otacke
Copy link
Contributor

otacke commented Nov 10, 2024

@rezeau I don't know how much impact creating issues on github has. From what I experience, currently what does not exist on H5P Group's JIRA instance, does not have a good chance to be tackled any time soon except for some lucky cases.

@rezeau
Copy link
Author

rezeau commented Nov 10, 2024

@otacke Done at https://h5ptechnology.atlassian.net/browse/HFP-4159
Probably not the best of bug reports but can't do better at the moment. And of course I don't expect any fix to happen any time soon.
"Blessed is he who expects nothing, for he shall never be disappointed" Alexander Pope.

@otacke
Copy link
Contributor

otacke commented Nov 10, 2024

@rezeau Sure, but expecting nothing sounds a lot like living half-asleep. I am not the maintainer anyway ;-)

@devland
Copy link
Collaborator

devland commented Dec 4, 2024

I managed to reproduce this issue on my windows vm.
It seems that the adm-zip npm module works inconsistently between OSs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants