GithubHelp home page GithubHelp logo

eventespresso / event-espresso-legacy Goto Github PK

View Code? Open in Web Editor NEW
2.0 10.0 0.0 14.18 MB

This is the 3.1 branch of Event Espresso

License: GNU General Public License v2.0

PHP 83.74% CSS 14.75% JavaScript 1.46% HTML 0.04% Hack 0.01%
event-espresso legacy-product php events event-tickets eventbrite

event-espresso-legacy's Introduction

event-espresso-legacy

This is the 3.1 branch of Event Espresso http://eventespresso.com

VERY IMPORTANT

This repository is offered as a means for developers to use and contribute pull requests if they desire. However, this is considered a legacy product so we will ONLY be accepting pull requests for the following:

  • bug fixes
  • security fixes

Also this repository is NOT a support portal. If you have questions about how to do something, you can post an issue if you want but you will not get a response from any of the Event Espresso team. Due to this being a legacy product, support for EE3 user's is ONLY provided to holder's of a EE3 support license via the Event Espresso support forums

event-espresso-legacy's People

Contributors

jazzsequence avatar joshfeck avatar lorenzocaum avatar nerrad avatar pebblo avatar sethshoultes avatar sidharrell avatar tn3rb avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

event-espresso-legacy's Issues

WordPress 5.4 with Event Espresso 3 - 404 Errors Unless Logged In as Admin

The latest version of Event Espresso 3 doesn't appear to work properly in WordPress 5.4.

When I try to register for an event, I get a 404 not found page. However, I don't get the 404 page when I'm logged in as an administrator.

URLs such as:

/event-registration/?ee=14546
/?page_id=18680&ee=14546

Result in a 404 not found page when I'm not logged in as an administrator, but works properly when I am logged in with an administrator account. I don't believe it's a permalinks issue. I am running nginx.

It's happening for all of my events even though they were setup properly. I'm not sure when this issue started happening, but it is sometime after WordPress was updated from 5.2 to 5.3 and then to 5.4.

Any idea?

The espresso log when logged in as an admin matches the espresso log entries generated when not logged in, so I have no idea why this is happening.

[ 2020-04-20 15:00:28 ] espresso.php
VARS : ee = 14546
[ 2020-04-20 15:00:28 ] registration_page.php -> FILE LOADED
[ 2020-04-20 15:00:28 ] cart.php -> FILE LOADED
[ 2020-04-20 15:00:28 ] espresso.php -> espresso_load_pricing_functions
[ 2020-04-20 15:00:28 ] espresso-multi-registration.php -> load_event_espresso_cart_widget
[ 2020-04-20 15:00:28 ] espresso.php -> load_event_espresso_widget
[ 2020-04-20 15:00:28 ] espresso.php -> ee_init_session
[ 2020-04-20 15:00:28 ] espresso.php -> espresso_export_certificate
[ 2020-04-20 15:00:28 ] espresso.php -> espresso_export_ticket
[ 2020-04-20 15:00:28 ] espresso.php -> event_espresso_run
[ 2020-04-20 15:00:28 ] registration_page.php -> register_attendees
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] cart.php -> event_espresso_cart_link
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_member_price_select_action
[ 2020-04-20 15:00:28 ] member_functions.php -> event_espresso_price_dropdown
346
[ 2020-04-20 15:00:28 ] pricing.php -> early_discount_amount
[ 2020-04-20 15:00:28 ] ical.php -> espresso_ical_prepare_by_meta
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:28 ] espresso.php -> espresso_load_javascript_files
[ 2020-04-20 15:00:28 ] espresso.php -> espresso_register_validation_for_shortcodes
[ 2020-04-20 15:00:28 ] espresso.php -> espresso_load_jquery
[ 2020-04-20 15:00:28 ] espresso.php -> add_event_espresso_stylesheet
[ 2020-04-20 15:00:28 ] espresso.php -> add_espresso_themeroller_stylesheet
[ 2020-04-20 15:00:28 ] espresso.php -> espresso_info_header

