AWOL
Forum Replies Created
-
@andreiglingeanu the latest update I ticked the last version and the new version, and this page loads – https://themes.trac.wordpress.org/changeset?reponame=&new=342442%40blocksy&old=341299%40blocksy
Tell me you can work out which files have changed from that?Thank you. I have updated Better Messages and added:
add_filter( 'better_messages_onesignal_integration', '__return_false' );I have confirmed that
sub-update.min.jsno longer loads and Better Messages is no longer assigning WordPress user IDs to OneSignal subscriptions on my site.The filter resolves the issue for my installation. I appreciate you adding and documenting it so quickly.
I am reopening this thread because the earlier “fix” did not address the underlying problem I reported.
My original report explained that Better Messages was loading and executing its OneSignal integration code on a free installation where the WebSocket push-notification feature is unavailable. I specifically asked for the code to be prevented from running unless the relevant integration was actually enabled and fully instantiated.
The original console error was:
Uncaught (in promise) TypeError: BetterMessages.getSetting is not a function /wp-content/plugins/bp-better-messages/addons/onesignal/sub-update.min.jsThat particular error disappeared after your update, so I initially assumed the underlying issue had been fixed.
It had not.
The file below is still being loaded and executed:
/wp-content/plugins/bp-better-messages/addons/onesignal/sub-update.min.jsThe Better Messages settings still state that the OneSignal plugin has been detected, the Browser Push Notifications option remains forcibly enabled and cannot be switched off, and the integration code still runs despite the fact that I do not have or use the WebSocket version.
The code in that file automatically reads the Better Messages user ID and calls the equivalent of:
OneSignal.login(Better_Messages.user_id.toString());For my WordPress administrator account, the user ID is
1.OneSignal now rejects
"1"as an External ID. The resulting API request fails with HTTP 400:{ "errors": [ { "code": "invalid-argument", "title": "Unable to create subscription: external_id is blocked, please use a different ID" } ] }This prevented OneSignal from creating a valid push subscription. The browser permission was granted and a Firefox push token was available, but OneSignal could not complete the subscription because Better Messages had automatically forced the blocked External ID
"1"into the process.I confirmed the cause by commenting out the contents of:
/addons/onesignal/sub-update.min.jsAfter clearing the browser’s stored OneSignal state and subscribing again, OneSignal immediately created a valid subscription ID and push token without error.
So the situation is now clear:
- Better Messages is still loading an integration that I do not use.
- The integration is tied to a premium feature that is unavailable in my installation.
- The setting cannot be disabled.
- The code automatically takes control of OneSignal user identification.
- It conflicts with my own standalone OneSignal implementation.
- It caused a complete failure of OneSignal subscription creation.
- My original request to prevent this addon from running in the free version was not implemented.
The previous change appears to have suppressed the
BetterMessages.getSettingexception while leaving the unwanted integration itself active. In other words, the symptom was patched while the cause was left untouched.This is not acceptable plugin behaviour. A free plugin should not silently load and execute integration code for an unavailable premium feature, particularly when that code modifies the identity state of an independently installed third-party service and cannot be disabled by the site owner.
Please implement a proper fix:
- Do not load or execute
addons/onesignal/sub-update.min.jsunless the Better Messages WebSocket OneSignal integration is genuinely enabled and licensed. - Provide a functioning setting or filter that allows site owners to disable the Better Messages OneSignal integration completely.
- Do not automatically call
OneSignal.login()merely because the standalone OneSignal plugin has been detected. - Do not assume that a raw WordPress user ID is always a valid OneSignal External ID.
I have had to patch your plugin file manually to stop Better Messages from breaking an unrelated and otherwise functioning OneSignal installation. That patch will, of course, be overwritten by every Better Messages update.
This should not be necessary, especially after the underlying issue was clearly described in the original report.
I have just checked the latest update and this situation is still the same – what happened? Now marked as Not Resolved.
@sergiuradu, thanks, marked as resolved, in anticipation.
@andrijtkachenko, many thanks. I notice that the plugin has already been updated but this update has not appeared in my dashboard, so I don’t know if this fixes the possibly related issue I have – is there any reason why the update hasn’t appeared for me yet? I am in Thailand if that makes any difference.
Hi @andrijtkachenko – I had the previous version with no issues, so no question for me it was the update that changed something that either triggered something directly, or triggered something indirectly in some kind of chain reaction. The key part is that somewhere along the line, something in your update caused this, not necessarily as the AI interpreted it though. It is entirely possible that some previously unrevealed issue in my code contributed but this sort of thing is almost impossible to track down. Your plugin may not do anything with
$wp_query, $post;variables but something was changed that impacted these somehow. Without knowing your code or the exact changes made I can’t possibly guess what that might be. So we will just have to leave it unless either other users have issues or either of us find something in our code. Just so long as you are aware of it.- This reply was modified 5 months ago by AWOL.
@andrijtkachenko ,
I appreciate your swift response, and I (perhaps foolishly) took the word of the AI that helped me fix it and actually wrote my post for me, but your plugin was the only update I did before encountering this, and where I am we have not had a WordPress update, so it did seem to be connected, even if the AI has possibly not identified the connection properly. We know that the?redirect_msg=1did not come from your plugin, and didn’t say it did – this was my code that got triggered because of the 404 error. Once that was disabled, we then investigated further; possibly something you have changed triggered the 404 error, as this was happening on a page I have the Better Messages inbox shortcode on, and it wasn’t happening anywhere else. So even if your plugin behaves as you say, something you changed triggered these things to happen, as the last update of Better Messages was the only thing that changed between no problems and these issues. I have (obviously!) the most recent version of the plugin (2.15.9), the exact url is no longer breaking due to the fixes I have had to make so is irrelevant, the other plugins/theme is also irrelevant as this ONLY happened when I updated your plugin, and the custom code has already been changed to fix this. I only posted to make you and others aware that the update caused this, not have my site analysed. If you think it was not caused by your changes, that’s up to you, but I know it was.Forum: Themes and Templates
In reply to: [Blocksy] Intermittent error appearingJust an update – I have eliminated the possibility that this is anything being caused by my custom code. I have completely deactivated my custom plugins and emptied my child theme’s
functions.php, and the error still persists on Forminator admin pages and flashes on the Customiser. Obviously turning off debug eliminates it but it is clear there is some sort of conflict going on, probably involving Forminator, because when debug is true, it is only the Customiser and Forminator admin pages showing the error.OK, I had clicked on ‘Sure’ to actually write my review originally, and was surprised that it didn’t go away when I came back to the site, and didn’t click on it (or the other button) as I neither wanted to write another review nor get help with the settings, but I tried clicking ‘Sure’ again, which brought me to the Edit page for the review, and when I went back this time the nag had gone, so not sure why it didn’t after originally writing the review? Maybe something you need to check? It is annoying when you get these nags, although I guess the star ratings influence some people, but I tend to look at how good the support is, how up to date it is, how many installs, and how many issues a plugin has rather than the rating; I actually wish WP would get rid of it because you never know if it is just mates of the author or paid for reviews, much like any other reviews on any other products/services – sorry to be so cynical!
- This reply was modified 11 months, 1 week ago by AWOL.
Forum: Plugins
In reply to: [Auto Prune Posts] Latest Update causes Fatal ErrorOK, thanks and I don’t wish to be picky, but shouldn’t that be packaged with your plugin in the first place?
Hi @tolashitta, sorry I didn’t respond earlier – I wasn’t alerted so didn’t know you had asked a question. I have moved away from Buddypress completely now, there were too many issues like this one with everything I wanted to achieve, and I have (with the help of AI) coded my own now. I hope you have found a solution.
Unfortunately I have to report that I have had to deactivate and remove your plugin entirely from my site – I don’t know what the exact cause was, but I was getting many errors on post/page edit screens, and huge spikes in CPU and Memory usage on my host, that were resolved by deactivating the plugin, and seemed particularly connected to your post query blocks, but also a number of other ones. This may have been caused in conflict with another plugin or plugins, but I had neither the time nor the inclination to look further into it to discover the exact root of it, as replacing all the blocks has delayed me enough already. I do believe though, if it is of any help, that it is connected to the number of API calls that your blocks/plugin is making, which was overwhelming my server limits (in combination with other plugins and WordPress itself). It was causing 503 errors all over the place.
I thought this might be something to do with the endpoint, so I recreated it and retested but still nothing. As there has been no response, and other similar posts have suffered a similar fate, I have given up on this plugin and found an alternative that works. And doesn’t charge a percentage. I am not marking this as resolved as it hasn’t been, but no one needs to respond now.
I have been doing some further testing with the ‘payment_page_after_payment’ hook and this doesn’t seem to be triggering anything at all – I used it with just the error_log as displayed in the documentation and there was no entry in the debug log on a Test setup, when it should be recording the transaction id and the amount. And there is still no email. The transaction is being recorded in the database and by a process of elimination I am having to assume that the transaction id is the id column in the payment_page_payments table? But the hook is not doing anything.