Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Call to undefined function espresso_display_ticket_selector #15

Closed
sethshoultes opened this issue May 1, 2018 · 5 comments
Assignees

Comments

@sethshoultes
Copy link
Contributor

sethshoultes commented May 1, 2018

To reproduce, create a new page, then add the EE4 ticket selector to the page using Beaver Builder. Save the page, then try to edit the page using Beaver Builder.

Fatal error: Call to undefined function espresso_display_ticket_selector() in /Users/sethshoultes/Documents/Websites/espresso-4-9.dev.cc/wp-content/plugins/eea-beaver-builder/beaver-builder-modules/ticket-selector/includes/frontend.php on line 4

@sethshoultes
Copy link
Contributor Author

sethshoultes commented May 1, 2018

Possibly related From Slack:
@joshfeck saw something similar with elementor
One possible solution would be to tweak the conditionals that determine whether to include the template tags file.
The underlying issue is the page builders are trying to load content as if it was the front end of the site, but it’s not the front end of the site.
Here’s the conditional from EE_System.core.php:
if ( is_readable(EE_PUBLIC . 'template_tags.php') && ($this->request->isFrontend() || $this->request->isIframe() || $this->request->isFeed()) ) { require_once EE_PUBLIC . 'template_tags.php'; }

so one idea could be too look at tweaking what’s defined as isFrontend()
and/or add a filter switch to that conditional

@sethshoultes
Copy link
Contributor Author

sethshoultes commented May 1, 2018

Here's the possibly related issue for core: eventespresso/event-espresso-core#360

@sethshoultes
Copy link
Contributor Author

Updated: This only seems to be happening in BB 2.1. Earlier versions of BB seem fine.

@mnelson4
Copy link

mnelson4 commented May 2, 2018

Chatted with Simon Prosser in https://beaverbuilders.slack.com and they're removing the following lines from BB 2.1

/**
* Dont load ee core, fixes the text editor tabs missing issue.
* @since 2.1
*/
function fl_ee_no_load_builder_active() {
   if ( isset( $_GET['fl_builder'] ) && class_exists( 'EE_System' ) ) {
       remove_action( 'init', array( EE_System::instance(), 'core_loaded_and_ready' ), 9 );
   }
}
add_action( 'after_setup_theme', 'fl_ee_no_load_builder_active' );

That was another way to fix issue #13, but accidentally introduced this problem. Once that's released this issue should be resolved too

@Pross
Copy link

Pross commented May 3, 2018

Above code removed as of 2.1.1.1 of Beaver Builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants