Presslabs
Forum Replies Created
-
Forum: Plugins
In reply to: [Toplytics] custom.template.php deleted while updatingHello @bapman,
Thank you for reporting this behavior.
I have tested this and I confirm that it happens as you described. It happens due to how WP updates the plugin, so there’s nothing we can do to fix it.
However, there is an alternative you can use right now to prevent this from happening with the next update of the plugin.
Please move the custom template to your child-theme folder and name it
toplytics-template.php
. It should be inwp-content/themes/<child-theme-slug>/toplytics-template.php
. It’s important to be a child theme, otherwise, it will be overwritten again when you update the theme. WP updates the theme similar to how it updates the plugins so unless you have a child theme it will vanish when you updated the theme as well.About child themes:
https://developer.www.ads-software.com/themes/advanced-topics/child-themes/I’ll need to update the docs for this and even remove the custom template check it does for the plugin folder itself. I’ll prepare a new release soon to include the comment updates and remove the check it does for the plugin folder itself.
Github issue: https://github.com/presslabs/toplytics/issues/162
- This reply was modified 2 years, 5 months ago by Presslabs. Reason: Add github issue
Forum: Plugins
In reply to: [Toplytics] custom.template.php deleted while updatingThank you.
I’ll run some tests and get back to you.
Forum: Plugins
In reply to: [Toplytics] custom.template.php deleted while updatingHello @bapman,
That shouldn’t happen. Let me look into this and get back to you.
Was the file located in the plugin folder or the active theme folder?
Thank you.
Hello @ralpharama ,
Thank you for your patience.
I managed to implement a solution for this, with an error threshold by default set at 20.
There is also a filter available that can change this default value if need be.
You can see the code for this here: https://github.com/presslabs/toplytics/blob/master/src/components/Backend.php#L122
Please let us know how this last version works for you.
PS: The new version v4.0.10 also includes some other fixes that I noticed while working on this issue.
Please LMK if you spot anything else that is causing any issues.
Ok. I guess we can count them in a transient or option in order to have a higher threshold for these errors?
Let me see what I can come up with.
I’ll get back to you once I have a PR ready.
Hello @ralpharama ,
Well, we could ignore that 401 error and perhaps just show an error telling the user about the error in order to reconnect?
Any suggestion on how to handle that 401 error better is welcomed.
I’ll start to work on a fix today for this issue.
Hello,
I’ve had a look at this and Toplytics will disconnect and reset all settings when there is a 401 error during the data update process. So this includes the CRON job.
Here is the code for this check:
https://github.com/presslabs/toplytics/blob/master/src/components/Backend.php#L885When this happens there is an error like
Google account disconnected. Most probably this is due to an error. Please try again.
however, this only shows once and if it’s a CRON job that failed, it wouldn’t show at all.
I’m thinking how we can handle this better and more user-friendly?
Hello @mcbeast,
I was unable to reproduce this issue on my end.
Is there any specific action you do when this happens? Or it just happens on its own?
Did you use the public or private auth method?
Forum: Plugins
In reply to: [Toplytics] Trying to configure Private authorizationHello @mcbeast ,
Thank you for the feedback. That’s very very helpful for us.
I’ll add a task and make sure to update the docs regarding the shortcode.
Thank you.
Forum: Plugins
In reply to: [Toplytics] Trying to configure Private authorizationHello @mcbeast,
Thank you for your patience.
We have tested and updated the documentation here: https://www.presslabs.com/docs/code/toplytics/installation/
Looks like you are correct. Internal works only if you have a Google Workspace account and it allows for users in that organization to login “internally”. In other cases, you should choose external.
Forum: Plugins
In reply to: [Toplytics] Trying to configure Private authorizationHello @mcbeast,
Internal should be sufficient I believe. It doesn’t need to be approved by Google as you’re the only one to use this oAuth for your own website.
We’ll add this documentation refactor to our to-do list.
Hi @ralpharama ,
Toplytics stores these in the wp_options table and uses the “toplytics_” prefix for all its option names.
Here are all the possible options related to the Authorization mechanism:
$options = [ 'toplytics_private_auth_config', 'toplytics_profile_data', 'toplytics_auth_config', 'toplytics_google_token', 'toplytics_auth_code', ];
Forum: Plugins
In reply to: [Toplytics] Google API configuration: choosing the right scopeThank you @bapman for the additional information.
I’ll add an internal task to review and update the documentation in the following sprint cycle.
Forum: Reviews
In reply to: [Toplytics] Very good!Thank you, @bapman, for the fantastic review! We’re happy that you found it helpful, and thank you for the quick tip about the WP-Cron HTTP Auth plugin. It will help for sure.