Forums | Mahara Community

Support /
Iframe src attribute missing from external media


anonymous profile picture
Account deleted
Posts: 1

31 January 2013, 15:28

When I add a YouTube video (or a vimeo video...) into a Mahara pageĀ  (External Content -> External Media), the src attribute of the iframe is filtered out (i.e., it does not appear in the HTML code when I click View Source in my browser), despite being allowed in the iframe embed settings.

I believe the problem is occurring in the processing that takes place on line 149 of blocktype/externalvideo/lib.php

return $smarty->fetch('blocktype:externalvideo:content.tpl');

whereas if I replace it with

return $configdata['html'];

then the iframe appears with its src attribute intact (but without the extra tags in content.tpl)

This probably wasn't the greatest idea, but for the purposes of quickly seeing if there might've been a regression, I copied Mahara 1.5.7's externalvideo folder into 1.6.2's blocktype folder and the videos appeared with the src attribute intact.

So, I was wondering if anyone else had the same problem?

16 February 2013, 4:05

Dear all,

I also have a problem with TWO version of Mahara I have upgraded from 1.5.x to 1.6.3. From now, all the external blocks have no contents. RSS feeds and GoogleDocs are working properly but the External Media block.

When I add a YouTube video on the page, the block remains blank.

With a SlideShare resource, the display is a bit different. No media is display either but at the bottom the links with the name of the presentation and the author are here and functional.

The Apache log returns no error!

Bug?

Cheers,

-dajan

Kristina Hoeppner's profile picture
Posts: 4731

18 February 2013, 8:27

Hello Ivan and dajan,

I could not fully reproduce your issues. On demo.mahara.org I can still see my YouTube and also SlideShare embeds as well as my full RSS feed. The latter is missing though on a different installation, but my Flickr feed is there without problem.

dajan: Can you please check which SlideShare embed code you used? Is it the new iFrame one or the old embed code?

Cheers

Kristina

Kristina Hoeppner's profile picture
Posts: 4731

19 February 2013, 7:52

Hi Ivan and dajan,

I had another look at a couple of 1.6.3 installs (demo.mahara.org among them), and all my feeds are displayed correctly.

Can you please post the feeds that don't work for you?

Cheers

Kristina

22 February 2013, 21:03

Hi Kristina,

I have installed a new version of Mahara 1.6 and it is working fine. I don't know why it has suddenly started to go wrong with my two others Mahara I have upgraded.

Here is the page on which the external medias don't display. (http://portfolio.gymnyon.vd.ch/view/view.php?id=126)

Nothing in the log showing any error.

I think I will have to proceed to an re-installation on my two servers if I am not able to find another solution.

Ideas and help before I proceed to this, it very welcomed.

Cheers,

-dajan

Kristina Hoeppner's profile picture
Posts: 4731

03 March 2013, 11:25

Hi dajan,

As discussed, here your comments from our email conversation to take the discussion further.

----------

Dear Kristina,

Here is where I am with the remaining display problem with the external media block. If have installed a new 1.6 version of the files and have therefore seen all my third party plugins disabled.

I took the files from the git. I have then used these files with my old data folder and database. Result --> the problem remains If I install a complete new version of Mahara (new files, new database, new data folder) the external block is working fine.

The problem started when I have upgraded my 1.5 to 1.6. If I install a totally new version (database and data folder included) I will loose all the work my students already have done. This is then not a solution. Moreover I think I can't export and re-import their portfolio because they SSO from Moodle.

[server details deleted]

Cheers, -dajan

-----------------

Hi dajan,

Aaron has a few thoughts for you:

When I compare the externalvideo block type in 1.5 and 1.6, I don't see any code there to change the underlying database structures or data. So my thoughts are:

1. Did your Mahara start out with an earlier version than 1.5, and has been through multiple upgrades? Perhaps the problem is due to pre-1.5 database issues.

2. Can you replicate the error if he does a clean install of 1.5 and then upgrades it to 1.6?

Cheers Kristina
----------------

Hello

The two Mahara with the external block issue were upgraded successively from version 1.4 to 1.5 and then 1.6. One of the two started moreover from 1.3
----------------

Hello dajan,

The dev opinion:

Yeah, the more versions you upgrade through, the more likely that irregularities will accumulate in your database. Perhaps ones that were tolerated by earlier versions of the code, but not by later ones.

I suppose it might also be worth doing a database schema diff between his database and a clean 1.6 install.

---

Cheers Kristina
-----------------

Hello

1/ How do I do a database diff?

2/ if I have to start from scratch with a new installation how can I transfer my users' work in a SSO environment?

dajan

21 March 2013, 7:25

Dear all,

Dear Kristina,

I made a database diff and found many differences. Now after a sync of the database scheme, the external media are displayed correctly.

Here is how I proceeded:

1) I have downloaded a trial version of Navicat for MySQL

2) In Toos->Structure Synchronisation I made a diff between my actual Mahara database and a new 1.6 Mahara I had just installed

3) Navicat found about 40 differences and has created a script to synch my old scheme with the new

4) I made a complete backup of all my system (we neve know)

5) I ran the Queries that modified the old Mahara with the right scheme

6) Testing my old Mahara, the external media block re-works as before.

Thank you for your help and support.

For me, this thread is closed.

Regards,

-dajan

Aaron Wells's profile picture
Posts: 896

21 March 2013, 10:16

Thanks for the info, dajan! Kristina forwarded me your email with the diff logs. I think I'll file a bug for this. It does seem to be a pretty common problem for people upgrading through multiple versions, and with enough testing we could probably eliminate it.

Cheers,
Aaron

PS: I like that we both have profile pics of us holding our chin Wink

2 posts by Account deleted were deleted

19 results