[ 2020-04-20 15:00:29 ] espresso.php
VARS : ee = 14546
[ 2020-04-20 15:00:29 ] registration_page.php -> FILE LOADED
[ 2020-04-20 15:00:29 ] cart.php -> FILE LOADED
[ 2020-04-20 15:00:29 ] espresso.php -> espresso_load_pricing_functions
[ 2020-04-20 15:00:29 ] espresso-multi-registration.php -> load_event_espresso_cart_widget
[ 2020-04-20 15:00:29 ] espresso.php -> load_event_espresso_widget
[ 2020-04-20 15:00:29 ] espresso.php -> ee_init_session
[ 2020-04-20 15:00:29 ] espresso.php -> espresso_export_certificate
[ 2020-04-20 15:00:29 ] espresso.php -> espresso_export_ticket
[ 2020-04-20 15:00:29 ] espresso.php -> event_espresso_run
[ 2020-04-20 15:00:29 ] registration_page.php -> register_attendees
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] cart.php -> event_espresso_cart_link
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_member_price_select_action
[ 2020-04-20 15:00:29 ] member_functions.php -> event_espresso_price_dropdown
346
[ 2020-04-20 15:00:29 ] pricing.php -> early_discount_amount
[ 2020-04-20 15:00:29 ] ical.php -> espresso_ical_prepare_by_meta
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] member_functions.php -> espresso_members_installed
[ 2020-04-20 15:00:29 ] espresso.php -> espresso_load_javascript_files
[ 2020-04-20 15:00:29 ] espresso.php -> espresso_register_validation_for_shortcodes
[ 2020-04-20 15:00:29 ] espresso.php -> espresso_load_jquery
[ 2020-04-20 15:00:29 ] espresso.php -> add_event_espresso_stylesheet
[ 2020-04-20 15:00:29 ] espresso.php -> add_espresso_themeroller_stylesheet
[ 2020-04-20 15:00:29 ] espresso.php -> espresso_info_header

[ 2020-04-20 15:00:30 ] espresso.php
VARS : _ajax_nonce = e0c75a17c5 & action = coderockz_woo_delivery_get_orders & onlyDeliveryTime = true & date = 04/20/2020
[ 2020-04-20 15:00:30 ] registration_page.php -> FILE LOADED
[ 2020-04-20 15:00:30 ] cart.php -> FILE LOADED
[ 2020-04-20 15:00:30 ] espresso.php -> espresso_load_pricing_functions
[ 2020-04-20 15:00:30 ] espresso-multi-registration.php -> load_event_espresso_cart_widget
[ 2020-04-20 15:00:30 ] espresso.php -> load_event_espresso_widget
[ 2020-04-20 15:00:30 ] espresso.php -> ee_init_session
[ 2020-04-20 15:00:30 ] espresso.php -> espresso_version
[ 2020-04-20 15:00:30 ] espresso.php -> espresso_export_certificate
[ 2020-04-20 15:00:30 ] espresso.php -> espresso_export_ticket
[ 2020-04-20 15:00:30 ] espresso.php -> ee_check_for_export

[ 2020-04-20 15:00:30 ] espresso.php
VARS :
[ 2020-04-20 15:00:30 ] registration_page.php -> FILE LOADED
[ 2020-04-20 15:00:30 ] cart.php -> FILE LOADED
[ 2020-04-20 15:00:30 ] espresso.php -> espresso_load_pricing_functions
[ 2020-04-20 15:00:30 ] espresso-multi-registration.php -> load_event_espresso_cart_widget
[ 2020-04-20 15:00:30 ] espresso.php -> load_event_espresso_widget
[ 2020-04-20 15:00:30 ] espresso.php -> ee_init_session
[ 2020-04-20 15:00:30 ] espresso.php -> espresso_export_certificate
[ 2020-04-20 15:00:30 ] espresso.php -> espresso_export_ticket

