• Resolved studioavanti

    (@studioavanti)


    Hello,

    I just updated TEC 5.7 > 5.8 and upgraded to the new Calendar Views.
    Now, on my calendar months view, several functions don’t work anymore.
    This calendar URL is: /agenda/

    Heaver Events Bar: Previous month
    – Clicking the left arrow doesn’t show the previous month, current month still displayed.
    – The URL is changed into /agenda/(/?:month|mois)/: weird, is that normal?

    Heaver Events Bar: Search and List/Month/Day links
    – Don’t return the expected views, current month still displayed
    – URL is still /agenda/(/?:month|mois)/

    Heaver Events Bar: Date picker
    – Choosing a previous month works
    – URL is /agenda/(/?:month|mois)/2021-06/
    – To be noticed: the Date picker dropdown is not showing on my site until i disable all plugins, probably a conflict somewhere, no error in the console

    I cleared the caches, rebuilt the permalinks, disabled all other plugins, swapped to the regular 2021 theme, same issues.

    The issues disappear if i disabled the TEC “Use upgraded calendar views” option

    Thanks for your help!

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter studioavanti

    (@studioavanti)

    There was a plugins conflicts indeed on my site, preventing TEC 5.8 Date picker to open: Search & Filter Pro 2.5.9 plugin.

    As a workaround, enabling S&F “Lazy Load JavaScript” option fixes the issue with TEC Date picker.

    Here’s what the option does:

    Not all themes support lazy loading – enabling this option ensures that Search & Filter JavaScript files are only loaded on the pages that contain search forms – speeding up the other pages on your site.

    I’ll report to S&F support.

    Hey @studioavanti

    Thank you for reaching out.
    Yikes, that’s not good!

    It looks like you are using some type of multilanguage plugin.
    Would you mind sharing which one that is?

    I believe that the URL structure is “broken” (which is usually resolved at the multilingual plugin level).

    Quick curiosity question. Does the issue go away if you uncheck the “Use updated calendar designs” under Events > Settings > Display

    Cheers,
    Geoff

    @studioavanti

    Nice find! You beat me to the punch.

    Geoff

    Thread Starter studioavanti

    (@studioavanti)

    Hi @geoffbel,

    Thanks for your answer and hints.

    Yes, i’m using WPML on this site.
    Thanks for confirming the URL structure for TEC views is not normal, i’ll investigate on WPML side.

    Yes, disabling TEC Updated Views setting makes the filters (List/Month/Day) working again, and URLs structure look good too.

    The S&F conflict is something else, not that bad as the URLs issue. ??

    Thread Starter studioavanti

    (@studioavanti)

    @geoffbel

    S&F support answered my ticket with precise details i’d like to share with you, given it seems there’s something to fix on TEC or S&F side.
    How can i send these infos to you in private please?

    Thread Starter studioavanti

    (@studioavanti)

    Good catch about WPML and TEC URLs ??
    https://wpml.org/forums/topic/tribe-event-calendar-month-links/

    But with WMPL completely disabled, i still get these weird (/?:month|mois) URLs with TEC filters.
    So can we simply conclude it’s not a WPML issue or is it possible for WPML to have tweak TEC URLs in a persistent location somewhere maybe?

    Thread Starter studioavanti

    (@studioavanti)

    Hi @geoffbel

    So, i have contacted TEC support on the official site, trying to send them technical details from S&F support about the bug between TEC and S&F mentioned above, and here’s the answer i received:

    If your inquiry is of a technical nature and you have not purchased one of our premium plugins, please submit your question to the appropriate community forum (The Events Calendar | Event Tickets). Our support team reviews that forum weekly to check for bug reports. If you need more in-depth support you will need to purchase a license.

    Seriously, are they telling to buy a license to help THEM spotting a TEC bug???
    Again, the bug i mentioned above has been analyzed by S&F support, probably to solve on TEC side and it potentially concerns multiple of TEC users, not only me.

    Are you interested by the S&F support infos or not?
    If so, how can i transmit these infos to you in a private channel?

    @studioavanti

    Sorry for the delayed response.
    We are experiencing an unusually high volume of support requests at this time.

    You can share the details of the S&F ticket using my email address [email protected]

    Although we don’t offer support through email, that should allow me to relay your findings ??

    As for the TEC URLs, that’s a more complex issue. Long story short, the fact that the URL contains the slug in both French and English (mois/month) was 100% generated by WPML. So you are right: WPML does tweak TEC URLs and keeps those stored in tables.

    Don’t get me wrong, I love and use WPML all the time and we regularly collaborate with them. However, once WPML is installed, simply turning it off won’t bring things back to normal, unfortunately.

    But back to the issues you are facing, I have some good news for you:

    1. We will most likely extend the deadline for complete deprecation of the views so that we have a bit of time to tackle issues related to design-switching
    2. Regarding the WPML glitch, there are a couple of ways to go about it (which I will detail below). But whatever you do, make a backup of your site including the database first.

    WPML ideas:
    Basically, it looks like the Rewrite::get_canonical_url method is not replacing the tokens with the values correctly

    • Try using the WPML Troubleshoot menu and try to rebuild the links / clear the WPML cache
    • Add some code to the-events-calendar/common/src/Tribe/Rewrite.php starting at line 558 to strip out the extra localized values and make sure replacements happen correctly
    $link_template = preg_replace(
       '/\|[^)]+/',
       '',
       $link_template
    );
    $replace = array_combine(
       array_map( static function ( $key ) {
          return preg_replace(
             '/\|[^)]+/',
             '',
             $key
          );
       }, array_keys( $replace ) ),
       $replace
    );

    Finally regarding bug-reporting, our apologies for the confusion. The message is meant to avoid a support flood on the premium support channel by free plugin users.

    The forum (here) is the perfect place to report those (+ my email address provided above).

    Cheers,
    Geoff

    Thread Starter studioavanti

    (@studioavanti)

    Hi @geoffbel,

    Thanks a lot for your details.

    Good news that TEC deprecation will happen a bit later, it will give more time to debug this issue with WPML.

    I’m glad to read your analysis, here’s answers i can understand at least. ??
    I’ll give a try at your fix suggestions and will let you know.

    Also, thanks for your email, i sent you the S&F support details about the Date picker issue.

    @studioavanti

    I did not get to your email just yet, but I will. In the meantime, I had a question for you.

    Is it possible that your WordPress user is set to a different language than the one from the site? (e.g.: the site’s main language is English but your user profile is in French.)

    Just to clarify, there is technically nothing wrong with that, but we have seen issues with similar symptoms so I wanted to rule out that possibility.

    Cheers,
    Geoff

    Thread Starter studioavanti

    (@studioavanti)

    No problem, i really appreciate your interest: the default language for the site/WPML and the main Admin user (me) is french, same for all.
    I think you’re right about that possible difference triggering issues.
    Maybe it’s something like that at the strings translation level.

    • This reply was modified 3 years, 4 months ago by studioavanti.

    @studioavanti

    Thank you for that reply regarding your WPML setup.
    Let me know if the proposed patch fixes it.

    FWIW I did notice that switching views on an existing WPML installation is definitely not smooth sailing. I was not able to replicate your exact issue, but we definitely need to get to the bottom of this.

    Stay tuned!
    Geoff

    I have no idea how or why… I have the events plugin installed and working fine – set to calendar view, filling the screen etc etc. Now, when I’ve gone on today it takes up a tiny sqaure of the page and is just a dark blue box.
    I haven’t changed anything, everything is upto date and this is not good as we are doing the final checks before migrating the site.

    Thread Starter studioavanti

    (@studioavanti)

    Hello @geoffbel,

    I tested your suggestions and a bit more.

    ———————————
    1. Used some of the repair functions from WPML Troubleshooting section, none had an effect on my TEC URL issue:
    ? WPML Cache: Cleared
    ? WPML Links: not found a way to rebuilt links
    ? WPML Translatable Custom Posts Links: Linked “tribe_events” to “Events” (it was not)
    ? Clean and Optimize Strings Arrays

    Each time, i also cleared Beaver Builder Cache and re-saved WP permalinks

    ———————————
    2. Changed WP Permalinks type.

    Initially set to “Post Title”: wrong TEC URLs

    https://site.test:8890/(/?:agenda)/liste/
    https://site.test:8890/(/?:agenda)/mois/
    https://site.test:8890/(/?:agenda)/aujourd%E2%80%99hui/

    Then to “Simple”: good TEC URLs but EN doesn’t work in the site (probably WPML settings to rebuild)

    https://site.test:8890/?post_type=tribe_events&eventDisplay=list
    https://site.test:8890/?post_type=tribe_events&eventDisplay=month
    https://site.test:8890/?post_type=tribe_events&eventDisplay=day

    And back to permalinks “Post Title” again

    ———————————
    3. Added your custom code patch to Rewrite.php at the location mentioned.
    It has no effect, still the wrong TEC URLs with (/?:agenda)

    			// Use case-insensitive replace to make sure to work with some decoding using uppercase escaped chars.
    			$replaced = str_ireplace( array_keys( $replace ), $replace, $link_template );
    
    		/* BEGIN AVANTI */ 
    
    			//Add some code to the-events-calendar/common/src/Tribe/Rewrite.php starting at line 558 to strip out the extra localized values and make sure replacements happen correctly
    
    			$link_template = preg_replace(
    				'/\|[^)]+/',
    				'',
    				$link_template
    			 );
    			 $replace = array_combine(
    				array_map( static function ( $key ) {
    				   return preg_replace(
    					  '/\|[^)]+/',
    					  '',
    					  $key
    				   );
    				}, array_keys( $replace ) ),
    				$replace
    			 );
    			 
    		/* END AVANTI */ 
    
    			// Remove trailing chars.
    			$path     = rtrim( $replaced, '?$' );
    			$resolved = trailingslashit( home_url( $path ) );
    			$found = true;
    
    			break;
    		}

    @studioavanti

    Thank you for the update.
    I am not sure if you have tried these updates on a staging site.

    If you did, it would be awesome to exceptionally gain access to that site.

    For now, most users with that specific issue (or at least ab issue that has the exact same symptoms) have been able to work around the issue by heading over to User profile and setting things their language to “Site Default” (which doesn’t seem to cut it based on what you have told me).

    Geoff

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘TEC 5.8 Updated Calendar View issues’ is closed to new replies.