nitrospectide
Forum Replies Created
-
Forum: Plugins
In reply to: [Admin and Site Enhancements (ASE)] SMTP is not workingI am experiencing a failure with Gmail. My site was sending emails fine with fluentSMTP, but when I use the same settings in ASE, I get this in my PHP error log:
[15-Nov-2024 21:14:37 UTC] SMTP INBOUND: “534-5.7.9 Application-specific password required. For more information, go to”
[15-Nov-2024 21:14:37 UTC] SMTP INBOUND: “534 5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor d75a77b69052e-4635ab5d1f5sm23964201cf.74 – gsmtp”
[15-Nov-2024 21:14:37 UTC] SERVER -> CLIENT: 534-5.7.9 Application-specific password required. For more information, go to
534 5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor d75a77b69052e-4635ab5d1f5sm23964201cf.74 – gsmtp[15-Nov-2024 21:14:37 UTC] SMTP ERROR: Password command failed: 534-5.7.9 Application-specific password required. For more information, go to
534 5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor d75a77b69052e-4635ab5d1f5sm23964201cf.74 – gsmtpIt appears that a recent release has resolved my issue. Thanks for the fix. I did not realize it for a while since there was no reply on this ticket.
Does AAM work with WP Bakery for you?
Yet another puzzling update on this. I ran into the same issue when editing the permalink on a page. So I turned off revisions for pages, and that fixed it. Then today, out of curiosity, I turned revisions back on for both events and pages. Now, testing on the exact same event and page as before, the same edit no longer triggers the issue.
I’m stumped, but at least it is working. I mention it just for completeness, and in case the information might be useful.
Do you have any thoughts based on what I wrote?
All the same. I’m puzzled.
Both are running PHP 8.2.
Yes. The test site is a duplicate of yesterday’s live site backup – so everything is identical.
Well now I’m baffled. I ran off a test site, checked this, and the glitch doesn’t happen there. Both sites are on the same host, same environment.
I will need to spin up a dev copy of my site, so I can test this and get back to you.
The ACF field that causes this glitch is:
Text field / Field Name: id / No validation or conditional logic / all other settings: default
It’s inside a group with Field Name: booth_info
That’s the interesting bit. We are not using the Pro version. I am not trying to create a revision on an ACF value. I just have your free version installed, and it has been used to create revisions on some of our posts – the main content – not ACFs. But our problem is that on this one post type, we ran into this strange situation where simply changing the value of this one ACF (no other ACFs on this post cause the problem) makes the Update button disappear, and it will only let us schedule a revision.
After some more digging, I was able to find a solution. I do wonder though if there is much of a performance hit due to this running on all core/html blocks?
My shortcode call in an HTML block now looks like: [link_buttons post_id=”{{post_id}}”]
And the function that replaces that {{post_id}} token with the actual post ID is:
function query_loop_id_render($block_content, $block) {
if ($block['blockName'] === 'core/html') {
$block_content = str_replace("{{post_id}}", get_the_ID(), $block_content);
}
return $block_content;
}
add_filter('render_block', 'query_loop_id_render', 10, 2);And now my shortcode is updated to:
/*
================================================================================
== SHORTCODE: Output Link Buttons
================================================================================
*/
function shrt_link_buttons( $atts ) {
$theTitle = get_the_title($atts['post_id']);
$theLink = get_the_permalink($atts['post_id']);
$content = "";
$content .= '<div class="btn-cta">
<a class="btn" href="'. $theLink .'">
See Details >
</a>
<a class="btn" href="/get-property-showing?property='. $theTitle .'">
See in Person >
</a>
</div>';
return $content;
}
add_shortcode( 'link_buttons', 'shrt_link_buttons');Credit to this comment: https://www.ads-software.com/support/topic/query-loop-posts-in-gutenberg/#post-17758832
- This reply was modified 3 months, 2 weeks ago by nitrospectide.
- This reply was modified 3 months, 2 weeks ago by nitrospectide.
What I currently have is this in my functions.php
/*
================================================================================
== SHORTCODE: Output Link Buttons
================================================================================
*/
function shrt_link_buttons( $atts ) {
$theTitle = get_the_title();
$theLink = get_the_permalink();
$content = "";
$content .= '<div class="btn-cta">
<a class="btn" href="'. $theLink .'">
See Details >
</a>
<a class="btn" href="/get-property-showing?property='. $theTitle .'">
See in Person >
</a>
</div>';
return $content;
}
add_shortcode( 'link_buttons', 'shrt_link_buttons');What it looks like that example you linked is doing, is targeting 3 block types, and running any shortcodes used in them through this to create the proper context for targeting the data retrieval. But the particulars of what it is doing to accomplish that are completely opaque to me. Do I need everything in that example? Does it need to be a class like the way it’s set up? Does that mean it needs to be a completely independent plugin to work properly? (No use in functions.php or combining with existing custom plugin that is just procedural functions?)
I can make a simple shortcode, but how would I implement that render_block solution in my shortcode?