Bug #26282

JQuery conflict in edit mode

Added by Robert Lemke about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Could have
Assignee:
Target version:
Start date:
2011-04-26
Due date:
% Done:

100%


Description

Because the conference site uses JQuery and Aloha does as well, we have a conflict in the Content View's iFrame because JQuery is loaded twice. The result is that you can't edit content, for example on the homepage.

We will have to solve this anyway, but how? What if the site uses a different JQuery version than Aloha? Then making sure that JQuery is loaded only once doesn't help alone.

History

#1 Updated by Karsten Dambekalns about 8 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns

#2 Updated by Karsten Dambekalns about 8 years ago

For the conference site the easiest solution probably is to move the jQuery includes into an hasRole viewhelper to include them only if no editor is logged in. That is of course also hackiest solution possible... :)

#3 Updated by Mr. Hudson about 8 years ago

Patch set 1 of change Ifc0351807adb505f6deec43cf0a72d7baac5d9a0 has been pushed to the review server.
It is available at http://review.typo3.org/1730

#4 Updated by Karsten Dambekalns about 8 years ago

  • Assignee changed from Karsten Dambekalns to Christian Müller

#5 Updated by Bastian Waidelich about 8 years ago

I quickly talked with Christopher about this:
The (easiest) way to go, is probably not to avoid loading the library twice but to make sure that both versions work together. This could be achieved by using jQuery in "noConflict" mode before using it for Aloha and "resetting" $ afterwards, so that the original scripts of the site work without adaption.
See http://web.enavu.com/daily-tip/using-multiple-versions-of-jquery-on-the-same-page/

#6 Updated by Sebastian Kurfuerst about 8 years ago

+1 from my side for jQuery noConflict mode. Do we need this in Aloha or can we do it ourselves?

If it is needed in Aloha, we can't do it right now as they are in a middle of a restructuring of the code... So we currently can NOT update the Aloha version.

Later, once their restructuring is done, I can work out the details with the Aloha people and commit the solution there.

Greets,
Sebastian

#7 Updated by Christian Müller about 8 years ago

  • Priority changed from Must have to Could have

I have looked into it and from a website implementors perspective we should have Aloha use the noConflict mode. As I guessed that wouldn't be possible right now due to time contraints I will change the site JS to use noConflict if I have time. But I think it isn't any longer "must have" for launch as we won't use the backend right away.

#8 Updated by Rens Admiraal about 8 years ago

  • Assignee changed from Christian Müller to Rens Admiraal

#9 Updated by Karsten Dambekalns about 8 years ago

  • Target version changed from Site Launch to Call for Papers

#10 Updated by Sebastian Kurfuerst about 8 years ago

  • Status changed from Accepted to Resolved
  • Assignee changed from Rens Admiraal to Rens Admiraal
  • % Done changed from 0 to 100

resolved by Rens in TYPO3. We now check if jQuery is already loaded and if yes, take this version.

Also available in: Atom PDF