The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Plugin crashes Word...
 
Share:
Notifications
Clear all

Bug [Solved] Plugin crashes WordPress after twitter account suspended

9 Posts
2 Users
2 Reactions
776 Views
Posts: 8
Topic starter
(@theservant)
Active Member
Joined: 2 years ago

My Twitter account was suspended today for a T&Cs violation. So far, no explanation as to what was violated has been given. Nevertheless, this suspension has caused a failure with the wpdiscuz plugin.

My site gives a 500 Error, both the front end and the admin, but it works successfully if I remove this plugin from the plugins folder.

It appears that being unable to contact the Twitter developer API caused the fatal error. No logs are written to the PHP log file, making diagnostics harder.

I have no way to turn off the twitter SSO integration because I cannot get to the admin dashboard.

8 Replies
Posts: 8
Topic starter
(@theservant)
Active Member
Joined: 2 years ago

Initially there was nothing written in the log file, but now I see the following error.

[14-Apr-2023 11:52:01 UTC] PHP Fatal error: Uncaught Error: Class "wpdFormAttr\Tools\PersonalDataExporter" not found in ...\wp-content\plugins\wpdiscuz\forms\wpDiscuzForm.php:61
Stack trace:
#0 ...\wp-includes\class-wp-hook.php(308): wpDiscuzForm->initPersonalDataExporter()
#1 ...\wp-includes\class-wp-hook.php(332): WP_Hook->apply_filters()
#2 ...\wp-includes\plugin.php(517): WP_Hook->do_action()
#3 ...\wp-settings.php(645): do_action()
#4 ...\wp-config.php(86): require_once('...')
#5 ...\wp-load.php(50): require_once('...')
#6 ...\wp-admin\admin-ajax.php(22): require_once('...')
#7 {main}
thrown in ...\wp-content\plugins\wpdiscuz\forms\wpDiscuzForm.php on line 61

7 Replies
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7615

@theservant,

I'm going to ask the developers about the issue. Please wait a bit. I'll update the topic soon. 

Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7615

@theservant,

We have to ask you to create a dev/staging copy of your website in some sub-domain and send admin details to info[at]gvectors.com email address. We were not able to represent the issue on our test websites. 

You can use the Duplicator plugin to create that site.

(@theservant)
Joined: 2 years ago

Active Member
Posts: 8

@asti I do not give access to my website. As a developer myself given this stacktrace I would easily solve the problem. The least I could do, despite not being the best solution is catch the exception so that it doesn't break. Of course, that does not solve the core problem, but I have given the scenario which caused the issue.

How do I turn off Twitter SSO via modifying the database settings?

(@theservant)
Joined: 2 years ago

Active Member
Posts: 8

@asti In addition, I would recommend that the developers use defensive coding practices (if/else). Better yet, validate the input model to ensure that the data being processed is at the standard required by the component.

Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7615

@theservant,

Could you please install and activate the wpDiscuz version attached below and let us know how it works? 

 

(@theservant)
Joined: 2 years ago

Active Member
Posts: 8

@asti It looks good so far. It did not crash the website and loaded on the UI.

I have seen the defensive coding and sanitization (I haven't looked deep enough into your sanization, but the devs need to ensure that types and values are valid, not just trimming, etc).

Well done. Thanks!

 

TIP:

Check out the design patterns inlcuding behavioral design patterns. They will help, but don't go gung ho because it will make the code too complicated.

It is not for me to manage your team, but ensure the team knows the pattern and not just one member. HINT: Training sessions friday afternoons.

https://refactoring.guru/design-patterns/behavioral-patterns

Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7615

@theservant,

Thank you for checking. 

The changes will be included in the next version of the wpDiscuz plugin. 

Share: