Support

Home Forums Event Espresso Premium Register Now Button Broken

Register Now Button Broken

Posted: September 18, 2017 at 12:27 pm

Viewing 15 reply threads


extima

September 18, 2017 at 12:27 pm

When clicking on the register now butotn for events after choosing a ticket to register with, the button does nothing but take the user to the events url.

For example,registering for this event:
http://www.website.com/events/event-1

You will be redirected to:
events/event-1

After clicking the register now button.
I’ve checked all of the settings and this appears nowhere, I’ve also updated my permalinks just in case and cleared every cache on the site.


Josh

  • Support Staff

September 18, 2017 at 2:00 pm

Hi there,

May I ask were any customizations make to any of the event template functions or the ticket selector code? The reason I ask is I checked your site and the event’s permalink on the form action isn’t a complete URL.

Here’s a screenshot of the source of the webpage that shows that incomplete URL:

https://www.evernote.com/l/AATG52IA-bJFFYtDoKhf_ckRoNm4xoMD29k


extima

September 18, 2017 at 2:07 pm

Thank you for your response, I built a custom events page template and used the ticket selector shortcode. This is the code I used:

<?php echo do_shortcode(‘[ESPRESSO_TICKET_SELECTOR event_id=’ . $pid . ‘]’); ?>


extima

September 18, 2017 at 2:15 pm

$pid is getting the id of the event.


extima

September 18, 2017 at 2:42 pm

Other than this I have not edited or modified the Ticket selector code.


Josh

  • Support Staff

September 18, 2017 at 2:43 pm

Using do_shortcode with the ticket selector shortcode isn’t supported and may be why it’s not working. You can do something like this instead:

<?php global $post;
if ( espresso_display_ticket_selector( $post->ID ) ):
?>
<div class="event-tickets" style="clear: both;">
 <?php espresso_ticket_selector( $post ); ?>
</div>
<?php endif; ?>


extima

September 18, 2017 at 2:49 pm

I’ve replaced my code with what you’ve suggested and the form action is still an incomplete url.


extima

September 18, 2017 at 2:50 pm

Is there a place in the templates where I can check on where the form is being built?


extima

September 18, 2017 at 3:01 pm

If I update the action to /registration-checkout in inspector then click the button it works properly. I don’t know why the action is being written as an incomplete url of the page it’s on.


Josh

  • Support Staff

September 18, 2017 at 3:19 pm

Not within the templates. Can you try adding this debug code right after the
<?php global $post;
from above?
print_r(EEH_Event_View::event_link_url( $post->ID ));


extima

September 18, 2017 at 3:23 pm

Yup, sure thing. I did that and it’s outputting the incomplete url we are seeing in the action.


extima

September 18, 2017 at 3:38 pm

Okay I’ve fixed it, sorry. Somehow Root Relative was installed and activated and even though the url was set to the dev site link for some reason it was only interacting with the Ticket Selector stripping the address from prepending to the page url.


Josh

  • Support Staff

September 18, 2017 at 3:40 pm

OK. I checked and the ticket selector’s helper method ends up using
get_permalink() so there’s nothing unusual with how it grabs the current post URL there.


extima

September 18, 2017 at 3:47 pm

Yeah I think that’s working properly, but if someone is using Root Relative the post url will only be “/events/event-name” rather than “http://www.website.com/events/event-name&#8221; and that is what was causing the Register Now button to break or not be sent to the proper place.


extima

September 18, 2017 at 5:05 pm

Also side note for the plugin, if the url doesn’t exist (or there’s some issue getting to that url) that an admin used for the registration page in espresso settings, it falls back to Registration Canceled page, is there any reason it doesn’t fall back to the default WordPress register page instead?


Josh

  • Support Staff

September 18, 2017 at 5:07 pm

I’m sorry I don’t follow your question. Can you post a few more details, specifically what you mean by a registration page in Espresso settings?

Viewing 15 reply threads

The support post ‘Register Now Button Broken’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso