justinmaurerdotdev
Forum Replies Created
-
Forum: Plugins
In reply to: [Co-Authors Plus] Where is the changelog?+1 to this. The Co-Authors Plus integration is crucial to our site and we need to know what functionality to review after updates. Please 🙏🙏 add a changelog, or link to one!
OK, thanks. I would think there would be an easier way to keep track of episodes, rather than querying the whole posts table, then checking meta entries for each of the posts. Couldn’t you just query the meta table directly for the enclosure keys?
Also, to get the most recent, you could probably do it much more safely with a pagination loop. I.e. grab posts 500 or 1000 at a time, break when the first enclosure is found.
Also, the get_terms() call I mentioned is actually a much more serious issue. I don’t know what the solution is, because that if statement already looks like a bit of a hack, but my patch for it is to completely remove that block. Hopefully that’ll get looked at in the next update as well.
Forum: Plugins
In reply to: [HyperDB] PHP 7.3 compatibilityNot sure if this is a good place to mention this, but I just reported another PHP 7.3 compatibility issue on Trac. https://plugins.trac.wordpress.org/ticket/2860#ticket
Forum: Plugins
In reply to: [AMP] Whitelisting the Validator for HTTP AuthenticationInteresting. I assumed that the failed validation was preventing the AMP components…
I’ll move forward treating them as two separate issues and assume that the components failing is some issue with my implementation. In reference to the internal validation reporting, is there fixed IP range or some other way to whitelist the validators?
Forum: Plugins
In reply to: [CMB2] User fields showing previous registrant's infoOkay, you know what. Updating the CMB2 code to the newest version seems to have solved my issue. I’m going to RE-mark this as “resolved”. If anyone else has this problem, update CMB2.
Forum: Plugins
In reply to: [CMB2] User fields showing previous registrant's infoUPDATE: Here are a few facts/clues that I’ve gathered. Do with them what you will.
1) The issue started on my local dev environment. After migration to the production server, the issue is still present. For example the file upload field on the production server still shows the original file path “//localhost:3000/wp-content/uploads/2015/04/450×350.gif” from when I tried to do this while running browser-sync.
2) These values are NOT in the database. A search of the entire database for “localhost:3000” returns no results. A search for the phone number and email only show matches in the origin user I created with these values (for myself).
3) I don’t have any caching plugins installed.Also, it seems that I’m not the only one reporting this problem.
https://github.com/WebDevStudios/CMB2/issues/201Forum: Plugins
In reply to: [CMB2] User fields showing previous registrant's infoHi Michael,
It’s been a while since I looked at this issue, obviously, but it is still bugging me, and now I have time to fix it.The fields in question are a phone number (text) field and a profile image (file upload) field. Every time I go use this page, the very first phone number/file path I ever entered into the field is automatically populated. I’m assuming I shouldn’t need to set an empty string as the default here.
I THINK I’m having the same issue (where it’s bringing up an old value rather than the actual default) with a couple of select fields as well, but it’s hard to tell if it’s the same problem.
Is there any way to clear these values from the memory of these fields? Why could this be happening?
Thanks in advance for any help on this!
Forum: Fixing WordPress
In reply to: Page template body class not working after updates@digico, I’ve checked, and I don’t see any broken or duplicated classes. Thanks for the suggestion though.
Forum: Fixing WordPress
In reply to: Page template body class not working after updatesI think I may have a solution here, but I’d still like some input.
I can’t say I completely understand why some templates are behaving differently from others, but here’s what I’ve figured out.
When using a custom template (assigned on the Page editing screen), WordPress generates a body class in this format: page-template-{directory}{filename}-php. Our styling is based on this format: page-template-{filename}-php. All of our page templates are stored within a /pages directory, so the class generated doesn’t match the class we’ve used for styling (BUT ONLY ON 2 PAGES?!). On all other pages, WP seems to be generating the wrong classes based on our file structure (page-template-{filename}-php w/o the directory name)
So, I see two possible solutions.
1) Move all templates (or at least the offending ones) from /pages/ to the root folder of the theme. Each template will need to be reassigned on the page edit screen.
2) Add the correct classes to all css for the current setup. So, where ‘.page-template-my-template-php’ appears, we would add ‘.page-template-pagesmy-template-php’ (and ideally add that format for every other page-template class).Like I said, I’m still trying to wrap my head around why some of them behave one way and others behave another way, but I’m almost positive the above fix will solve our issue. I like option 1 better, as it doesn’t require code changes, just a file structure change and some WP admin work.
Any thoughts about why this behavior seems inconsistent in WordPress?
Forum: Plugins
In reply to: [CMB2] Trouble with Theme Options pageHey Justin, thanks for taking a look at this. I’ve tried a few different things, but currently just have exactly what’s provided in the example code.
Forum: Hacks
In reply to: Need ideas for HTTPS multiple domain solutionSolved this. I just needed to scrap the plugin and use the following code in my htaccess…AND switch my site/home URL to https://. But, now we’re all good.
Here’s what I used, in case anyone else has this issue:
# BEGIN HTTPS REDIRECT <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] </IfModule> # END HTTPS REDIRECTForum: Plugins
In reply to: [WordPress HTTPS (SSL)] Need ideas for multiple domain solutionSolved this. I just needed to scrap the plugin and use the following code in my htaccess…AND switch my site/home URL to https://. But, now we’re all good.
Here’s what I used, in case anyone else has this issue:
# BEGIN HTTPS REDIRECT <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] </IfModule> # END HTTPS REDIRECTForum: Hacks
In reply to: Another get_pages() questionOkay, I’ve solved it. I finally found this ticket where someone had the same problem. Ideally, you would is is_front_page() to handle the home page separately, but is_front_page() doesn’t work with the pre_get_posts hook. Instead, we can use this to get around that conditional:
if ( $query->get('page_id') == get_option('page_on_front') )So, my code ended up being this:
if ( $query->is_main_query() && !is_admin() && is_page() ) { if ($query->get('page_id') == get_option('page_on_front')){ $id = get_option('page_on_front'); } else { $id = get_queried_object_id(); } if( $sitechild = site_child($id) ) { $query->query_vars['page_id'] = $sitechild; } }Marking as resolved. Just wanted to leave this there in case anyone else is struggling with this like I was.
Forum: Hacks
In reply to: Trouble using get_pages with pre_get_posts hookOkay. I’ve got one last question on this topic (having trouble with this on the home page), but have asked it in a new thread. Any input would be much appreciated.
Forum: Hacks
In reply to: Trouble using get_pages with pre_get_posts hookOkay cool. Good to know. Thanks for clearing that up. Marking as resolved.