[ 2020-04-20 15:00:31 ] espresso.php
VARS : cf_action = grp_auto_save & place_id = ChIJObKoqTtPE4cRy3jcOXCwC_I & min_filter = 4 & reviews_lang = & ver = 1587394832059
[ 2020-04-20 15:00:31 ] registration_page.php -> FILE LOADED
[ 2020-04-20 15:00:31 ] cart.php -> FILE LOADED
[ 2020-04-20 15:00:31 ] espresso.php -> espresso_load_pricing_functions
[ 2020-04-20 15:00:31 ] espresso-multi-registration.php -> load_event_espresso_cart_widget
[ 2020-04-20 15:00:31 ] espresso.php -> load_event_espresso_widget
[ 2020-04-20 15:00:31 ] espresso.php -> ee_init_session

Events removed from the cart/session do not remove their registrations

Codebase ticket:
https://events.codebasehq.com/projects/event-espresso/tickets/10671

Testing notes:
https://events.codebasehq.com/projects/event-espresso/tickets/10671#update-42035626

This didn't really add much onto the time it took to track down the problem so created a branch with it.

Why delete the additional regs? Because anywhere that pulls the attendees using the session will run into this if you remove an event from the session after already providing reg details and hitting the payment options.

Refreshing the payment overview overwrites the current attendees in the session and so removes the additional registration anyway.

Branch - BUG-10671-remove-regs-from-session

To reproduce add an event to the cart, select a ticket, add your registration details and click to continue to payment.

