Forum Replies Created
-
AuthorPosts
-
MotorcoParticipant
Just to add a bit more detail, in ticket.js, if I add this:
/* “Edit Ticket” link action */
$(‘#tribetickets’)
.on(‘click’, ‘.ticket_edit’, function (e) {
console.log(‘gonna try to edit ticket’);
e.preventDefault();
$(‘h4.ticket_form_title_edit’).show();
$(‘h4.ticket_form_title_add’).hide();
tickets_start_spin();var params = {
action: ‘tribe-ticket-edit-‘ + $(this).attr(“attr-provider”),
post_ID: $(‘#post_ID’).val(),
ticket_id: $(this).attr(“attr-ticket-id”),
nonce: TribeTickets.edit_ticket_nonce
};
console.log(‘params ‘ + params.ticket_id);
$.post(
ajaxurl,
params,
function (response) {
console.log(‘editing ticket’);I can see the 1st 2 console log prints. But the one under “function (response) {” never gets printed. This is true of *ALL* of the call backs in that file (delete, add). That call back is just not getting called and I can’t figure out why.
MotorcoParticipantOkay, So I’m slogging along. I managed to get things modified, but I’m running into some very strange and difficult to debug problems. I hit a point where the ajax callback isn’t returning correctly. So for instance, when you hit “Add Ticket” or any of the soft links (edit, delete), the db gets modified, the scroll up happens (bc that’s after the complete), but the UI doesn’t change. So if you’re adding a ticket, it looks like nothing happened (except the snapping of the scroll) and if you’re editing an existing ticket, nothing happens at all. But if you refresh the page (or update the event post), the changes are there (new ticket is there, or deleted ticket is gone – obviously nothing happens w/ Edit since there’s no UI). So something is getting caught somewhere in the ajax “action” sequence. No amount of tracing with console or error log is cluing me in. The callback inline function (param to $post) is simply not getting called.
Weirder still, I have 2 setups, production and staging, totally separate, w/ separate DBs. Since it was all just so strange, I added some debug logging to production (which doesn’t have any code changes) so I could compare. Somewhere along the way I started seeing the same problem – “Add Ticket” adds a ticket to the DB, but the UI just pops back – still in the adding ticket mode. So I obliterated all my changes – just reverted to the downloaded binaries for wootickets, events-calendar-pro and the-events-calendar. But it’s still broken?!? Oh yes I did refresh, clear cache, use incognito and try a different browser. Any ideas?
MotorcoParticipantStill stuck on this….
MotorcoParticipantOkay so I am in a similar situation. I have added some “additional fields” and I want to use these. For one, I am just adding additional data to be displayed as part of the event. But for another, I would like to specify how an event is displayed in the loop using tribe_get_events. The latter is (embarrassingly), a mystery to me. As an aside, how does ‘eventDisplay’ => ‘upcoming’ work? I don’t get how that gets passed to WP_query and yields a meaningful result? But it does – if I get rid of it, then I get old events. There is, as far as I can see, nothing in post_meta called “eventDisplay”.
So similarly, if I add ‘_ecp_custom_1’ => ‘true’ to the list of $args passed to tribe_get_events, I should get only events where that additional field is set to true. But instead, it is completely ignored. Sort of the opposite of the above since there *is* an entry for “_ecp_custom_1” in my post_meta with a handful of events with it set to true. There is some magic happening that is elusive. Help?
MotorcoParticipantWeird – yeah that worked for me too. Thanks.
MotorcoParticipantEntirely removing my template override for list-widget.php doesn’t fix it. Editing the widget settings such that every possible category is selected doesn’t help either. Stumped. Where is $posts getting defined?
MotorcoParticipantSame problem here.
I upgraded the-events-calendar plugin to 3.6 first (I had 3.4). The list-widget was scrogged. So then I copied over the new list-widget into my themes folder (overwriting the now obsolete one) and edited it accordingly. All good.
Then I updated events-calendar-pro to 3.6 and I’m now seeing the same drop-thru behavior that davidgmiles is seeing. I have events, but list-widget.php is seeing $posts as null (false). How to fix?MotorcoParticipantOK – now I’m just having a conversation with myself, but I am getting closer 🙂
SO, I had the durp moment of realizing that the values I need are stored already in their fields. BUT, now I am trying to figure out how to get the ticketID backwards into the class-wootickets where I build the chosen select dropdown. The callback has postID, but that doesn’t help. How do I get ticketID into that do_action?MotorcoParticipantActually, I’m not asking my question very well. Those attributes being out of scope isn’t the problem. What I need is to find the ticketid and the provider for the ticket that is getting edited within the edit ticket form. I know those variables are in there somewhere 🙂
MotorcoParticipantOi- This feature is critical to me. Not only do I have the exact same situation as @corymc, but I am migrating from the old events calendar system and I have about 100 events I’ll need to import. Since the database is wildly different, I figured the most reliable way would be to move them over manually. With 3 different tix per event, that would be a daunting task w/out defaults.
SO! I’ve been busting my hump trying to incorporate this feature on my own. I’m trying to use the existing defaults system in place for venues/organizers on the tickets. Unfortunately, those were written using an entirely different paradigm, so it’s not a cut/paste situation by any stretch. Also, this Chosen control is very peculiar and seems to behave vastly differently in different situations (such as not showing the search bar and not throwing events?).
MotorcoParticipantThat is perfect – thank you. Much more involved to set that default than I thought it would be.
September 9, 2013 at 10:00 pm in reply to: "default" tickets (automatically add predefined tickets) #65232MotorcoParticipantOk I think I answered my own question. Found tickets.js and the response.data structure. Oi that was hard to get to via grep 🙂
September 9, 2013 at 9:51 pm in reply to: "default" tickets (automatically add predefined tickets) #65231MotorcoParticipantOkay. I am stumped. How are the values for the ticket fields getting in those text boxes? I can set the value=”some text” and that gets ignored. I’m not too familiar with javascript/jquery, so perhaps this is some obvious magic of which I am ignorant. If an admin user edits a ticket (admin-views/tickets/meta-box.php), the existing data gets loaded into those fields – but HOW??
MotorcoParticipantYou could be right – it would be difficult to exploit. It just isn’t very good security practice. If the PDF attached to the email only exists in that email sent to the customer, that is pretty secure. If the authentication means (the ticket w/ barcode) is available on an open server, that is not as secure as possible. True, the fraudster has to guess at the filename for the image file and also know what event that barcode goes to. But it is exploitable. And sometimes the mere existence of an exploitable system is too much temptation for some kids to resist.
But here is another important issue: with the barcode in an html msg, I have to have a folder on my webserver with every barcode for every active event – ppl could open and print those at any time between now and when an event happens (which could be 3-4 months away). Then I also need some code that knows the naming scheme for those security coded image files and deletes all those files after the event has completed. That’s some extra work and one more thing that could go wrong. If the ticket email simply generates a PDF attachment, both of these problems go away.
MotorcoParticipantHere’s a bigger problem. I can’t use html for my tickets. The barcode file cannot be a URL. Otherwise someone could generate their own ticket. As long as they show up before the real ticket buyer, they can get in – and then the actual ticket buyer gets turned away as a fraudster! So I am going to have to revert this thing back to PDF attachments…
-
AuthorPosts