dbacksbst
Forum Replies Created
-
Forum: Plugins
In reply to: [The Events Calendar] has_term() fails on recurring eventsUpdate: This only seems to apply on archive views (i.e. month), where TEC generates a fake ID for the event posts that are displayed (e.g., 10000001, 10000002, etc.).
- This reply was modified 1 year, 2 months ago by dbacksbst.
Forum: Plugins
In reply to: [The Events Calendar] Redirect from Events Calendar page not working (part 2)Hi Darian,
Your suggestion fixed the issue, thanks! However,
'not-authorized'
is a page slug, and I use it in redirects elsewhere without issue, so I am still confused about why it doesn’t work here. Do you have an explanation?Forum: Plugins
In reply to: [The Events Calendar] Redirect from Events Calendar page not working (part 2)- PHP: 7.4
- WordPress: 6.1.1
- The Events Calendar:
- TEC: 6.0.6.2
- TEC Pro: 6.0.5.1
- TEC Filter Bar: 5.4.1
- Theme: Custom
Code:
add_filter('pre_get_posts', 'my_restrict_events', 100); function my_restrict_events($query) { if (!$query->is_main_query() || !$query->get('eventDisplay')) { return; } // The result is the same even if this block is commented out. $current_user = wp_get_current_user(); if (is_user_allowed($current_user)) { return; } // Redirect! wp_safe_redirect('not-authorized'); exit; }
Forum: Plugins
In reply to: [The Events Calendar] Redirect from Events Calendar page not working (part 2)Hi Darian,
I just tried using
pre_get_posts
with priority 100, but the result is still the same. As an aside, all of my other pages were (and still are) redirecting properly before any changes.Forum: Plugins
In reply to: [The Events Calendar] Redirect from Events Calendar page not working (part 2)Hello Jean,
I tried your suggestion, and it looks like the filter
tribe_events_pre_get_posts
is never called when the events calendar page is loaded (https://mydomain.com/events/month), so the redirect function is not triggered.I also tried the suggested “Additional precaution” which uses the
posts_where
filter, which did hide all the events from the calendar, but the calendar page itself still loaded.Is there a different filter you could suggest?
Thanks,
MarieI’d rather not post it publicly, is there a way I can send you the link privately?
Hi @jarnovos
Noticed the issue was marked as resolved, but it is not. No worries, I suspect this was because it took me a while to reply over the holiday break. I set it back to unresolved and tagged you so we can continue our discussion.
Hi @jarnovos
I have tried adding
cache_redirect=true
, but the same behavior occurs. The first time I load the page, it loads normally. After I click the placeholder link and any time I visit the same page afterwards, it infinitely refreshes. With thecache_redirect
option, I can see the URL switching back and forth between the original page URL and the URL ending in?cmplz_consent=1L#cmplz_consent_area_anchor
.Forum: Plugins
In reply to: [The Events Calendar] Composer dependency conflictsI have encountered this issue as well (specifically conflicts with the old version of monolog). Are there plans to resolve this issue?
Forum: Plugins
In reply to: [AlertMe! – Post Update Notifications to Subscribers] jQuery is not definedThere is probably a better place to report this, but just wanted to let you know about one more bug I found. The subscribe form for logged in users always uses the default header instead of the one defined in the AlertMe Settings. The offending code is on line 114 in
alertme-frontend.php
:<?php echo ((isset($options['alert_me_form_heading_text']) && $options['alert_me_form_heading_text'] = '') ? $options['alert_me_form_heading_text'] : $alert_me_form_heading_text ); ?>
The second condition in the if-statement should use != (or even !==), like so:
<?php echo ((isset($options['alert_me_form_heading_text']) && $options['alert_me_form_heading_text'] != '') ? $options['alert_me_form_heading_text'] : $alert_me_form_heading_text ); ?>
Forum: Plugins
In reply to: [AlertMe! – Post Update Notifications to Subscribers] jQuery is not definedUPDATE: I actually DO receive update notification emails after subscribing! It turns out another plugin I was using was intercepting them before they got to my inbox. So my fix above appears to be working.
I still think an initial “subscription confirmation” email should be sent when a user first subscribes, even if they are already logged into WordPress.
Also found an unrelated bug on
alertme-admin.php
line 167:$html .= '<select name="alert_me_position">';
should be changed to
$html = '<select name="alert_me_position">';
because $html has not been defined yet. This was causing an error message to appear next to the “Placement of Alert Me Box” field in the AlertMe Subscribe Box Settings form.
Forum: Plugins
In reply to: [AlertMe! – Post Update Notifications to Subscribers] jQuery is not definedI was able to get rid of the error in alertme.js by replacing
jQuery(document).ready()
with this:var callback = function() {...} if ( document.readyState === "complete" || (document.readyState !== "loading" && !document.documentElement.doScroll)) { callback(); } else { document.addEventListener("DOMContentLoaded", callback); }
Now when I check the subscribe box, I get a success message on the page, and my Subscriptions on the “Manage Subscriptions” page are properly updated.
HOWEVER, when I check the subscribe box, I do not receive a confirmation email. Also, when the page is updated (with the “Send Update Notification box checked), I do not receive an update notification email.
- This reply was modified 4 years, 1 month ago by dbacksbst.