ashotaslanian
Forum Replies Created
-
hello. i had a similar problem and didn’t notice this post.
i solved it by manually adding following to the theme file:
<script type="text/javascript" src="/wp-content/plugins/catch-infinite-scroll/public/js/catch-infinite-scroll-public.js?ver=2.0.3" id="catch-infinite-scroll-js"></script>and modifying the file a bit by including the settings. you’d just need to insert following to the js file
var selector = { contentSelector: "REPLACE-WITH-YOUR-CONTENT-SELECTOR", event: "scroll", // OR click finish_text: "No more items to display", image: "/wp-content/plugins/catch-infinite-scroll/image/loader.gif", // OR relative url to your custom image itemSelector: "REPLACE-WITH-YOUR-ITEM-SELECTOR", jetpack_enabled: "false", // OR true IF YOU GOT JETPACK load_more_text: "Load More", navigationSelector: "REPLACE-WITH-NAVIGATION-CONTAINER", nextSelector: "REPLACE-WITH-LINK-TO-NEXT-POST", theme: "REPLACE-WITH-YOUR-THEME-NAME", type: "post" // this is hardcoded };i have resolved this by changing the hook from
transition_post_statustowp_after_insert_post. it did work and i havent noticed any negative side effects since.here is the patch:
From a8a48f331f07e250d543f7c5bd9d01e5592787e6 Mon Sep 17 00:00:00 2001 From: Ashot Aslanyan <10281971+ChekhWasTaken@users.noreply.github.com> Date: Mon, 13 Jun 2022 22:16:29 -0400 Subject: [PATCH] make metadata available when autoposting --- .../social-media-auto-publish/admin/publish.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/services/wordpress/dailycatchupnews.com/wp-content/plugins/social-media-auto-publish/admin/publish.php b/services/wordpress/dailycatchupnews.com/wp-content/plugins/social-media-auto-publish/admin/publish.php index 798af45a..ac296221 100644 --- a/services/wordpress/dailycatchupnews.com/wp-content/plugins/social-media-auto-publish/admin/publish.php +++ b/services/wordpress/dailycatchupnews.com/wp-content/plugins/social-media-auto-publish/admin/publish.php @@ -12,16 +12,22 @@ function xyz_link_smap_future_to_publish($post){ $postid =$post->ID; xyz_link_publish($postid); }*/ -add_action( 'transition_post_status', 'xyz_link_smap_future_to_publish', 10, 3 ); +add_action( 'wp_after_insert_post', 'xyz_link_smap_future_to_publish', 10, 4 ); + +function xyz_link_smap_future_to_publish($post_id, $post, $update, $post_before){ + + $new_status = ''; + + if (!$update) { + $new_status = 'publish'; + } -function xyz_link_smap_future_to_publish($new_status, $old_status, $post){ - if (isset($_GET['_locale']) && empty($_POST)) return ; if(!isset($GLOBALS['smap_dup_publish'])) $GLOBALS['smap_dup_publish']=array(); - $postid =$post->ID; + $postid = $post_id; $get_post_meta=get_post_meta($postid,"xyz_smap",true); // prevent duplicate publishing $post_permissin=get_option('xyz_smap_post_permission'); $post_twitter_permission=get_option('xyz_smap_twpost_permission'); -- 2.34.1Forum: Plugins
In reply to: [Redis Object Cache] Metrics: Not enough data collected yeti redeployed the website with redis 7 recently and issue seems no more.
not sure that the redis upgrade fixed it tho.
Forum: Plugins
In reply to: [Redis Object Cache] Metrics: Not enough data collected yetjust checked the diagnostics logs again:
Metrics: Enabled Metrics recorded: 0 Filesystem: Could not initialize filesystem.does this mean that something indeed flushes the cache?
Forum: Plugins
In reply to: [Redis Object Cache] Metrics: Not enough data collected yetthat’ll bezrangebyscore wp_iftehw:redis-cache:metrics 0 99999999999999999999999 WITHSCORESright?
target would be having it non nil, correct?
irrelevant. i misunderstood the reply.
- This reply was modified 3 years, 10 months ago by ashotaslanian.
Forum: Plugins
In reply to: [Redis Object Cache] Metrics: Not enough data collected yethm. this is interesting. maybe i have messed up with redis config?
how can i confirm this and if so, what should i be doing?
Forum: Plugins
In reply to: [Redis Object Cache] Metrics: Not enough data collected yetI hope I did this right. atm i am using safari, but can try from under firefox too if needed.
i have opened the web inspector navigated to
Console.here is the only error message there.
[Error] SecurityError: Blocked attempt to use history.replaceState() to change session history URL from https://mywebsitedomain/wp-admin/options-general.php?page=redis-cache#metrics to https://my.ip.add.ress/wp-admin/options-general.php?page=redis-cache#metrics. Protocols, domains, ports, usernames, and passwords must match. replaceState (options-general.php:93) Global Code (options-general.php:93)Forum: Plugins
In reply to: [Redis Object Cache] Metrics: Not enough data collected yetadblock is disabled for my domain, as well as other content blockers.
i actually dont have other cache related plugins.
Complianz | GDPR/CCPA Cookie Consent Contextual Related Posts IndexNow Redis Object Cache Social Media and Share Icons (Ultimate Social Media) Social Media Auto Publish WP Mail SMTP Yoast SEO@bruceallen i can confirm that line is not present in
wp-config.php.man, thanks for all the support, but unfortunately i have decided to move on from jetpack plugin, and come up with custom solutions to cover the missing features.
i hope this thread will be helpful for others having the same question.
thanks again for the support!
@bruceallen its a vps with google cloud.
and it always was. only tuing that was changed was instead of having a direct nginx+php-fpm, it is now apache+php behind nginx proxy.are there any special cahing rules for jetpack to work?
rest of the functionality works okay.hi @bruceallen !
thanks for the response!i actually have fail2ban running on the server. i have tried adding the ips to allowlist and re-running the jetpack debug, but still getting same results.
i have checked the links you sent and it makes sense to me although i haven’t tried this out yet.
please do mark this as resolved as i don’t want to block you guys and also the info here is enough for any other webmasters. thanks again for the help!
so you mean there is no way to setup a site-wide template for this?
jetpack has this template defined somewhere right? could you please tell me either where it is defined so i could change it at least in code or tell me which of the hooks i can use to override the message?
Are you looking to modify the format of the message that Jetpack tweets on every post publish?
Exactly. I’d like to provide a custom template/format for the tweets.
- This reply was modified 3 years, 11 months ago by ashotaslanian. Reason: formatting