[Bug 21476] New: Markup error prevents HTML5 media from playing in the OPAC
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Bug ID: 21476 Summary: Markup error prevents HTML5 media from playing in the OPAC Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: major Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org Depends on: 8377 Blocks: 20783 There is an extra set of quotes in the markup for HTML5 media embeds in the OPAC which prevents media from playing. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8377 [Bug 8377] Show HTML5 video/ audio for media files in OPAC and staff client https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20783 [Bug 20783] Cannot embed some YouTube videos due to 403 errors -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Markup error prevents HTML5 |Incorrect filter prevents |media from playing in the |HTML5 media from playing in |OPAC |the OPAC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 80932 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80932&action=edit Bug 21476: Incorrect filter prevents HTML5 media from playing in the OPAC This patch makes a correction to a template filter to prevent incorrectly-encoded HTML in media source links which were preventing media from embedding correctly in the OPAC. To test, apply the patch and enable the HTML5MediaEnabled and HTML5MediaYouTube system preferences. - Edit a record to include links to videos in 856$u. For example: - https://www.youtube.com/watch?v=grTwH6Evdfc - https://archive.org/download/POPEYEMeetsSindbadTheSailor1936/POPEYE%20meets%... View the record in the OPAC and confirm that the videos display in the "Play media" tab and that they play correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I did not check what was going on exactly but the code at the intranet is using the html filter. I think we should use the exact same code at the OPAC and the intranet sides. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |13618 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13618 [Bug 13618] Add additional template filter methods and a filter presence test to Koha -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 81013 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81013&action=edit Bug 21476: [alternate] Incorrect filter prevents HTML5 media from playing in the OPAC This patch makes a correction to a template filter to prevent incorrectly-encoded HTML in media source links which were preventing media from embedding correctly in the OPAC. To test, apply the patch and enable the HTML5MediaEnabled and HTML5MediaYouTube system preferences. - Edit a record to include links to videos in 856$u. For example: - https://www.youtube.com/watch?v=grTwH6Evdfc - https://archive.org/download/POPEYEMeetsSindbadTheSailor1936/POPEYE%20meets%... View the record in the OPAC and confirm that the videos display in the "Play media" tab and that they play correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_18_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexbuckley@catalyst.net.nz Attachment #81013|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 --- Comment #4 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 81047 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81047&action=edit Bug 21476: [alternate] Incorrect filter prevents HTML5 media from playing in the OPAC This patch makes a correction to a template filter to prevent incorrectly-encoded HTML in media source links which were preventing media from embedding correctly in the OPAC. To test, apply the patch and enable the HTML5MediaEnabled and HTML5MediaYouTube system preferences. - Edit a record to include links to videos in 856$u. For example: - https://www.youtube.com/watch?v=grTwH6Evdfc - https://archive.org/download/POPEYEMeetsSindbadTheSailor1936/POPEYE%20meets%... View the record in the OPAC and confirm that the videos display in the "Play media" tab and that they play correctly. Tested and works as described, also matches the intranet code. Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 --- Comment #5 from Alex Buckley <alexbuckley@catalyst.net.nz> --- I tested both patches and they both work nicely. But if we are aiming to make the OPAC code the same as the intranet code (as Jonathan recommended in comment #2) then the second patch does that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Devinim <kohadevinim@devinim.com.tr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kohadevinim@devinim.com.tr --- Comment #6 from Devinim <kohadevinim@devinim.com.tr> --- Tested and works as described. But, there is a MIMETYPE error when we try to apply that scenario. we may have two 856 fields . If the first field is url and second field is media it works without error. However, if the first field is media and second field isn't , it gives an error. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |katrin.fischer@bsz-bw.de --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- setting to failed qa to get the attention of the developer - see comment before this! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80932|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Devinim from comment #6)
Tested and works as described. But, there is a MIMETYPE error when we try to apply that scenario. we may have two 856 fields . If the first field is url and second field is media it works without error. However, if the first field is media and second field isn't , it gives an error.
I cannot recreate this error, can you supply a sample record, or the links used? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 --- Comment #9 from Devinim <kohadevinim@devinim.com.tr> --- (In reply to Nick Clemens from comment #8)
(In reply to Devinim from comment #6)
Tested and works as described. But, there is a MIMETYPE error when we try to apply that scenario. we may have two 856 fields . If the first field is url and second field is media it works without error. However, if the first field is media and second field isn't , it gives an error.
I cannot recreate this error, can you supply a sample record, or the links used?
You can look at the example by clicking on the link below. - http://staff-bug21476.sb1.sandboxes.bywatersolutions.com/cgi-bin/koha/catalo... username/password => koha/koha If you play the second media you will see MIMETYPE error. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 81713 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81713&action=edit Bug 21476: Fix YouTube propgation The loop to find all media has an $isyoutube variable. This was declared outside the loop and never reset. Once a YouTube video was encountered all subsequent videos were considered as YouTube. This patch reduces the scope of the variable and resets per loop. To test: 1 - Enable HTML5Media and HTML5MediaYouTube 2 - Add 856$u to record for a youtube vido and a pdf (sample record attached to bug) 3 - View the record, the Play media tab has two video boxes 4 - Play the second, it fails 5 - Apply patch 6 - View record, Play media should include only one video link -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 81714 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81714&action=edit Sample marc record -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81713|0 |1 is obsolete| | --- Comment #12 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 81721 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81721&action=edit Bug 21476: Fix YouTube propgation The loop to find all media has an $isyoutube variable. This was declared outside the loop and never reset. Once a YouTube video was encountered all subsequent videos were considered as YouTube. This patch reduces the scope of the variable and resets per loop. To test: 1 - Enable HTML5Media and HTML5MediaYouTube 2 - Add 856$u to record for a youtube vido and a pdf (sample record attached to bug) 3 - View the record, the Play media tab has two video boxes 4 - Play the second, it fails 5 - Apply patch 6 - View record, Play media should include only one video link Signed-off-by: Devinim <kohadevinim@devinim.com.tr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to ByWater Sandboxes from comment #12)
Created attachment 81721 [details] [review] Bug 21476: Fix YouTube propgation
At first glance I'd say this patch should be moved to its own bug report. It seems to be caused by bug 17231, which is in stables. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21742 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81721|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #13)
(In reply to ByWater Sandboxes from comment #12)
Created attachment 81721 [details] [review] [review] Bug 21476: Fix YouTube propgation
At first glance I'd say this patch should be moved to its own bug report. It seems to be caused by bug 17231, which is in stables.
Will be moved to bug 21742 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81047|0 |1 is obsolete| | --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 81780 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81780&action=edit Bug 21476: Fix HTML5 media from playing in the OPAC - incorrect filters This patch makes a correction to a template filter to prevent incorrectly-encoded HTML in media source links which were preventing media from embedding correctly in the OPAC. To test, apply the patch and enable the HTML5MediaEnabled and HTML5MediaYouTube system preferences. - Edit a record to include links to videos in 856$u. For example: - https://www.youtube.com/watch?v=grTwH6Evdfc - https://archive.org/download/POPEYEMeetsSindbadTheSailor1936/POPEYE%20meets%... View the record in the OPAC and confirm that the videos display in the "Play media" tab and that they play correctly. Tested and works as described, also matches the intranet code. Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Pushed to Master |Pushed to Stable --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.06. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #18 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21476 Bug 21476 depends on bug 13618, which changed state. Bug 13618 Summary: Add additional template filter methods and a filter presence test to Koha https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13618 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org