Web remote does not work with newer versions of jQuery

Bug #1605009 reported by Gyuris Gellért
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenLP
Fix Released
Low
Raoul Snyman
2.4
Fix Released
Low
Raoul Snyman
Trunk
Won't Fix
Low
Raoul Snyman

Bug Description

1) Ubuntu 16.04 (64)
2) OpenLP 2.4 - openlp 2.4-1 package
3) Activate remote plugin. Open default URL from settings (x.x.x.x:4316) Screenshot attached.

Related branches

Revision history for this message
Gyuris Gellért (gellert-gyuris) wrote :
Revision history for this message
Tomas Groth (tomasgroth) wrote :

I can confirm this when running openlp as installed from ubuntus standard repos. When running from 2.4.x source code it works fine, so it looks like some of the remote-files was not bundled correctly for ubuntu.

Changed in openlp:
status: New → Confirmed
Revision history for this message
Gyuris Gellért (gellert-gyuris) wrote :

Hm, Is the "jquery.min.js" damaged in Ubuntu package? There are JS errors. See the differences in the attached screenshots.

Revision history for this message
Gyuris Gellért (gellert-gyuris) wrote :
Revision history for this message
Gyuris Gellért (gellert-gyuris) wrote :

Hm... jquery is a shared library:

/usr/share/openlp/openlp/plugins/remotes/html# ls -l
lrwxrwxrwx 1 root root 46 febr 15 19:06 images -> ../../../../../javascript/jquery-mobile/images
-rw-r--r-- 1 root root 8172 febr 13 15:42 index.html
lrwxrwxrwx 1 root root 42 febr 26 00:56 jquery.js -> ../../../../../javascript/jquery/jquery.js
lrwxrwxrwx 1 root root 46 febr 26 00:56 jquery.min.js -> ../../../../../javascript/jquery/jquery.min.js
lrwxrwxrwx 1 root root 57 febr 26 00:56 jquery.mobile.css -> ../../../../../javascript/jquery-mobile/jquery.mobile.css
lrwxrwxrwx 1 root root 56 febr 26 00:56 jquery.mobile.js -> ../../../../../javascript/jquery-mobile/jquery.mobile.js
lrwxrwxrwx 1 root root 61 febr 26 00:56 jquery.mobile.min.css -> ../../../../../javascript/jquery-mobile/jquery.mobile.min.css
lrwxrwxrwx 1 root root 60 febr 26 00:56 jquery.mobile.min.js -> ../../../../../javascript/jquery-mobile/jquery.mobile.min.js
-rw-r--r-- 1 root root 1680 febr 13 15:42 main.css
-rw-r--r-- 1 root root 1866 febr 13 15:42 main.html
-rw-r--r-- 1 root root 2096 febr 13 15:42 main.js
-rw-r--r-- 1 root root 1700 febr 13 15:42 openlp.css
-rw-r--r-- 1 root root 14039 febr 13 15:42 openlp.js
-rw-r--r-- 1 root root 1993 febr 13 15:42 stage.css
-rw-r--r-- 1 root root 2052 febr 13 15:42 stage.html
-rw-r--r-- 1 root root 6762 febr 13 15:42 stage.js

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Yes, this is correct. On Debian (which is where Ubuntu gets its package from) the packaging requires that the system jQuery be used instead of the one bundled with OpenLP.

Those symlinks look a little weird though.

Revision history for this message
Gyuris Gellért (gellert-gyuris) wrote :

I replaced the "jquery.min.js" symlink (/<email address hidden>) with file from OpenLP source (/openlp/trunk/openlp/plugins/remotes/html/jquery.min.js), and remote plugin works well :-).

I think, this jquery version (1.11.3+dfsg-4) in not inappropriate for OpenLP.

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Ah, so that's the actual problem. I'm renaming the bug report.

summary: - Remote ui is broken
+ Web remote does not work with newer versions of jQuery
Changed in openlp:
milestone: none → 2.4.3
Revision history for this message
Gyuris Gellért (gellert-gyuris) wrote :

Is this fixed in 2.4.3? It works for me.

Revision history for this message
Gyuris Gellért (gellert-gyuris) wrote :

After upgrading to Ubuntu 16.10 bug is still present (OpenLP 2.4.3 [2.4.3-1 or https://get.openlp.org/2.4.3/openlp_2.4.3-1_all.deb]).

Revision history for this message
Gyuris Gellért (gellert-gyuris) wrote :

I see that there are many deprecated jQuery features in /openlp/plugins/remotes/html/js/openlp.js.

What is your preferred way?
1. To bundle jQuery 1.7 jquery.min.js to Ubuntu package?
2. To update /openlp/plugins/remotes/html/js/openlp.js script changing deprecated jQuery features? Maybe I can work on it, if you prefer this way.

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

It is not fixed in 2.4.3. I have a fix on its way, please be patient.

Revision history for this message
Gyuris Gellért (gellert-gyuris) wrote :

OK. Thanks.

Revision history for this message
Tim Bentley (trb143) wrote :

Trunk is being redeveloped so this is not relevant.

Revision history for this message
Gyuris Gellért (gellert-gyuris) wrote :

@trb143, I tested https://get.openlp.org/2.4.4/openlp_2.4.4-1_all.deb but this bug is still present (Ubuntu 16.10).

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Unfortunately it seems that my bugfix didn't make it in, it got lost along the way.

Revision history for this message
Luis Cano (luis-a-cano) wrote :

Just wanted to report that this is still an issue on OpenLP 2.4.4 on both Windows and MacOS versions of the app. Apparently this has to do with the remote plugin using jQuery version 1.12.x which no longer contains methods lie $(...).live() which were deprecated on jQuery version 1.7.x.

Hopefully this gets fixed soon as the remote plugin is something that we use a lot.

Thanks

Revision history for this message
Luis Cano (luis-a-cano) wrote :

Here is a workaround for this issue for MacOS but the same can be done for the PCs (I just don't have the correct path at the time).

On MacOs go to the following directory:

/Applications/OpenLP.app/Contents/MacOS/plugins/remotes/html

in there replace the file jquery.js and jquery.min.js with the jQuery version 1.8.x (1.8.3 is what I tested it with); you can download it from here https://code.jquery.com/jquery/.

Make sure to rename the files match those names:
jquery-1.8.3.js -> jquery.js
jquery-1.8.3.min.js -> jquery.min.js

No need to restarting the app; things should just work.

Again, the same can be done in Windows/PC I just don't have the path of /plugins/remotes/html at the time of this posting. Hope this helps someone.

Revision history for this message
mahfiaz (mahfiaz) wrote :

It looks like 2.4.5 should have the fix and trunk does not need one according to trb (comment #14).

Changed in openlp:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.