URL of H5P libraries on multi-lingual Drupal site

When I try to create interactive content in Drupal 7, I keep getting the message 'unable to load libraries' - even though all the latest libraries are installed. This seems to be because the h5p editor is trying to get the library info from  en/h5peditor/libraries but of course  the editor is using the urls h5peditor/libraries  (no en) . 

The /en/ part of the url is the English version of our site. For other langauges this changes (e.g. /fr/ for french). I only need to create content in English.

Is there a way to configure the h5p editor so that it uses the url with our language extension? In other words, so that the library info is at en/h5peditor/libraries

Or do  you have any other advice on how to get around this?

falcon's picture

This works fine already on my site. What version of the H5P module are you using?

When I'm on for instance 

http://127.0.0.1/seven/nb/node/133/edit (Node edit page in Norwegian Bokmål)

This is the url that is being used to fetch libraries:

http://127.0.0.1/seven/nb/h5peditor/libraries (still nb - Norwegian Bokmål)

I'm using the URL detection method in "admin/config/regional/language/configure". Do you have any i18n modules installed or some special configs or custom language modules?

 

Hi Falcon

Thank you very much fro your reply. We updated to the latest H5P module last week. We are using the i18n module, no custom langauge modules. For our language detection we have user preference as number 1, then URL is second  in priority.

I just tried changing that priority and flushing our caches, then tried creating interactive content again, but still had the same library loading problem.

Just looking at my actual library page (see attached screenshot) at https://www.dailystep.com/en/admin/content/h5p, I can see that not all the H5P content types seem to have full functionality. The do not all have a red 'delete' option and also not a 'restricted' option. Does this mean the library is not loaded properly?

Thanks in advance for your help,
Jane

Attachments: 
falcon's picture

I'm unable to reproduce this. I have all i18n modules enabled now, but everything still works fine on my site. If you send a username and password to a user that is allowed to create H5P content to our contact form we will try it out on your site and hopefully come up with a solution.

Hi Falcon,

Thank you for your reply. I was setting up the H5p content creator role for you and in the process I noticed that permission was not automatically given in Nodes for an administrator on our site to create interactive content. So I enabled this and now it works fine. Thanks so much for  your help and advice.

Jane :)

falcon's picture

Great, also, we just added a fix for this to the Drupal module. If you have access to create interactive content you'll also have access to the ajax paths.