This repository was archived by the owner on Nov 6, 2019. It is now read-only.
Attendees with the same email are accidentally being hidden in some circumstances. #188
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So this just happened on the WordCamp Orlando site, and as a quick workaround changing the emails to be unique will fix things.
Consider this situation:
Father buys a ticket for himself, and his spouse/child/whatever. And all tickets are registered with the same email address. Because of how CampTix works, only one attendee will be displayed and it's the one that's last in the alphabetical order.
Now say you hide just that attendee from display on the attendees page. Any other attendees with the same email will now also be hidden.
In our situation we had an entire family with the same email address with the following names:
Emma (child)
Iris (mother)
James (father)
Jamie (child)
Mayah (child)
Only Mayah was being displayed on the attendee page and this needed to be changed to display James. Additionally, Iris also needed to be displayed. My thought was to hide all the children (check the "Hide from public attendees list" checkbox) and change the email address on Iris. This led to only Iris being displayed, due to the simple fact that James was being "overwritten" by first Jamie and then Mayah, who are both set to be hidden.
This PR will move the check for the
tix_privacyfield up and it will skip trying to add their name to the$attendeearray altogether. That way we'd still only display unique emails on the attendee page as before, but they won't be affected by any attendees with the same email that are set to be hidden.The simplified test case on my local looks like this, with Mayah set to be hidden:
The front-end displays both Iris and James, as expected:
It also looks like my editor stripped some spaces at the end of some lines. It doesn't look like this has had any effect on the front end, but can be fixed if it's an issue to merge in.