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

blank event blocks in View As Week mode #66

Closed
cmt1810 opened this issue Dec 4, 2015 · 18 comments
Closed

blank event blocks in View As Week mode #66

cmt1810 opened this issue Dec 4, 2015 · 18 comments

Comments

@cmt1810
Copy link

cmt1810 commented Dec 4, 2015

Just upgraded to TEC 4.0 and updated TEC Category Colors as well. I'm displaying a full-page calendar on one page of our site. When I select "View As Week", some of the event "blocks" for the week are blank. Here's a "before" shot: http://screencast.com/t/FMmLl80D3Uvv under the previous version of TEC and here's an "after" shot of the same exact data after upgrading to 4.0: http://screencast.com/t/2FkOFRfJgj The only events with this issue are the ones with category colors associated with them.

Interestingly (perhaps), the ones that show as blank contain text that might be interpreted as an attempt at PHP code. In fact, when you hover over them, the only parts of the detail text that show up are those characters and logical operators that PHP recognizes.

This is a great plugin. I hope you can help figure out what's going on and fix it so I can continue using it!

@afragen
Copy link
Collaborator

afragen commented Dec 4, 2015

Check out the develop branch and see if this is fixed. I saw this yesterday and think I've gotten it worked out.

@cmt1810
Copy link
Author

cmt1810 commented Dec 4, 2015

Well, this is kind of embarrassing... I'm new to GitHub and while I can see that you've done some work on it, I'm not sure what I'm supposed to do to test. I did download the code in the Extras.php link and the the-events-calendar-category-colors.php link (those were the only code files I could find that had changed within the last day) and replaced the files of those names in the associated plugin directories in my dev environment, but when I run the site, nothing seems to have changed -- so I guess I'm not understanding what I should do... Thanks for bearing with me on this...

@afragen
Copy link
Collaborator

afragen commented Dec 4, 2015

Don't worry. It seems to be working for me. I'll push out an update on .org.

After updating, you might need to refresh your CSS by adding ?refresh_css to the end of the URI.

Let me know here if it's working or if you're still having issues.

@cmt1810
Copy link
Author

cmt1810 commented Dec 4, 2015

Hmmm... well, I applied the update, but am still having issues. For some reason it did correct the issue on one of the events (the one in yellow), but the ones in red and blue, as you can see here: http://screencast.com/t/sEQbOZaTZT are still blank. The only difference(s) I can discern are these: the ones in red and blue are set up as all-day events, while the one in yellow is time-bound. The ones labeled "Lent" display as expected because they don't have any TEC Category Colors associated with them. You'll note also that when I hover over one of the blank events (red -- I don't know what's different about the blue blank events), the pop-up displays only the punctuation marks that are in the text details of the event, which looks eerily like something to do with interpreting the text (or trying to) as php code... Might there still be a problem?

@afragen
Copy link
Collaborator

afragen commented Dec 4, 2015

I'll do some more digging. It may have to do with the all day events. Can you share the site's url?

@afragen
Copy link
Collaborator

afragen commented Dec 4, 2015

Oops, just pushed another update that should fix this for you. Please let me know.

BTW, nothing in this plugin should affect the contents of your popup display, only the title's styling.

@cmt1810
Copy link
Author

cmt1810 commented Dec 4, 2015

OK, let's put this on hold for a couple of days. Yes, I did include the css refresh trigger, but no, I can't share the url--because it's on a local dev box. I think there's a problem with the new version of TEC, and I've got an active trouble ticket open with them. Our "live" site has maintenance mode turned on (which is why it wouldn't help to share it -- unless you'd like to log in, which I'd be happy for you to do).

But in any case, here's what I know now (and the reason for putting this on hold until I've worked through what appears to me to be a TEC issue):

  1. our "live" site has not been upgraded to TEC 4.0, but has been updated to 4.4.1 TEC Category Colors plugin. Here's what the site looks like with your plugin deactivated: http://screencast.com/t/q4TLQqipAQ. All's well.
  2. here's what it looks like with your plugin activated: http://screencast.com/t/6a08louj . Still all's well, except the behavior you see in the popup/tootip onhover.

I just saw your note about the second push, and your comments about styling jive with what I'm seeing, I think... In other words, I'm thinking the behavior with the popup/tooltip is a TEC thing. So, until we resolve that, I'll not bother you any more. I do appreciate your responsiveness and patience. It's a great plugin and I'd do almost anything to get it all working correctly!

@cmt1810
Copy link
Author

cmt1810 commented Dec 4, 2015

OK, I lied. I'm back, but only because I think you're on to something and we're oh, so close... I updated to 4.4.2 and lo and behold, the text information in the popup is showing. The only problem is that it's not displaying it as it's written... This is on my dev box with TEC Pro 4.0 and your plugin 4.4.2... This first grab is of the week with your plugin deactivated. You'll see I've hovered over the popup called "Lectionary" for Thursday of the week: http://screencast.com/t/jV8bQ71r to show what the text part looks like without your plugin--i.e., the behavior I've been trying to resolve. Now this is what it looks like with your plugin activated: http://screencast.com/t/Aaoaj3Xm5n9 Whatever you did in 4.4.2 all the sudden makes the text show up, although the formatting is screwy--interestingly (again) chopped up by PHP-recognized characters... Here's what the text in the popup for that day should look like: http://screencast.com/t/RZaGx5ZnllC2 Again, this is the latest version of all three plugins--TEC, TEC Pro, and TEC Category Colors.
I'm only revisiting this because some change you made in 4.4.2 moved the needle, so it feels like we might be close to a solution.

