Multiple purchase buttons on same page have same ID #2103

Closed
sumobi opened this Issue Mar 7, 2014 · 4 comments

Projects

None yet

4 participants

@sumobi
Owner
sumobi commented Mar 7, 2014

When using multiple purchase buttons on the same page they will have the same ID which creates invalid HTML.

Should we just remove the IDs altogether? It's very easy to target these without needing the ID anyway. Or maybe we can leave the ID on the first one and then strip the ID from the second one.

https://easydigitaldownloads.com/support/topic/multiple-purchase-buttons-validation-error

Owner

This has been brought up before . . . I don't recall the issue number though.

Owner

I'd prefer to not drop the IDs since we don't know if any one is currently relying on those for styling purposes. Maybe there's a way we could detect if an ID is duplicated and then append a -2 to the end of it.

@pippinsplugins pippinsplugins added the Bug label Mar 13, 2014
@chriscct7 chriscct7 added this to the 2.0 milestone Mar 31, 2014
Owner

I have a fix for @pippinsplugins suggestion. I'll get something committed in a few.

@cklosowski cklosowski added a commit to cklosowski/Easy-Digital-Downloads that referenced this issue Apr 24, 2014
@cklosowski cklosowski #2103 - Add Unique IDs when multiple purchase links on a page fbaf266
@cklosowski cklosowski added a commit to cklosowski/Easy-Digital-Downloads that referenced this issue Apr 24, 2014
@cklosowski cklosowski #2103 - #hashtags #are #awesome 73f814e
Owner

Kick ass, thanks Christ!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment