Bad merge cruft in htdocs/js/tinymce/tinymce.jquery.js

Bug #1521058 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Unassigned
15.10
Fix Released
Low
Unassigned

Bug Description

Robert noticed that there is a merge conflict ">>>>>" line left over in tinymce.jquery.js. It was apparently introduced in commit 5ba3418499cc419e, one of the bootstrap commits. The merge conflict was later partially cleaned up in commit e0d6f1c67f8ac, but this part was overlooked.

Looking closer, it's also apparent that quite a bit of duplicated code from that merge conflict was also left in place.

It's unclear whether this has caused any bugs, or which section of TinyMCE would cause this code to be executed.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Robert filed patch https://reviews.mahara.org/#/c/5805/1 about this issue (in master)

description: updated
Changed in mahara:
milestone: none → 16.04.0
description: updated
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5809

Revision history for this message
Aaron Wells (u-aaronw) wrote :

The merged code contains a duplicated of the module "tinymce/dom/StyleSheetLoader", and a partial duplicate of "tinymce/dom/DOMUTils". After comparing these with what was there before patch 5ba3418499, I saw some differences, but it looked like the copied versions were simpler than what was there before, rather than being purposeful changes.

Comparing it further, it looked like the versions in the merge commit were from TinyMCE 4.0.16. I think what happened is that I upgrade TinyMCE to 4.1.9 on the main branch, and then when the front-end people tried to merge their changes in, they got a merge conflict because their branch was still on 4.0.16.

That being the case, the best thing is just to revert that section. I've pushed a patch to do that: https://reviews.mahara.org/5809

Revision history for this message
Aaron Wells (u-aaronw) wrote :

We aren't currently using the "tinymce.jquery.js" file (it just was included in the standard TinyMCE download, and I didn't remove it). So this issue has not caused any bugs yet, and will not unless we start using it.

The main thing that tinymce.jquery.js provides, is that you can load up TinyMCE as a jquery plugin, i.e. using $(selector).tinymce() instead of tinymce.init(). See http://stackoverflow.com/questions/21434388/how-do-i-use-tinymce-jquery-package-and-what-is-the-difference-with-tinymce-jque

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5809
Committed: https://git.mahara.org/mahara/mahara/commit/c687a52a1dde353ec37db09402e62225a246a5ed
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit c687a52a1dde353ec37db09402e62225a246a5ed
Author: Aaron Wells <email address hidden>
Date: Mon Nov 30 18:24:44 2015 +1300

Revert bad merge changes in tinymce.jquery.js

Bug 1521058

behatnotneeded: Covered by existing tests

Change-Id: I7f4d2a290375074551f72ce2db731b80cab5c278

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.10_STABLE" branch: https://reviews.mahara.org/5815

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5815
Committed: https://git.mahara.org/mahara/mahara/commit/98663059d8a3f12dade160aa3e4816cff8d5f278
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.10_STABLE

commit 98663059d8a3f12dade160aa3e4816cff8d5f278
Author: Aaron Wells <email address hidden>
Date: Mon Nov 30 18:24:44 2015 +1300

Revert bad merge changes in tinymce.jquery.js

Bug 1521058

behatnotneeded: Covered by existing tests

Change-Id: I7f4d2a290375074551f72ce2db731b80cab5c278
(cherry picked from commit c687a52a1dde353ec37db09402e62225a246a5ed)

no longer affects: mahara/16.04
Changed in mahara:
status: Fix Committed → 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.