Home › Forums › Calendar Products › Events Calendar PRO › Possible bug in day/list views
- This topic has 10 replies, 2 voices, and was last updated 10 years, 5 months ago by Barry.
-
AuthorPosts
-
November 20, 2013 at 2:06 pm #77714deshubParticipant
I have duplicated the day and list view files into my theme folder. I was trying to make a small change to the order of elements, ie. remove the venue link from within the meta div, and move it down below the excerpt text. What I find is that editing the single-event.php in ‘themes/twentytwelve/day’ has no effect, while editing single-event.php in ‘themes/twentytwelve/list’ will cause the display to appear in the desired order in both list and day views. Now that I know this, it’s not a big deal because I want the same display for both, but it was rather frustrating until I happened to discover it.
Have I misunderstood how the theme modifications are supposed to work? Is this the intended behavior? Or is this actually a bug? Someone who wanted a different display for the list and day views might be bothered by this. Thanks!
Ted
November 20, 2013 at 5:10 pm #77763BarryMemberHi Ted,
Our Themer’s Guide is a great starting point for learning about safely making customizations.
One thing that stands out is that you don’t seem to be using a tribe-events subdirectory. For instance:
themes/twentytwelve/tribe-events/list.php
Which is expected by the plugin. Does that help at all?
November 21, 2013 at 6:26 am #77817deshubParticipantHi Barry,
I’m sorry, I am using a ‘tribe-events’ subdirectory, I just forgot to include that in the paths when I typed my note.November 21, 2013 at 2:33 pm #77943BarryMemberOK, and for day view are you also locating your custom template within a /pro/ sub-directory? In other words, it should live at
your-theme/tribe-events/pro/day/single-event.php
If it is missing the /pro/ directory then that would certainly explain why it seems to have no effect in your case. Does that help at all?
November 22, 2013 at 6:56 am #78038deshubParticipantHi Barry,
Thanks, I’ll try that, I’m not using the ‘pro’ subdirectory. Your documentation is somewhat inconsistent on this point. In the single-event.php comments at the beginning of the file it reads:<?php
/**
* Day View Single Event
* This file contains one event in the day view
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/day/single-event.php
*
* @package TribeEventsCalendar
* @since 3.0
* @author Modern Tribe Inc.
*
*/so you might want to address that. The Pro theme file comments are not always consistent on that point, you might want to review all of them. In the themer's guide, the wording of item 1 could be made more clear (in my opinion) to indicate that Pro templates need to be in a 'pro' subfolder. You are very clear about this in the section about CSS so maybe I should have figured that out, but never hurts to be explicit.
All that said, I put my template into the folder structure you suggest and it still isn't working. For example, if I comment out the following line:
echo tribe_events_event_schedule_details()
in the 'day' version, no effect; in the 'list' version, the info vanishes on both day and list views.November 22, 2013 at 8:01 am #78173deshubParticipantOne other data point: we created a custom module to add a category sorting feature to the top of some pages. When I add it to tribe-events/list/content.php, it works fine. Add it to tribe-events/pro/day/content.php, nothing, and other edits to the page aren’t working either.
November 22, 2013 at 8:23 am #78187deshubParticipantHi Barry,
OK, did some more testing: I moved my ‘day’ folder up one level, out of the ‘pro’ folder, so it’s now in the ‘tribe-events’ folder. The changes I made to day/content.php then stared working. I then tried making changes to tribe-events/day/loop.php and tribe-events/day/nav.php and they work. But I can hack big chunks of code out of tribe-events/day/single-event.php and nothing happens. So to sum up, if the Day View templates are located in ‘tribe-events’ I can successfully edit everything but single-event.php. If I move the Day View templates to a ‘pro’ subfolder, no edit, to any file, has any effect. If it helps, I’m running ECP with an unedited version of the TwentyTwelve template. Thanks!November 22, 2013 at 12:10 pm #78247deshubParticipantSorry, one more thing, we made a similar edit to the week view content.php and it worked, but it’s not in our ‘pro’ subfolder either. It’s at tribe-events/week/content.php. Not sure about other week template files, I haven’t gotten around to tweaking those yet and probably won’t have time today…
November 22, 2013 at 5:22 pm #78311BarryMemberWe could definitely do with tightening up the comments in those templates and indeed the themer’s guide – thanks for that feedback. That said, I think we’ve crossed wires here a little, though. Let me try to clarify:
* If you wish to edit the display of single events within day view, you should copy Event Calendar Pro’s views/pro/day/single-event.php template and locate your overriding version at tribe-events/pro/day/single-event.php
* Removing venue information should be as simple as removing the whole of the block beginning if ( $venue_details ) : in that same template
If you are experiencing something else it might be a residual issue from an earlier release (looking at the URL you shared when you opened this thread, you seem to be using version 3.1 of both plugins even though you stated you are using 3.2 – so please do check on that).
I hope that helps!
November 25, 2013 at 12:31 pm #78471deshubParticipantHi Barry,
Thanks for the reply. I updated to 3.2 this morning and it seems to have fixed the issue I had with day view. I can edit the single-event.php in the day folder and those edits now take effect. I’m having a different problem now that may be related, however.
In ‘tribe-events/list/content.php’ I added a custom category sorting toolbar. Works fine, shows up in list view just great. But without making ANY edits to the default single organizer or single venue view, the toolbar also shows up on all my single organizer and venue pages, right below the list title ‘h2 class=”tribe-events-page-title”>Upcoming Events /h2’and immediately before the list of events starts. If I comment out the custom function on ‘tribe-events/list/content.php’, it goes away. The reason I think this may be related is that, as with my previous problems with the Day view, a file in the List folder seems to be taking precedence over the file that (I think) is supposed to be controlling the display. Do the single venue and organizer pages rely on ‘list/content.php’ in some way that isn’t discussed in the Themer’s Guide?
I’m happy to give you access to the site if it would help resolve this faster, I’m going to be running up against a deadline soon and once-a-day-interaction is kind of a slow way to work (although I do appreciate your help!). Just shoot me an email and I’ll get you in if you’d like to look at it.November 25, 2013 at 4:21 pm #78534BarryMemberDo the single venue and organizer pages rely on ‘list/content.php’ in some way that isn’t discussed in the Themer’s Guide?
The organizer and venue views do indeed re-use a number of list view templates: if you look for the call to tribe_include_view_list() within pro/single-venue.php you can get a sense of the mechanics of this.
One “cheap and cheerful” means of working around the situation you described might be to set a global variable from within customized single venue and organizer templates, then test for its presence before calling your custom piece of code. Or you could indeed look at and inspect the current request and make a decision that way.
-
AuthorPosts
- The topic ‘Possible bug in day/list views’ is closed to new replies.