@afragen
Copy link
Collaborator

afragen commented Dec 5, 2015

It's possible that your text is enough of an edge case that something in TEC parsing of your info needs more escaping. I can see a lot of parens and semicolons in the text. Can you copy that block of text here and I can see if I get similar results on my end?

@cmt1810
Copy link
Author

cmt1810 commented Dec 5, 2015

Sure. I'm actually including the markup text since it's linked text and that might be contributing to the problem. This is a pretty use-case for what we're doing with the calendar:

Maundy Thursday (Violet or Red)
Exodus 12:1-4, (12:5-10), 12:11-14; Psalm 116:1-2, 116:12-19; 1 Corinthians 11:23-26; John 13:1-17, 13:31-35

@cmt1810
Copy link
Author

cmt1810 commented Dec 5, 2015

Sorry... Try this:
<strong>Maundy Thursday<strong> (<span style="color: #800080;">Violet</span> or <span style="color: #ff0000;">Red</span>)</strong></strong> <strong><a href="https://www.biblegateway.com/passage/?search=Exodus+12%3A1-4&amp;version=NIV" target="_blank">Exodus 12:1-4</a></strong>, (<strong><a href="https://www.biblegateway.com/passage/?search=Exodus+12%3A5-10&amp;version=NIV" target="_blank">12:5-10</a></strong>), <strong><a href="https://www.biblegateway.com/passage/?search=Exodus+12%3A11-14&amp;version=NIV" target="_blank">12:11-14</a></strong>; <strong><a href="https://www.biblegateway.com/passage/?search=Psalm+116%3A1-2&amp;version=NIV" target="_blank">Psalm 116:1-2</a></strong>, <strong><a href="https://www.biblegateway.com/passage/?search=Psalm+116%3A12-19&amp;version=NIV" target="_blank">116:12-19</a></strong>; <strong><a href="https://www.biblegateway.com/passage/?search=1+Corinthians+11%3A23-26&amp;version=NIV" target="_blank">1 Corinthians 11:23-26</a></strong>; <strong><a href="https://www.biblegateway.com/passage/?search=John+13%3A1-17&amp;version=NIV" target="_blank">John 13:1-17</a></strong>, <strong><a href="https://www.biblegateway.com/passage/?search=John+13%3A31-35&amp;version=NIV" target="_blank">13:31-35</a></strong>

@afragen
Copy link
Collaborator

afragen commented Dec 5, 2015

Wow, something really strange going on in the views/pro/week/tooltip.php file. I can't really figure it out but I know it has something to do with the new javascript templating that Modern Tribe is using.

Curiously, the an identical tooltip.php file exists in the views/month/tooltip.php in TEC, however, in the month view it seems to display correctly.

I would recommend opening up an issue on the PRO support forum and reference this issue.

On my local test site the following is what I see with this plugin active and deactivated.
modified

screenshot_03

Here's what it looks like in the month view.
screenshot_04

For reference I'm running WordPress 4.4RC1, TEC 4.0, ECP 4.0, Category Colors 4.4.2

@afragen
Copy link
Collaborator

afragen commented Dec 5, 2015

Please provide a link to the forum issue here. Thanks.

@cmt1810
Copy link
Author

cmt1810 commented Dec 5, 2015

It's comforting to know I haven't been imagining things -- at least this time...

I already had a ticket open with TEC, and the link is: https://theeventscalendar.com/support/forums/topic/this-week-widget-potential-issue/

Because some of it I had labeled as private, I'm also including a screenshot of the entire conversation so you can see what all has transpired here: http://screencast.com/t/sRPd8EUM

@jesseeproductions
Copy link

Posting my response from our forum just in case someone runs into from here.

So the week view issue is the full content is being displayed and not just an excerpt using the tribe_events_get_the_excerpt function. To fix this in 4.0 follow these steps:

Within the main Events Calendar plugin, navigate to the src > functions > template-tags > general.php file and open it within your preferred text editor.

Navigate to line #1320 within that file. It should look like:

$excerpt = wp_trim_excerpt( $excerpt );

You can change that line to be:

$excerpt = wp_trim_words( $excerpt, '55' );

Where “55” is the number of words that you would like the excerpt to be there.

@afragen
Copy link
Collaborator

afragen commented Dec 6, 2015

Thanks Brian.

@cmt1810
Copy link
Author

cmt1810 commented Dec 10, 2015

Andy... great job on helping resolve my issue, thanks! At the risk of wearing out my welcome, one more thing... one of the original "problems" I reported was that with TEC Category Colors turned on, events in both the month and week views were transparent, allowing the calendar lines to show through. Then it hit me (duh), I could simply apply a white background to the offending event category (i.e., those that are time-bound -- all-day events show up at the top, where the background is devoid of lines, etc.). That solved the problem with my month- and week-views, but then I discovered that in the site footer, where I'm displaying the calendar month widget, an event with a white background doesn't work when the footer has a colored background. Examples: this is what it looks like when the event is transparent --> http://screencast.com/t/EmPvC8RShI9 and this is what it looks like when the event is set to a white background --> http://screencast.com/t/LegAWaojM. I can, of course, play around with the colors to resolve it (that's what your plugin is for, after all), but am just wondering if there is an easy and quick way to resolve this in the code?

@afragen
Copy link
Collaborator

afragen commented Jan 17, 2016

The solution was to create an override template and is described on the Events Calendar Pro forum.

https://theeventscalendar.com/support/forums/topic/this-week-widget-potential-issue/#post-1038528

@afragen afragen closed this as completed Jan 17, 2016
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

3 participants