Problem/Motivation

Currently the ns.basePath has a trailing slash which is causing double slash on including assets like config.js, en.js files like http://d7/sites/all/modules/contrib/h5p/modules/h5peditor/h5peditor//ckeditor/config.js?t=F7J9. This causes issues when we have redirect module as they try to redirect to cleaned up/ correct URL.

Proposed resolution

Remove the trailing slash so that the asset get correct URL for the first time.

Remaining tasks

User interface changes


Original report

While editing the content type created using H5P module, some of the files are being loaded under non-secure protocol in https sites, which is causing the mixed . PFA screeenshot(issue)

Please follow these steps to replicate the issue:

  • Select the content type “Interactive content"
  • Type in the title of the page
  • Under “ Content type ” use one content type( For ex: Multiple Choice).
  • It then gives you a form to fill in with the questions and the answers but I am not able to type in to the text fields.

By this way, you can able to see the mixed content error in the console.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RajamSethuraj created an issue. See original summary.

icc’s picture

Hi,

Could you please open your browser's console(Ctrl+Shift+J in Chrome) and double check the values of the Drupal.settings.basePath variable?
I'm suspecting you base URL may contain the wrong protocol for some reason. If you haven't set this your self it may be a module doing it.

vijaycs85’s picture

Title: Mixed content issue while editing the content type using H5P module » Trailing slash on basePath causing issues.
Issue summary: View changes
Issue tags: -h5p
vijaycs85’s picture

Status: Active » Needs review
Issue tags: +Novice
FileSize
692 bytes

Here is the patch

sidharthap’s picture

Thank you #vijaycs85
#4 works for me.

imkartik’s picture

The patch looks good. Changing the status for this issue.

imkartik’s picture

Status: Needs review » Reviewed & tested by the community

The patch looks good. Changing the status for this issue.

icc’s picture

I've created an issue for adding the patch to the next version of the module: HFP-1524

vijaycs85’s picture

Thanks @icc!

rajeev_drupal’s picture

We have faced this issue on one of our production site, and this patch is working well for that issue.
Thanks @vijaycs85

RajamSethuraj’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the help. Issue was fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Noor Eldin Essam’s picture

FileSize
1.19 KB

Fix issue for js library url