Download & Extend

When another form contains same ids, client stops working

Project:Localization client
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

#1

Assigned to:alex_b» Anonymous
Status:active» needs review

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

AttachmentSize
616106-1_use_classes.patch 3.61 KB

#2

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

#3

Version:6.x-1.x-dev» 7.x-1.x-dev
Status:needs review» patch (to be ported)

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

AttachmentSize
edit-target.patch 3.72 KB

#4

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.

#5

Status:patch (to be ported)» fixed

Ported to D7. Seems to be working fine.

AttachmentSize
classtarget.patch 6.05 KB

#6

Status:fixed» closed (fixed)

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

nobody click here