Cannot override select.php

Home Forums Ticket Products Event Tickets Plus Cannot override select.php

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1221409
    Charles
    Participant

    Hi,

    As per this topic, which doesn’t appear to be answered: https://theeventscalendar.com/support/forums/topic/where-do-we-create-the-events-tickets-plus-templates-under-our-child-theme/

    I cannot override the meta/select.php template. Please could you advise if this is going to be fixed?

    Thanks

    #1222170
    Cliff
    Member

    Hi, Charles.

    If you open the /wp-content/plugins/event-tickets-plus/src/views/meta/select.php file, you’ll see in the comment section at the top, it tells you what path to use to implement your Themer’s Guide template override.

    In this case, this file specifies [your-theme]/tribe-events/meta/select.php

    However, the path Hunter provided in that previous thread is likely what it should be: /wp-content/themes/tribe-events/tickets/meta/select.php

    Please test these two paths and let me know which works for you and I’ll try to confirm and correct any discrepancies in our documentation.

    Thank you.

    #1223032
    Elizabeth
    Participant

    We’re having the same issue with overriding the Meta fields. We’ve tried multiple locations and options and no luck.

    It should be noted that the meta.php does override properly.
    [your-theme]/tribe-events/meta.php

    Anything within the meta folder does not:
    [your-theme]/tribe-events/meta/text.php

    Steps we’ve taken:

    • Disable all other plugins
    • Try twenty sixteen theme

    Here is a screenshot of all the places we’ve tried in our theme and had no luck:
    Theme files

    Is there anything we might be missing? We would like to avoid making changes to the plugin core files to accomplish what we need.

    Thanks!

    #1223310
    Cliff
    Member

    Thanks for all the details. I was able to reproduce this bug for all the files in that directory.

    I’ll mark this ticket as Pending Fix, which means this thread should receive a reply once the applicable fix has been released. I cannot guarantee when it will be fixed as it’s in the development team’s hands now. They need to assign it, code it, test it, and schedule it for release.

    I apologize for this issue and appreciate your understanding and patience.

    My best guess is the issue has something to do with Line 222 of /src/Tribe/Meta/Field/Abstract_Field.php

    #1223998
    Elizabeth
    Participant

    Yeah I think you’re on to something with line 222 in that file.

    We’re making this quick change to the plugin locally (not perfect by any means) and it seems to fix the issue for us. We’re assuming once the fix is deployed it’ll overwrite our plugin change but our custom template edits in our theme will keep working.

    
        $filepath = $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/our-theme/tribe-events/meta/'. $template;
        if (file_exists($filepath)) {
          include $filepath;
        } else {
          include Tribe__Tickets_Plus__Main::instance()->plugin_path . "src/views/meta/{$template}";
        }
    

    Hope that helps others as a quick patch. Let us know if you’d advise against this.

    Thanks!

    • This reply was modified 7 years, 2 months ago by Elizabeth.
    #1224052
    Cliff
    Member

    Sounds good. However, there may be some release cycles before this fix is added to the plugin’s code. Please be prepared to implement your fix more than once, and thanks for your patience.

    #1224988
    Frank
    Participant

    Interesting. For me though, also the meta.php is not overwriting anything…
    Any ideas?

    Cheers

    #1225387
    Cliff
    Member

    I confirmed that /wp-content/plugins/event-tickets-plus/src/views/meta.php didn’t take the template override either and have added that to our bug report.

    Sorry about this.

    #1329124
    Victor
    Keymaster

    Hello There!

    Just wanted to share with you that a new maintenance release (for the Week of 24 July 2017) is out, including a fix for this issue 🙂

    Find out more about this release → https://theeventscalendar.com/maintenance-release-week-24-july-2017/

    Please update the plugins and let us know if the fix works for your site.

    Best,
    Victor

    #1339175
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Cannot override select.php’ is closed to new replies.