Skip to main content

Bug Tracker

Side navigation

#3025 closed bug (invalid)

Opened June 11, 2008 01:56PM UTC

Closed December 19, 2008 03:51AM UTC

Livejournal's code is incompatible with jQuery

Reported by: markos Owned by:
Priority: minor Milestone: 1.3
Component: core Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:
Description

My company Zemanta builds blogging tool that inserts jQuery into a page. For reasons described in #262 we ended up renaming init and extend functions in jQuery and hence are using a modified lib.

This is obviously not ideal, especially because we would like to give our users eventually opportunity to build on top of our code.

Is there a way to avoid this problem or if it isn't, should we still name this lib jQuery and document prominently changes made or not?

Attachments (0)
Change History (5)

Changed June 11, 2008 10:10PM UTC by flesler comment:1

need: ReviewTest Case
priority: majorminor

Well.. we can't check this if we have no test case of the problem.

You need to show the changes introduced by your code, that break jQuery and a specific example where this happens.

If you're extending Object.prototype, I can tell you a priori that this will be rejected.

Please get back to us with some more detail.

Changed June 13, 2008 06:25AM UTC by markos comment:2

I am sorry I wasn't clear. We are not extending Object, Livejournal is doing that. What we do is injecting jQuery into Livejournal edit page, modified to cope with that crap.

Our modification is in principle quite simple. It's just a search and replace of init with zinit and extend with zextend on jQuery source.

I'm sorry if this is a stupid question, but what sort of test case do you need?

Changed June 13, 2008 09:37PM UTC by flesler comment:3

I understood, I meant LiveJournal.

The thing is, we need to know what does LiveJournal introduce to break jQuery.

If you only know of a "recipe" (renaming 2 methods) but don't know really what's the problem, there's nothing we can do.

What you need to do is figure out where're the collisions, and how to avoid them.

If it doesn't require many changes from our part, then it's doable.

We are not extending Object, Livejournal is doing that

If that's the reason, then it's a lost case. We don't cope with that as it's just a dreadful practice.

should we still name this lib jQuery

That you'll need to ask John Resig, the owner of jQuery <jeresig [at] gmail [dot] com>

Changed June 19, 2008 08:53PM UTC by markos comment:4

Replying to [comment:3 flesler]:

> We are not extending Object, Livejournal is doing that If that's the reason, then it's a lost case. We don't cope with that as it's just a dreadful practice.

OK. I know that's the case.

> should we still name this lib jQuery That you'll need to ask John Resig, the owner of jQuery <jeresig [at] gmail [dot] com>

I did when I met him in London and he said to open a ticket on jQuery. So here I am :)

Changed December 19, 2008 03:51AM UTC by dmethvin comment:5

resolution: → invalid
status: newclosed

As mentioned in #262, LiveJournal extends Object (I just checked and the old code is still there) so we might as well close this ticket as a lost cause.