From there get back to /event-registration/ (doesn't matter how you do it)

Add another event to the cart, you'll have the original and the new one. Select a ticket on the new event and remove the old one.

Continue through, add your details for the new event and continue - http://take.ms/4uCWr

Now on the Payment Overview you'll see both attendees - http://take.ms/Q6uqY

If you continue with the payment the thank you page shows both those events etc.
If you refresh the above page before continuing onto payment it 'fixes' it for you.

Using this branch that additional attendee is removed from the users session when they click the red stop icon to remove the event from the session.

Is there any way to get event excerpt and display in custom event listing template ?

get_the_excerpt(); does not retieve the excerpt , please let me know if there is any other function to achieve it.

event_list_display.php

<div class="PostExcerpt">
    <h2>
        <?php if (strlen($event_desc) > 750){?> <a href="<?php echo $registration_url; ?>"><?php echo stripslashes_deep($event_name) ?> </a> <?php } else { echo stripslashes_deep($event_name); }?>
    </h2>
    <div class="PostMeta">by <?php the_author(); ?> on <?php the_date(); ?></div>

    <span style="font-size: 18px;margin: 38px 0 24px;">
        <b><em><?php echo event_date_display($start_date, get_option('date_format')) ?> <?php if($event_meta['start_time']){?>- <?php $time = strtotime($event_meta['start_time']); echo date("g:i A", $time);} ?></em></b>
    </span>

    <p><?php echo get_the_excerpt(); ?></p>

    <div class="PostEvent">
        <p>
           <?php echo stripslashes_deep($v_title); ?><br />
           <?php echo stripslashes_deep($location); ?>
        </p>
    </div>
    <?php if(!is_page(44)){ echo $google_map_link; ?> | <a href="<?php echo $registration_url; ?>">More Info</a> <?php } ?>
</div>

Fix sanitization issue

From WP.org regarding the latest updates:

You still have sanitization issues.

Please sanitize, escape, and validate your POST calls

When you include POST/GET/REQUEST/FILE calls in your plugin, it's important to sanitize, validate, and escape them. The goal here is to prevent a user from accidentally sending trash data through the system, as well as protecting them from potential security issues.

SANITIZE: Data that is input (either by a user or automatically) must be sanitized. This lessens the possibility of XSS vulnerabilities and MITM attacks where posted data is subverted.

VALIDATE: All data should be validated as much as possible. Even when you sanitize, remember that you don’t want someone putting in ‘dog’ when the only valid values are numbers.

ESCAPE: Data that is output must be escaped properly, so it can't hijack admin screens. There are many esc_*() functions you can use to make sure you don't show people the wrong data.

To help you with this, WordPress comes with a number of sanitization and escaping functions. You can read about those here:

Remember: You must use the MOST appropriate functions for the context. If you’re sanitizing email, use sanitize_email(), if you’re outputting HTML, use esc_html(), and so on.

Clean everything, check everything, escape everything, and never trust the users to always have input sane data.

Some examples from your plugin:

event-espresso-free/includes/shortcodes.php:555: $event_id = $_REQUEST['event_id']; //If the first two are not being used, then get the event id from the url

event-espresso-free/includes/shortcodes.php:737: $event_id = $_REQUEST['event_id']; //If the first two are not being used, then get the event id from the url

event-espresso-free/includes/event-management/insert_event.php:57: 'repeat_by' => $_POST['recurrence_repeat_by'],
event-espresso-free/includes/event-management/insert_event.php:58: 'recurrence_regis_date_increment' => $_POST['recurrence_regis_date_increment'],
event-espresso-free/includes/event-management/insert_event.php:59: 'recurrence_manual_dates' => $_POST['recurrence_manual_dates'],
event-espresso-free/includes/event-management/insert_event.php:60: 'recurrence_manual_end_dates' => $_POST['recurrence_manual_end_dates'],

Calling file locations poorly

The way your plugin is referencing other files is not going to work with all setups of WordPress.

When you hardcode in paths, or assume that everyone has WordPress in the root of their domain, you cause anyone using 'Giving WordPress it's own directory' (a VERY common setup) to break. In addition, WordPress allows users to change the name of wp-content, so you would break anyone who choses to do so.

Please review the following link and update your plugin accordingly. And don't worry about supporting WordPress 2.x or lower. We don't encourage it nor expect you to do so, so save yourself some time and energy.

Some examples from your plugin:

event-espresso-free/includes/event-management/csv_import.php:100: $csvfile = "../wp-content/uploads/events.csv";

event-espresso-free/espresso.php:234: define('WP_CONTENT_DIR', ABSPATH . 'wp-content');

Note: You don't need to define WP_CONTENT_DIR.

Don’t use esc_ functions to sanitize

When sanitizing data, it’s important to use sanitization functions, not escape functions. The two work together, but are not interchangable.

Functions like esc_attr() do NOT sanitize anything, and should never be used for that purpose.

The sole exception to this is URLs, which can use esc_url() or esc_url_raw() when being saved.

Please review this document for help finding the most appropriate sanitization functions: https://developer.wordpress.org/plugins/security/securing-input/

Some examples from your plugin:

event-espresso-free/includes/category-management/add_cat_to_db.php:5: $category_name = isset($_REQUEST['category_name']) && !empty($_REQUEST['category_name']) ? esc_html($_REQUEST['category_name']) : '';

Set Api Version in Stripe Gateway

Seth forwarded me an email from a Stripe rep (possibly a Bot, but let's not discriminate) suggesting we should use setApiVersion in our integration. They didn't really specify which version, but it's probably a good idea. I created a ticket for EE4, but it applies to EE3 too.
If you don't set it, you can set the version in the Stripe dashboard. So far, I haven't seen any changes in the last few years that would affect us (I think), but it's possible they may introduce a backward-incompatible change that does affect us, then new users may default to that version before we have a chance to update our integration (which would be lots of fun to debug I'm sure.) More details on the EE4 Stripe ticket.

EE3: Fix missing fields in the CSV export when using regional managers.

Codebase ticket:
https://events.codebasehq.com/projects/event-espresso/tickets/10555

Testing notes:
https://events.codebasehq.com/projects/event-espresso/tickets/10555#update-40937356

Work done on - BUG-10555-fix-regional-man-export

I've sent a copy of these changes over to Greg for him to test with regional managers but its working locally for me.

To test first add a couple of registrations that have coupon codes (and don't), both paid and unpaid registrations to 'your' event as a regional manager (with Roles and Permissions Pro)

Export the CSV as a regional manager and just check the it looks correct, specifically the price, coupon and qty columns but a sweep over them all would be good.

Now repeat the export as a Admin. Check the CSV looks correct.

De-activate the R&P add-ons and export as an Admin, check the CSV looks correct.

The main thing to check is that everything works as expected as an admin with the CSV. Regional managers have been broken a long time.

That's it, Bobs your uncle!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.