I have now established that this anomaly is due to the sortlist() function embedded in the single event format. This function takes a list of attendees (which are there) and outputs an empty list. I’m now trying to work out why – maybe someone has already fixed this. Function:
<script type="text/javascript">
function sortList(ul){
var new_ul = ul.cloneNode(false);
// Add all lis to an array
var lis = [];
for(var i = ul.childNodes.length; i--;){
if(ul.childNodes.nodeName === 'LI')
lis.push(ul.childNodes);
}
// Sort the lis in descending order
lis.sort(function(a, b){
var textA = a.innerText.toLowerCase();
var textB = b.innerText.toLowerCase();
if (textA < textB) return -1;
if (textA > textB) return 1;
return 0;
});
// Add them into the ul in order
for(var i = 0; i < lis.length; i++)
new_ul.appendChild(lis[i]);
ul.parentNode.replaceChild(new_ul, ul);
}
var attlist = document.getElementsByClassName('event-attendees');
var i;
for (i=0; i < attlist.length; ++i) {
sortList(attlist[i]);
}
Thanks for any advice. Obviously I’ve disabled the script for now, and have a working attendee list (albeit unsorted).
Nick
-
This reply was modified 3 years, 8 months ago by
ncarring.
@ncarring Please, accept my sincere apology about the late response.
We have implemented the attendee list functionality in
the such way that it creates the list in the attendee dashboard
when the attendee registration is enabled.
If your attendee registration is disabled and people buy your event ticket then they will not be added to the attendee dashboard.
Also, your previous ticket purchaser will not be added to the attendee dashboard when your attendee registration was disabled.
When the attendee registration is disabled, users will not see the attendee submission form in the front end so it will not be added to the attendee dashboard page.
Note: we are not quite sure about the JavaScript codes you have shared here. Our implemented functionality does not need such code to work with.
Recommendation: We recommend using the updated plugin, we are continuously adding new features and fixing issues in our plugin so if you had any issues previously they will be fixed automatically.
Please, let us know for further assistance.
Regards.
Thanks for your reply. I have established that the issue is not the Javascxript code but something else that is preventing it from running properly – I think I read somewhere that this plugin cannot play well with Buddypress, and since we are using that, perhaps that is the reason. Anyway, with the function disabled I have the attendee list (this is in the single event page under settings/formatting). I reverted the setting to default and I see the function is not part of the default code, so apologies if I’ve wasted your time.
Many thanks
Nick