John Russell
Forum Replies Created
-
Forum: Plugins
In reply to: [Redis Object Cache] Scheduled Posts Return 404I hadn’t yet, but I did just try using W3 Total Cache as an alternative and ran into the same problem with their Object Cache using Redis. It’s worth noting that it seems random but sometimes opening the post in the editor (after it’s been automatically published) the post slug has been emptied.
When you say “setup” are you referring to our server config of Redis or just WordPress in general?
Any ideas on troubleshooting? I’m our lead developer and a willing to do some troubleshooting/debugging to try to figure out what’s causing this.
My temporary solution was to enqueue my own js file that supplements the event-editor.js file (and shouldn’t interfere once EM gets updated, if I forget to remove this js). I enqueued it in my must-use plugins, but you can enqueue it in your theme functions.php file or a custom plugin. You’ll have to adapt the way you enqueue the js file by changing the URL.
function custom_prefix_admin_enqueue_scripts($hook_suffix = '') {
if( $hook_suffix == 'post.php' || $hook_suffix === true || (!empty($_GET['page']) && substr($_GET['page'],0,14) == 'events-manager') || (!empty($_GET['post_type']) && in_array($_GET['post_type'], array(EM_POST_TYPE_EVENT,EM_POST_TYPE_LOCATION,'event-recurring'))) ){
wp_enqueue_script('custom-prefix-events-editor', plugins_url('js/custom-prefix-events-editor.js', __FILE__), array(), '1.0.0');
}
}
add_action('admin_enqueue_scripts', 'custom_prefix_admin_enqueue_scripts');This is the JS
class CustomPrefixEventsEditor {
constructor() {
this.eventType = null;
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', this.DOMContentLoadedListener.bind(this));
} else {
this.DOMContentLoadedListener();
}
}
DOMContentLoadedListener(event) {
this.init();
}
eventTypeChangeListener(event) {
this.maybeToggleRecurrencesBox();
}
init() {
this.eventType = document.querySelector('.event_type');
this.eventType.addEventListener('change', this.eventTypeChangeListener.bind(this));
this.maybeToggleRecurrencesBox();
}
/**
* As of EM 7.0.5 the Recurrences Meta Box is hidden because the new /includes/js/src/parts/event-editor.js isn't compatible with the Block Editor
*/
maybeToggleRecurrencesBox() {
let isRecurring = false;
// Specifically targetting the Block Editor ".metabox-location-normal" (under the content) since EM omit this
let blockEditorMetaBoxForm = document.querySelector('.metabox-location-normal');
if (blockEditorMetaBoxForm) {
isRecurring = this.eventType.type === 'checkbox' ? this.eventType.checked : this.eventType.value !== 'single';
blockEditorMetaBoxForm.classList.toggle( 'em-is-recurring', isRecurring );
if (this.eventType.type === 'checkbox') {
blockEditorMetaBoxForm.classList.toggle('em-type-recurring', eventType.checked );
}
blockEditorMetaBoxForm.classList.remove( ...[ ...blockEditorMetaBoxForm.classList ].filter(className => className.startsWith( 'em-type-' )));
blockEditorMetaBoxForm.classList.add('em-type-' + eventType.value);
}
}
}
new CustomPrefixEventsEditor();Thanks for the solution. Though, it seems that the new code in classes/em-object.php (added in v6.4.7) lines 1124 through 1127 where the $page_args_escaped variable is set/urlencoded is unnecessary because line 1128 uses em_add_get_params and that function is already urlencoding all of the values (the $encode parameter defaults to true), thus it’s being urlencoded twice (which is why we see %2525PAGE%2525 and then em-functions.php em_paginate doesn’t work because the placeholder is incorrect).
Hoping for a fix with the next version.
Forum: Plugins
In reply to: [Antispam Bee] Comment Form Accessibility IssueHi @zodiac1978
Thanks for your response. I didn’t know the purpose of the additional textarea, so thank you for clarifying.
My initial concern was that even though it doesn’t need to be accessible there is nothing informing assistive technology of this. However, it’s not keyboard navigable, so that shouldn’t ever be an issue. I think for our purposes we will filter the output to add the aria-label attribute just so it doesn’t continue to get flagged as an accessibility issue.
Thanks again and have a great day!
John- This reply was modified 6 years, 7 months ago by John Russell.
Forum: Plugins
In reply to: [Antispam Bee] Comment Form Accessibility IssueI meant for the aria-label to actually just be
aria-label="Comment"for it to be consistent with the default WordPress comment field label.The problem is with the comment_form and that it renders two
<textarea>elements on my single posts and the one that’s added by Antispam Bee doesn’t have a proper label, for accessibility.https://www.w3.org/WAI/WCAG21/quickref/?versions=2.0&showtechniques=131#info-and-relationships
- This reply was modified 6 years, 8 months ago by John Russell.
Forum: Plugins
In reply to: [National Weather Service Alerts] Don’t abandonHi, wafwaf.
Unfortunately I haven’t had as much time to put into this plugin as I’d prefer, however I still make updates to fix anything that would otherwise be broken due to WordPress updates or NWS API updates. That said I’ve also put dozens of hours into a complete rewrite of the plugin (of which I plan to include a custom Gutenberg block for adding alerts to pages/posts) I just haven’t had the time to finalize the new version and fix all bugs. At any rate, I’ve not abandoned it and do still plan to release updates.
Thanks for your interest!
JohnForum: Plugins
In reply to: [National Weather Service Alerts] Display Multiple AlertsHi, sejb.
In the current version the basic and bar layouts do no support showing more than one alert at a time.
If you’re able to use another layout the list layout will show all alerts (unless you set a limit) without needing to hover or scroll.
Alternatively you can create your own layouts/templates. Check out the reference on the github page: https://github.com/laubsterboy/national-weather-service-alerts
John
Forum: Plugins
In reply to: [National Weather Service Alerts] Data ErrorHi, @wingy1742, it does appear that “St. Croix County” isn’t properly found, however you can simply omit the city, state, and county and just use the zipcode. I’ll add this as an bug and look into what’s causing the problem.
Thanks!
Forum: Plugins
In reply to: [National Weather Service Alerts] Data ErrorThanks for letting me know that it fixed the problem. I’m going to mark this as resolved.
John
Forum: Plugins
In reply to: [National Weather Service Alerts] Data ErrorThank you for reporting this. The National Weather Service is in the process of updating their alerting system and the MIME type for the alerts feed that is used by the plugin changed from rss+xml to atom+xml.
I’ve updated the plugin to allow for either type. Please update the plugin on your site and let me know if you’re still having problems.
Thanks,
JohnThe current feed data from NWS only provides an event summary. The NWS is in the process of updating to a new REST API that provides additional information and is easier to work with so this will be a possibility, but I’ll need to update the plugin in order to utilize this new API. I have no timeline for when this may take place. I have already done a lot of the work to integrate the new API, but there are sweeping changes to the plugin as a whole that must be quality checked prior to any release.
Forum: Plugins
In reply to: [National Weather Service Alerts] The plugin does not have a valid headerGraphicMemory and thebark, are you able to install and activate any other plugins?
The likely culprit is another plugin and reinstalling all of them should fix the problem.
Forum: Plugins
In reply to: [National Weather Service Alerts] The plugin does not have a valid headerHi, thebark. Would you be willing to provide a list of plugins that you have installed and activated? I can then test those plugins on my own server. The biggest problem I’m running into is that I can’t, yet, replicate the issue so I’m not able to fix the problem.
Forum: Plugins
In reply to: [National Weather Service Alerts] The plugin does not have a valid headerHi, GraphicMemory.
This is the first time this problem has come up with the plugin, so would you be able to share which version of WordPress you have installed, as well as which other plugins are installed?
Otherwise, I would try temporarily deactivating all other plugins and then see if you can activate it, as another plugin could be causing this. If that doesn’t work, please try enabling one of the WordPress themes, such as Twenty Seventeen, while all other plugins are deactivated still, and then see if you can activate it. This will either eliminate or confirm that another plugin or theme is causing the problem.
Thanks,
JohnForum: Plugins
In reply to: [WP Super Cache] GC not working any moreThere seems to be something wrong with the plugin that’s causing this, but for now I fixed it by adding this (as a mu-plugin) to my site:
function my_wp_cache_gc_cron() { global $blog_cache_dir, $cache_path; $blog_cache_dir = $cache_path . 'supercache/' . $_SERVER['HTTP_HOST'] . '/'; } add_action('wp_cache_gc','my_wp_cache_gc_cron', 1);