Followup on my Next Event shortcode post in the forums

Hi wonderful support staff,

It's been about a week since I've seen any movement on this ticket, and not only do I still have the problem, I'm now seeing it on another site. I'm writing you here rather than bumping the ticket, because I need help today, not in a day or two.

https://premium.wpmudev.org/forums/topic/event-countdown-shortcode

Thanks!
Adam

  • aecnu

    Greetings Adam,

    Thank you for letting us know and I do not know what to tell you since we do not have a facility to deal with "right now" requests as of this moment and in addition you say the code does not work but give no URL to the item nor any other resources other then your previous thread.

    Speaking of the previous thread I visited the link to the site that was included and found that there are errors on that very page as shown in my screen shot below.

    Please advise.

    Cheers, Joe

  • Adam

    Hi Joe,

    Sorry I wasn't being clear: I just want help on that last post, which was more than a week old. I figured if I bumped it, it would go into the pile with other requests made today, which are likely to get dealt with in a day or two.

    Since I think it's an issue related to the theme, I suspect if we find a solution there, it'll help my next problem. Also, do I understand the information I put in when submitting my question—with URL and plugin info—doesn't go anywhere? The second site I'm having issues with is here. The shortcode in use there is:

    [event_countdown format="dHMS" goto="http://example.com" class="countdown-class" type="flip" size="70" add="-120" expired="Too late!"]

    What you seem to have screencapped above is the Coming Soon page, which isn't where the problem is located. I'm not sure how that happened; I just checked the /preview URL and it took me to the proper site, where the shortcode isn't showing up. Please let me know if you have any further trouble accessing the site, and I'll make you a login.

    Adam

  • aecnu

    Greetings Adam,

    Yes sir you are spot on creating a new ticket about the other ticket because for some reason the previous ticket did not come up on my screen. Members do not normally wait more then 5 days maximum for a return response from me as I work through the ticket feeds and I am fed the tickets by aging.

    I am sorry for the delay and how that ticket got past me I have no idea - I certainly did not intentionally pass it by.

    For the second site it also contains an error as shown in my screen shot below but in this case it is a JQuery error.

    You had mentioned the possibility of a theme conflict or a suspicion thereof.

    In addition with the JQuery issue it is indeed time to pull standard troubleshooting protocol.

    With that said it is time to go into full blown trouble shooting mode because it appears there may be some conflict there and one way to find out conclusively.

    Standard plugin trouble shooting protocol - first to switch to the Twenty Eleven theme just long enough to check for the problem - if the problem still exists next involves deactivating all plugins except the plugin in question and then see if the issue still exists.

    If it does not, then you want to activate plugins one at a time testing in between to see if the issue returns. Even when you find one plugin, it may be in your interest to deactivate the problem plugin and continue testing the rest of the plugins to insure no others are also conflicting.

    You will know the conflict when the issue returns and which plugin(s) you activated that cause the issue.

    Please advise if there are any plugin conflicts and if so what the plugins are that are conflicting.

    Cheers, Joe

  • aecnu

    Greetings Adam,

    Thank you for the quick response and why certainly sir - send it on to aecnu (at) incsub.com and I will look into it though mind you I am not a coder and it would be in our best interest to have a lead developer look into it and I have already spoken to the lead developer of Events + plugin and he told me to ping him in here if need be.

    With that said, you may want to go ahead and send the log in to me anyway and I will let him have them if needed.

    He also told me the JQuery issue is almost certain to be the issue since the exact function we are working with is indeed a JQuery function.

    Be sure to include the URL of this ticket within the email:

    https://premium.wpmudev.org/forums/topic/followup-on-my-next-event-shortcode-post-in-the-forums

    Cheers, Joe

  • Vladislav

    Hello,

    Thank you for sharing the links. Apparently, in both cases we have a similar javascript problem - the injected javascript somehow gets broken with a newline (which isn't in the source) in the middle of a string injection, which causes the error. To make sure the countdown is working properly otherwise, you can just omit the type="flip" portion of the shortcode (also, including an explicit event_id attribute is probably a good idea too).

    As for the flip-type counter, I tried a bit different approach to javascript injection in the attached Beta. This should hopefully prevent accidental breaks in the javascript and, consequently, hopefully allow your shortcode with type="flip" to work properly. Can you please give it a go and see if it helps?

  • Adam

    Hi Vladislav,

    Thanks again for tackling this. Using the beta, the basic shortcode works fine—with and without the event_id attribute—but the type="flip" is still broken. This gets me halfway there, which is great.

    FYI, I'm working on it on the wedding site because the farm site is now a proper production site again. When we have it all fixed up, I'll implement it there, too. All over, in fact. :slight_smile:

    Please keep the good news coming!

  • Vladislav

    Hello,

    Thanks for reporting back with such thoroughness. Unfortunately, previous version unfortunately failed to prevent the script from breaking. However, in the attached version, I have tried to shield it in a bit better way, which should hopefully help with the type="flip" problem.

    However, if the attached version doesn't fix this out of the box, there's now also an alternate way of injecting the required scripts, involving additional shortcode attribute. Can you please try adding the new footer_script="yes" attribute to your code? For an example, your shortcode could then look a bit like this:

    [event_countdown event_id="19067" type="flip" footer_script="yes"]

  • Adam

    Using event "83" (which takes place next year), here's what I get:

    [event_countdown type="flip" footer_script="yes"]

    gives me "Closed".

    [next_event_countdown type="flip" footer_script="yes"][next_event_countdown event_id="83" type="flip" footer_script="yes"]

    give me nothing (page blank).

    [event_countdown event_id="83" type="flip" footer_script="yes"]

    renders the flips! But there are two problems: first, at 9:42 AM, April 27, 2013, it's telling me the current event starts in 1 day, 17 hours, 17 minutes. Second, the flip-card backgrounds are cut off on the right side. (Screenshot)

    I figure this is the difference between event_countdown and next_event_countdown. I'm not sure when I would use event_countdown over next_event_countdown.

    Thanks so much for sticking with me on this, Vladislav.

    best,
    Adam

  • Vladislav

    Hello,

    Thank you very much for your patience and thorough testing! The thing about event countdown vs the next event countdown is that, for now, I'm focusing on fixing the issues with the former one - once we have that figured out, naturally I'll propagate the fix to the other add-on which uses similar code to make sure they're both working fine. So, for now, I'm focusing on getting the event_countdown shortcode issues sorted, with next_event_countdown next in line to receive the fixes we come up with.

    As for the events countdown, fortunately, I'm glad we fixed the issue from the opening post. Unfortunately, however, in doing so we apparently uncovered some limitations. Aside from the obvious style issue, the flip counter also didn't support 3 digit numbers, which we need in order to display the wedding date while it's still 100+ days in the future. The attached update should hopefully fix both both problems. Additionally, the script injection issue shouldn't be a problem anymore, because the necessary javascript is included in a different way. Can you please give it a go and see if it helps?

  • Adam

    Oh, wow, Joe, thanks. I totally missed this post. On it momentarily.

    --timewarp--

    Here's my report. Because Vladislav was clear he's not working on next_event_countdown yet—I respect your process—I didn't test it.

    [event_countdown event_id="83" type="flip"]

    works and looks great with the flip.

    [event_countdown event_id="83"]

    works exactly as advertised.

    [event_countdown type="flip"] and [event_countdown]

    give me "Closed", so it appears I have to enter an event_id for [event_countdown] at all times. That's fine for this site, as this site naturally has a limited number of events to keep track of. :slight_smile:

    I'm looking forward to you guys coating [next_event_countdown] in the same badass development magic! I'll hold off on updating the plugin elsewhere till it's all locked up.

    Thanks so much, again, for staying on top of this! And for pinging me, too.

  • Vladislav

    Hello,

    Thank you very much for your patience and awesome help and feedback in troubleshooting this issue. The fix we came up with will, of course, be in the next release which should hopefully be quite soon. In the meanwhile, I'm also attaching a Beta version with the next_event_countdown shortcode fixed too, in case you need something to work with ASAP. The next_event_countdown shortcode also has the new "footer_script" argument, and the fixes from the other countdown shortcode propagated and applied to it.

    Another new addition to the next_event_countdown shortcode is the new "title" attribute. This is also a boolean attribute (yes|no), which will, if set to "yes", show the next event title above the actual countdown. For an example:

    [next_event_countdown type="flip" footer_script="yes" title="yes"]

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.