• Resolved jperry02

    (@jperry02)


    We’re testing this plugin and it’s ideal for our purposes (notification of new posts in a blog for IT support staff), except for the fact that we’re having a problem with notifications of new posts if the post is made via the WordPress mobile app (https://wordpress.org/mobile/).

    Note: This blog is part of a multisite install (blogs.brynmawr.edu), if that matters.

    – Notifications work wonderfully if made from desktop, or from the mobile website.
    – Notifications will only work if made from the mobile app if the user deliberately saves the post as a draft first (this is a pretty clunky and time-consuming process, which is understandably not what our users want when they’re posting from mobile). We think the reason for this is that the plugin relies on the transition_post_status hook that goes from draft to publish. Posts from the mobile app presumably don’t get the draft status unless it’s done deliberately in the aforementioned clunky fashion.

    Has anyone else encountered this issue? Are there any other workarounds?

    We’ve noticed that another notification plugin we’ve tried uses the same hook, so presumably it’s a pretty common thing to rely on, but it doesn’t seem to work well with mobile, which I assume an increasing number of people are using to post with.

    Thanks for any assistance, and please let me know if you need any further information.

    https://wordpress.org/plugins/bnfw/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Jack – BNFW

    (@voltronik)

    Hi jperry02,
    Thanks for your message.

    I haven’t encountered anyone using the native WordPress mobile app with BNFW yet (myself included!) so haven’t looked into this before.

    Are you able to confirm that you’re using the latest version of the plugin, WordPress core and the mobile app?

    Do you know anything else about how the app posts to your website?

    Thanks,
    Jack

    Thread Starter jperry02

    (@jperry02)

    Jack,
    Thanks for the quick response!
    – We are using version 1.3 of BNFW (so it looks like we could upgrade to 1.3.2, and I’ll try to get that done).
    – We are using the latest stable release of WordPress core (4.2.2)
    – We are using the latest version of the mobile app (note: we’ve been testing in exclusively iOS thus far. We have access to Android devices if it’s worth exploring that, though as a mostly iOS shop we’re pretty interested in iOS working).

    What kind of details are you looking for about how the app posts to our site?

    Thanks,
    Juliana

    Plugin Author Jack – BNFW

    (@voltronik)

    Hi Juliana,
    Thanks. That’s all good to know.

    I think what i’m interested in knowing is if the app is storing drafts offline (within the app) or as drafts within your WordPress admin. If it’s within the app then it could be skipping some of the hooks required to trigger the notification when it gets published.

    Do you know any of the technical requirements of how the app connects to your WordPress admin? What protocols or methods?

    Thanks,
    Jack

    Thread Starter jperry02

    (@jperry02)

    Jack,
    It looks like the app stores drafts offline within itself unless you deliberately save as a draft. Which makes sense, because while using an app you would want to have the option to be able to work offline and publish later. So my guess is that it is skipping the hooks by never having that “draft” status– it’s going directly to a “publish” status.

    Any way around that to get notifications to work? If all else fails, our folks can try to remember to specifically save a draft, but obviously that’s clunky.

    I believe the app is using XML-RPC, but I’m not finding a ton of detail on their site about how it works. https://apps.wordpress.org/support/

    Plugin Author Jack – BNFW

    (@voltronik)

    Thanks jperry02,
    That’s really helpful.

    I’m going to do some investigating too and see what I come up with.
    Hopefully i’ll find a way to get this working in a future version of the plugin.

    I’ll let you know what I find.

    Jack

    Plugin Author Jack – BNFW

    (@voltronik)

    Hi,
    Just a quick update on this, i’ve opened an issue on the WordPress iOS GitHub repo in the hope that someone can answer my question on this. you can view it here: https://github.com/wordpress-mobile/WordPress-iOS/issues/4053

    I’ve taken a quick look through the source code but can’t find anything immediately obvious but then, iOS development isn’t my forte.

    Jack

    Thread Starter jperry02

    (@jperry02)

    Jack,
    Thanks for checking into this! FYI: It looks like the Android version of the app also skips this hook, based on our testing.

    -Juliana

    +1 on the Android app! Otherwise brilliant work, works as described!

    On a related note, this plugin does send a new post when it is created through the official app: https://wordpress.org/support/plugin/notify-users-e-mail

    Hope it helps! Thanks!

    Plugin Author Jack – BNFW

    (@voltronik)

    Thanks mbukovac,
    I’ll continue to investigate.

    Jack

    Plugin Author Jack – BNFW

    (@voltronik)

    Still working through this. I think i’ve found what the cause is. I’m currently working on the next update to BNFW so this may come in the one after. I’ll do my best to get it resolved in some way as soon as possible though.

    Thanks

    Plugin Author Jack – BNFW

    (@voltronik)

    Ok,
    So I finally have an update on this.

    The plugin you linked to is using a single post status transition to find posts that have been published so it triggers notifications using the app.

    As the app uses the XML-RPC API which doesn’t use post status transitions and instead inserts the post directly into the database where only the default post status transition is triggered. As BNFW needs to know the transition between statuses, e.g. ‘future_to_publish’ for Scheduled post notifications, there’s no way of getting posts to trigger notifications when using the app.

    I think the app may end up using a new API in a future version of WordPress or the WP Rest API when it’s merged into core so I may be able to revisit this later on however, for the time being, there’s really not a lot I can do.

    I hope this all makes sense and you’re happy with my response.

    Thanks again and I hope you enjoy using the plugin.
    Jack

    Thread Starter jperry02

    (@jperry02)

    Jack,
    Thanks so much for looking into this so thoroughly. I kind of expected we’d be running into limitations with XML-RPC, so I understand your response and am happy with it. Here’s hoping the WordPress app changes this in the future. We’ll try to keep an eye on that and check in with you if we hear of a change.

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

The topic ‘No notifications when posting from mobile app’ is closed to new replies.