Situation: page contains a form with id="edit-target", hence "edit-target" in the translation form becomes "edit-target-1". JS in l10n client depends on "edit-target" and saving of new translations stops working.

Issue reported originally o OpenAtrium tracker https://community.openatrium.com/issues/node/685

Patch a-comin.

Comments

alex_b’s picture

Assigned: alex_b » Unassigned
Status: Active » Needs review
StatusFileSize
new3.61 KB

This patch uses classes instead of ids for selecting the target element and fixes the problem reported here https://community.openatrium.com/issues/node/685

gábor hojtsy’s picture

Looks good. Did you notice any other similar places where IDs are used as selectors and can break while we are at it?

gábor hojtsy’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Patch (to be ported)
StatusFileSize
new3.72 KB

Ok, here is an updated version, committed to D6. Needs to be ported to D7.

tinker’s picture

No flipping way... I just spent hours figuring all of this out and rolling a patch for D6-dev. Can't believe I missed this post. It would have really helped me work through my problem faster. Oh well, I was still having problems with the dev version because the form ID was not the same as the rendered version in the browser e.g. form ID "l10n-client-form" was "l10n-client-form-1" in my browser. I have introduced more classes to fix the issues I was having in my post http://drupal.org/node/836560

I think I am quite well versed in this now and noticed other ID references that could cause problems. So if you need some help rolling more patches let me know.

gábor hojtsy’s picture

Status: Patch (to be ported) » Fixed
StatusFileSize
new6.05 KB

Ported to D7. Seems to be working fine.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.