• Resolved duttoluca

    (@duttoluca)


    Hello, I have a multisite with several blogs.
    In one of those blog (let’s call it blog_x), where WP Telegram is not enabled, I have a function that retrieves some data every night (using the scheduler in wp) and create posts using wp_insert_post.

    In other blogs (blog_y for example) I have WP Telegram installed and configured with autopost.

    My problem is: when the nightly task in blog_x runs and the new posts are created, they are sent via Telegram in the blog_y channel.
    The posts are correctly created in blog_x, no reference to blog_y and such, everything is fine, but then are fired by a different blog/channel.

    I have the logs from your plugin, if they could help…

    Any help?
    Thanks

    • This topic was modified 9 months, 1 week ago by duttoluca.
    • This topic was modified 9 months, 1 week ago by duttoluca.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Irshad Ahmad

    (@irshadahmad21)

    Thank you for reaching out. This seems to be an interesting problem to solve.

    I have the logs from your plugin, if they could help…

    Yes, please share those with our support on Telegram – @WPTelegramSupport.

    Once we check the logs, we will get back to you here on the public forum.

    Thread Starter duttoluca

    (@duttoluca)

    Hi @irshadahmad21 . My colleague sent logs and infos to your support channel on Telegram, thank you very much for your help.

    Plugin Author Irshad Ahmad

    (@irshadahmad21)

    Hello,

    It seems like something is wrong with the cron system on your multisite install.

    Can you please sent the delay in posting in Post to Telegram settings to 0 and then try again to see if it still posts on the wrong site?

    Thread Starter duttoluca

    (@duttoluca)

    Hi @irshadahmad21

    Delay is already set to 0 wherever the wp telegram plugin is enabled.

    As a temporary workaround we disabled everywhere the “autopost on new article” flag, and it worked…
    But we’d like to enable it again.

    If you have any suggestion, or need more infos (logs, code…) let me know

    Plugin Author Irshad Ahmad

    (@irshadahmad21)

    Does your code correctly use switch_to_blog when using wp_insert_post?

    If you could share the code with us where you shared the logs, it would help us replicate the issue on our side.

    Thread Starter duttoluca

    (@duttoluca)

    Yep, we use switch_to_blog before doing the inserts…

    I’ll share the code with you ASAP, thank you

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Problem with posts generated via wp_insert_post in multisite’ is closed to new replies.