• Resolved tqhung85

    (@tqhung85)


    Hi there,

    Firstly, thank you for your great plugin! I am using it on a website and having problem with template override.

    Looking at the code, I tried to register my theme to support eventbrite. I did this in functions.php:
    add_theme_support( 'eventbrite' );

    Then in the theme folder, I created eventbrite/eventbrite-index.php , but it just does not work.

    I then looked further at the plugin code, and found the error. In wp-content/plugins/eventbrite-api/inc/class-eventbrite-templates.php line 156 and 161. The current code is:
    $template = esc_url( get_stylesheet_directory() . '/eventbrite/eventbrite-index.php' );

    It causes the error as get_stylesheet_directory returns the absolute path, not an URL. So I changed it to this:
    $template = get_stylesheet_directory() . '/eventbrite/eventbrite-index.php';

    It working fine now, but still be my own custom hack. Hopefully this fix will be applied for the next version.

    Cheers!

    https://www.ads-software.com/plugins/eventbrite-api/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Automattic

    (@automattic)

    Hi tqhung85,

    Oh, that’s interesting; we can’t replicate, neither with a hosted account, nor localhost. Nothing in the esc_url function code would seem to indicate it can’t be used with file paths (as long as they’re valid characters in that path, they’re left alone).

    Is there anything else you can tell us about your setup that might indicate why this is an issue for you? What does that $template variable look like for you immediately after it’s been escaped?

    Plugin Author Automattic

    (@automattic)

    Hi, any update on this?

    Plugin Author Automattic

    (@automattic)

    Closing; just open a new thread if you’re still having issues.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Template does not work’ is closed to new replies.