Ticket #3025 (closed bug: invalid)
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: | ||
| Blocking: | Blocked by: |
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?
Change History
comment:1 Changed 5 years ago by flesler
- need changed from Review to Test Case
- Priority changed from major to minor
comment:2 Changed 5 years ago by markos
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?
comment:3 follow-up: ↓ 4 Changed 5 years ago by flesler
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>
comment:4 in reply to: ↑ 3 Changed 5 years ago by markos
Replying to 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 :)
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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.