Tessa Watkins
Forum Replies Created
-
Thank you for your quick response! I am a hosting reseller and this website is on my account. I can confirm that mod_security is not implemented on this site.
However, I do have the Wordfence Security plugin installed and when I deactivated it, I was able to save the page then. That’s really strange. Do you know which settings within Wordfence would be a conflict? I would like to continue using both plugins.
Thank you for the quick update! Will this flag up as an automatic update of the plugin or should I update the plugin on my site manually with this changeset?
Thank you for your response. After I reverted the plugin version on our production site, the error went away, but I wasn’t able to reproduce it on the development site. Nobody was touching the site at the time the errors logged, so I’m guessing something interfered with an automated process.
I have a plan in place for updates and tests on the dev site before updating the plugin version on production. Perhaps it was just something weird that happened in the first “priming” of the pages (which I’m going to guess happens at 12am UTC) and maybe it won’t happen again.
Forum: Plugins
In reply to: [WP Crontrol] Display Next Run in Site’s TimezoneThanks! You totally didn’t have to help me debug my problem, so thank you! I am using a lot of
strtotimefor sending dates through an API and displaying dates in an email. Sometimes the timezone just isn’t set, or defaults to UTC, when called on the page vs an AJAX call vs the cron event. I’ve since replaced all of my usages of that with a call to this function. It’s not the most glamorous piece, but it’ll do for the time being. Or if I find another bug in it. Which, as we know, I probably will since I only wrote it in a few hours lol. I’m more or less posting it here in case somebody with a similar issue comes across this thread (replacingprefixwith whatever, and placed in theme’s functions.php file).function prefix_strtotime($time = 'now', $now = false, $timezone = false) { if ($now === false) { //If relative date isn't specified, default to now $now = time(); } $date_offset = intval(date('Z')); //Returns an integer value like -14400 to use in timestamp offsets $wp_offset = get_option('gmt_offset') * 3600; //Returns a float value like (-4), multiply it by 3600 seconds per hour to use in timestamp offsets if ($date_offset != $wp_offset) { //The timezone is not set, so set it and fix it date_default_timezone_set(get_option('timezone_string')); $timestamp = strtotime($time, $now); if ($timezone === false) { //Modify the timestamp with WordPress timezone offset $timestamp += $wp_offset; } elseif (is_int($timezone)) { //Modify the timestamp with the passed offset $timestamp += $timezone; } } else { //Timezone offsets are the same, no need to bother with converting $timestamp = strtotime($time, $now); if( is_int( $timezone ) ) { //But a timezone offset was specified, so figure out the diff and then modify it back $timestamp -= ($timezone - $wp_offset); } } return $timestamp; }And for my usage:
date('m/d/Y g:i:s A T', fc_strtotime());//Displays current time in WordPress's timezone date('m/d/Y g:i:s A T', fc_strtotime('2020-05-04 17:00:00', false))//Displays this time as if it was WordPress's timezone date('m/d/Y g:i:s A T', fc_strtotime('2020-05-04 17:00:00', false, 0))//Assumes this time is set in WordPress's timezone, and displays it in UTC- This reply was modified 6 years, 1 month ago by Tessa Watkins.
- This reply was modified 6 years, 1 month ago by Tessa Watkins.
Forum: Plugins
In reply to: [WP Crontrol] Display Next Run in Site’s TimezoneYes! In my site’s health dashboard, it indeed has the message PHP default timezone is invalid
PHP default timezone was changed after WordPress loading by a
date_default_timezone_set()function call. This interferes with correct calculations of dates and times.I know exactly where I was calling it since it’s a feature I just built for my client to send automated weekly generated email reports (hence the heavy use of your plugin for this particular project). I commented it out and all is now well in the world 🙂
The bottom of the cron events page says this:
Site time: 2020-05-04 12:53:52 (America/New York, UTC-4)And an hourly event says this:
2020-05-04 13:12:58 19 minutes 6 secondsAnd
13:12is indeed 19 minutes away 😉If the times in the generated report don’t match up, well… I’ll figure out that part when the time comes lol. Thank you!
- This reply was modified 6 years, 1 month ago by Tessa Watkins.
Forum: Plugins
In reply to: [WP Crontrol] Display Next Run in Site’s TimezoneI’m using WordPress version 5.4. In my site’s general settings, it’s set to
New Yorkand says this:
Universal time is 2020-04-30 00:30:06. Local time is 2020-04-29 20:30:06.The “Site time” at the bottom of the cron events page says this:
Site time: 2020-04-29 20:31:39 (America/New York, UTC-4)So yes, that indeed matches my site’s timezone settings. However, one of the hourly cron events I have running says this in the “Next Run” column:
2020-04-29 16:38:41 7 minutes 3 secondsAs we just discovered, it should display
20:38for the time, not16:38. This just might be my personal preference though. It’s certainly not a deal breaker for me as I’ll continue to use your plugin for all my cron managing needs, haha.Edited: Though, I just realized that if it was displaying in actual UTC in the “Next Run” column, then it should be
00:38if the next run is in 7 minutes (as of the time I copied/pasted), so16:38is still wrong. Maths in the wrong direction!- This reply was modified 6 years, 1 month ago by Tessa Watkins.
Forum: Plugins
In reply to: [WP Crontrol] Display Next Run in Site’s TimezoneThank you for replying! I believe I am. The plugin version I have is 1.8.2.
The timezone is even mentioned in the label in the UI as seen in my screenshot here: https://ibb.co/y6vNzt0
Forum: Plugins
In reply to: [Contact Form 7] Contact form 7 Feedback 500 errorDo you have WP_DEBUG set to true? It’s possible that your AJAX calls are getting prepended with debugging information, messing up the response that’s expecting valid JSON.
Check out this question from StackOverflow to see if it’s similar to what you’re dealing with.
@erikvdhorst I assume you mean after they submit the login form (and successfully log in), because otherwise you don’t know if they’re an admin or not. The “login_init” hook fires when the login form is initialised, so to redirect the user after they submit the form and log in, you can use something like this in your active theme’s functions.php file:
add_filter( 'login_redirect', 'prefix_login_redirect', 10, 3 ); function prefix_login_redirect( $redirect_to, $request, $user ) { //If we are viewing the account page, redirect to it after logging in if( strpos( $redirect_to, 'account' ) !== false ) { //If user is an administrator, redirect to WordPress dashboard if( isset( $user->roles ) && is_array( $user->roles ) && in_array( 'administrator', $user->roles ) ) { return '/wp-admin/'; } return esc_url( home_url( '/account/' ) );//Otherwise, redirect to account page } return $redirect_to;//Redirect to current page after logging in }Alternatively, you can check capabilities instead of roles on line 6 of my snippet if you’d rather:
if( current_user_can('administrator') )@motivmedia haha, it’s exactly the same (I even copied/pasted the title and tags!!), but @amboutwe said to open a new one because they “resolved” your request by using a virtual URL instead. And since she’s the support, I’ll do it if it means it gets resolved in the way we want.
- This reply was modified 6 years, 7 months ago by Tessa Watkins.
I opened a new request here.
Forum: Plugins
In reply to: [Timely All-in-One Events Calendar] The link you followed has expired.@scallemang I managed to get it fixed for my client’s site at least. Not sure what the cause was exactly, but I think it had something to do with the Timely Network account and the All-in-One Event Calendar Extended Views by Time.ly addon plugin we are using.
I first disabled the addon plugin, and then went to Events > Settings in the admin sidebar, and logged out of the Timely Network account and back in again. It seems to have resolved the “expired link” error, but then having the extended views plugin activated seems to cause issues out of the blue.
- This reply was modified 6 years, 7 months ago by Tessa Watkins.
- This reply was modified 6 years, 7 months ago by Tessa Watkins.
Forum: Plugins
In reply to: [Timely All-in-One Events Calendar] The link you followed has expired.I’m having the same issue and that post you linked to didn’t help either.
I appreciate your response, @amboutwe, but the solution we wanted wasn’t to replace a 404 page with a virtual URL. It’s to omit it entirely.
I can open a separate ticket for your convenience, but the problem is exactly what is already described here.
This ticket is marked as resolved, yet I still have author data appearing in the schema when I have author archives disabled. I too don’t want any author schema whatsoever.