Debian Bug report logs - #591799
wordpress: jQuery conflicts with prototype: jQuery.noConflict(); missing

version graph

Package: wordpress; Maintainer for wordpress is Craig Small <csmall@debian.org>; Source for wordpress is src:wordpress.

Reported by: Julien Viard de Galbert <julien@vdg.blogsite.org>

Date: Thu, 5 Aug 2010 16:30:01 UTC

Severity: normal

Found in version wordpress/3.0.1-1

Fixed in version 3.3.2+dfsg-1

Done: Raphael Hertzog <hertzog@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Giuseppe Iuculano <iuculano@debian.org>:
Bug#591799; Package wordpress. (Thu, 05 Aug 2010 16:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Viard de Galbert <julien@vdg.blogsite.org>:
New Bug report received and forwarded. Copy sent to Giuseppe Iuculano <iuculano@debian.org>. (Thu, 05 Aug 2010 16:30:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Julien Viard de Galbert <julien@vdg.blogsite.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: wordpress: jQuery conflicts with prototype: jQuery.noConflict(); missing
Date: Thu, 05 Aug 2010 18:28:38 +0200
Package: wordpress
Version: 3.0.1-1
Severity: normal


Some wordpress plugin will make wordpress admin use both prototype and 
jQuery, in that case the official wordpress archive was working while 
debian package did not.

With debian configuration I did got the following javascript error:
	element.dispatchEvent is not a function
This is due to jQuery messing'up with prototype. They both define $().

I found out that wordpress' version of jquery.js has "jQuery.noConflict();"
appended to the end of the file. While debian use the regular jquery.js.
(by the way the package could link to jquery.min.js)

I've seen the problem only on the admin section, so I tryed to fix it
here by adding the required configuration when jQuery is loaded.
All the javascript is loaded at once by wordpress/wp-admin/load-scripts.php
So I propose this patch:

--- a/load-scripts.php	2010-05-04 19:08:28.000000000 +0200
+++ b/load-scripts.php	2010-08-05 17:43:53.000000000 +0200
@@ -121,6 +121,8 @@
 
 	$path = ABSPATH . $wp_scripts->registered[$handle]->src;
 	$out .= get_file($path) . "\n";
+	if ($handle=='jquery')
+		$out .= 'jQuery.noConflict();'."\n";
 }
 
 header('Content-Type: application/x-javascript; charset=UTF-8');


-- System Information:
Debian Release: 5.0.5
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-486
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages wordpress depends on:
ii  apache2            2.2.9-10+lenny8       Apache HTTP Server metapackage
ii  apache2-mpm-prefor 2.2.9-10+lenny8       Apache HTTP Server - traditional n
ii  libapache2-mod-php 5.2.6.dfsg.1-1+lenny8 server-side, HTML-embedded scripti
ii  libjs-cropper      1.2.0-1               JavaScript image cropper UI
ii  libjs-jquery       1.4.2-2               JavaScript library for dynamic web
ii  libjs-prototype    1.6.1-1               JavaScript Framework for dynamic w
ii  libjs-scriptaculou 1.8.1-5               JavaScript library for dynamic web
ii  libphp-phpmailer   1.73-6                full featured email transfer class
ii  libphp-snoopy      1.2.4-1               Snoopy is a PHP class that simulat
ii  mysql-client-5.0 [ 5.0.51a-24+lenny4     MySQL database client binaries
ii  php-gettext        1.0.7-6               read gettext MO files directly, wi
ii  php5               5.2.6.dfsg.1-1+lenny8 server-side, HTML-embedded scripti
ii  php5-gd            5.2.6.dfsg.1-1+lenny8 GD module for php5
ii  php5-mysql         5.2.6.dfsg.1-1+lenny8 MySQL module for php5
ii  tinymce            3.3.8-1               platform independent web based Jav

Versions of packages wordpress recommends:
ii  wordpress-l10n                3.0.1-1    weblog manager - language files

Versions of packages wordpress suggests:
ii  mysql-server           5.0.51a-24+lenny4 MySQL database server (metapackage
ii  mysql-server-5.0 [mysq 5.0.51a-24+lenny4 MySQL database server binaries

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Giuseppe Iuculano <iuculano@debian.org>:
Bug#591799; Package wordpress. (Tue, 02 Nov 2010 21:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Viard de Galbert <julien@vdg.blogsite.org>:
Extra info received and forwarded to list. Copy sent to Giuseppe Iuculano <iuculano@debian.org>. (Tue, 02 Nov 2010 21:48:03 GMT) Full text and rfc822 format available.

Message #10 received at 591799@bugs.debian.org (full text, mbox):

From: Julien Viard de Galbert <julien@vdg.blogsite.org>
To: 591799@bugs.debian.org
Subject: Re: Bug#591799: wordpress: jQuery conflicts with prototype: jQuery.noConflict(); missing
Date: Tue, 2 Nov 2010 22:45:52 +0100
[Message part 1 (text/plain, inline)]
Additionally to the previous patch that only handles the admin pages,
the attached one should be applied for the site pages to be fixed also.
In case both prototype and jQuery are enabled...
-- 
Julien Viard de Galbert                        <julien@vdg.blogsite.org>
http://silicone.homelinux.org/           <julien@silicone.homelinux.org>
[wp-scripts_jqcompat.patch (text/x-diff, attachment)]

Reply sent to Raphael Hertzog <hertzog@debian.org>:
You have taken responsibility. (Fri, 15 Jun 2012 12:51:06 GMT) Full text and rfc822 format available.

Notification sent to Julien Viard de Galbert <julien@vdg.blogsite.org>:
Bug acknowledged by developer. (Fri, 15 Jun 2012 12:51:08 GMT) Full text and rfc822 format available.

Message #15 received at 591799-done@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: Julien Viard de Galbert <julien@vdg.blogsite.org>, 591799-done@bugs.debian.org
Subject: Re: Bug#591799: wordpress: jQuery conflicts with prototype: jQuery.noConflict(); missing
Date: Fri, 15 Jun 2012 14:48:13 +0200
Version: 3.3.2+dfsg-1

On Thu, 05 Aug 2010, Julien Viard de Galbert wrote:
> Some wordpress plugin will make wordpress admin use both prototype and 
> jQuery, in that case the official wordpress archive was working while 
> debian package did not.

The recent versions of the package no longer replace the upstream
jquery.js unless they are exactly identical. So this problem is now gone.

I suggested upstream to move this call to .noConflict somewhere else
(per your suggestion) in http://core.trac.wordpress.org/ticket/16494

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Get the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 14 Jul 2012 07:34:06 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 13:23:50 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.