Beta 6 & Google Perspective API Plugin

After updating to v2.3.0.beta6 +1 we were getting hanging on some posts. The post is saved but can’t be published, with no reason why (no warning or anything).

We narrowed it down to the discourse-perspective plugin and after turning off everything went back to normal.

Here is a screenshot of the network activity when trying post:


We should probably check this @sam, who can take a look?


Yes this is broken at the moment @Roman_Rizzi this was originally assigned to @techAPJ but I feel it is a bit urgent to sort out and Arpit is very busy.

Can you fast track fixing this? It should in theory be simpler than the fixes needed to akismet.


@sam I don’t think that this issue is related to the new reviewable API. This plugin interacts with the deprecated but still functional PostAction class.

On the other hand, I just tested this plugin and it works (it detects toxicity and raises a warning)

Versions that I tested against:

  • v2.3.0.beta6 +35
  • v2.3.0.beta6 +1

@wadestriebel Can you confirm that the issue persists? If so, would you mind sharing some logs to see if something went wrong on the back-end side?


The issue is still happening after re-enabling the plugin.

I cleared the logs prior to re-enabling and this is the only warning shown after trying to post:

We’re having trouble reproducing this, so we’re not sure how much more help we can be.


We upgraded to v2.3.0.beta6 +39 and are still seeing the issue. So, I will try a rebuild and see if that fixes anything.

Thanks for your help.


Did a rebuild but we are still having issues with a specific post (all other posts seem fine and perspective is working as expected).

Here is the post we are having issues with:

[quote="MrLucky, post:6, topic:1027"]
* Plugin no longer works with CP
* Don't panic, migrate back to WP (presumably 4.9)
* Find the same plugin no longer works with WP 4.9
* Panic and upgrade to WP 5.whatever and have to put up with it :frowning:
* Regret that, live without the plugin, and wonder if from 5.whatever I can migrate back to CP ???

I wouldn't recommend the "panic" part (backups help with this), but otherwise none of these steps should present any problems.

And as Tim says, it's important to share problems and solutions within the CP community, because this is another thing that will ensure our long-term success.


Thanks, @wadestriebel!

I just tested that post and can confirm there’s an issue there. I Will keep you posted on what I found and how can we fix it :+1:


I have posted a fix for this in the Google Perspective plugin repo: Encode posted content, fixes issue with ??? interpreted as JS · discourse/discourse-perspective-api@783daa2 · GitHub - the issue was that the ??? in the post body was being interpreted as inline JS and blocked by Content Security Policy.

Do let us know if it’s still an issue for you.


Yup, that fixed everything! Thank you for all your help :slight_smile:


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.