WPUserManager / wp-user-manager

Beautifully simple user profile directories with frontend login, registration and account customization. WP User Manager is the best solution to manage your community and your users for WordPress.
https://wpusermanager.com/
GNU General Public License v3.0
36 stars 20 forks source link

Duplicate default registration forms created on install #136

Open apermo opened 4 years ago

apermo commented 4 years ago

When installing wp-user-manager and activating it directly after installation, i have 2 regsitration forms (one with ID 1 the other with ID 2), I can edit ID:2 but the frontend will show an error that the form contains not enough fields.

As soon as i delete ID: 2 from the Database, the registration form works like a charm.

Obviously there are 2 Registrations forms added to the database somehow, which breaks the form for the plugin.

Replicated it by installing the plugin on 2 websites where the plugin hasn't been installed before.

polevaultweb commented 4 years ago

Thanks for the report @apermo. I'm investigating. Any WPUM addons installed

polevaultweb commented 4 years ago

@apermo if you disable and delete the plugin, then reinstall and activate does it happen again? I can't recreate myself so having somewhere where this happens repeatedly would be great for me to troubleshoot 🙏

apermo commented 4 years ago

@polevaultweb None and will check.

apermo commented 4 years ago

I deactivated and deleted it, downloaded and reactivated it, and this is in my database:

registration_forms 1 Standard-Registrierungsformular 2 Standard-Registrierungsformular

form_meta 1 2 default 1 2 2 role subscriber 3 2 fields a:0:{}

polevaultweb commented 4 years ago

Great! A reproducible bug is a fixable one 👍

Can you send me some admin credentials via https://wpusermanager.com/contact/ so I can go in and troubleshoot.

Also, can you edit your wp-config.php file to replace this line -

define( 'WP_DEBUG', false );

With these lines -

define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false);

This means that any errors are logged to `/wp-content/debug.log', because some errors are not visible on screen.

More details about that at http://codex.wordpress.org/Editing_wp-config.php#Debug

Thanks 🙏

apermo commented 4 years ago

Sorry I can't.

The problem happens on a local system and I can't really give you access to the site that is currently out in the wild. But we can call and screenshare.

These are the active plugins:

Advanced Cron Manager Version 2.4.0 von BracketSpace \ Automatische Aktualisierungen deaktiviert
AMP Version 2.0.3 von AMP Project Contributors (Aktuelle Version: 2.0.4) | Automatische Aktualisierungen deaktiviert
Apermo Xdebug Version 1.2.2 von Christoph Daum | Automatische Aktualisierungen deaktiviert
Awesome Weather Widget Version 3.0.2 von Hal Gatewood | Automatische Aktualisierungen deaktiviert
Co-Authors Plus Version 3.4.3 von Mohammad Jangda, Daniel Bachhuber, Automattic | Automatische Aktualisierungen deaktiviert
Cyan FI User Connector Version 0.3.0 von Christoph Daum | Automatische Aktualisierungen deaktiviert
Cyan Gutenberg Blocks Version 1.1.0 von Christoph Daum & Minh Doan | Automatische Aktualisierungen deaktiviert
Cyan Portal Pages Version 3.2.1 von Christoph Daum | Automatische Aktualisierungen deaktiviert
Cyan Statify Addon Version 1.1.0 von Christoph Daum | Automatische Aktualisierungen deaktiviert
Cyan User Addon Version 1.0.0 von Minh Doan | Automatische Aktualisierungen deaktiviert
Cyan XML2WP Version 0.8.1 von Christoph Daum | Automatische Aktualisierungen deaktiviert
Disable Comments Version 1.11.0 von WPDeveloper | Automatische Aktualisierungen deaktiviert
Disable Emojis (GDPR friendly) Version 1.7.2 von Ryan Hellyer | Automatische Aktualisierungen deaktiviert
FakerPress Version 0.5.0 von Gustavo Bordoni | Automatische Aktualisierungen deaktiviert
Loggedin - Limit Active Logins Version 1.3.1 von Joel James | Automatische Aktualisierungen deaktiviert
Redux Version 4.1.20 von Redux.io + Dovy Paukstys | Automatische Aktualisierungen deaktiviert
Ruhr24 Base Plugin Version 2.13.0 von Christoph Daum | Automatische Aktualisierungen deaktiviert
Statify Version 1.8.0 von pluginkollektiv | Automatische Aktualisierungen deaktiviert
WP-Polls Version 2.75.5 von Lester 'GaMerZ' Chan | Automatische Aktualisierungen deaktiviert
WP User Avatar Version 2.2.7 von ProfilePress | Automatische Aktualisierungen deaktiviert
WP User Manager Version 2.3.11 von WP User Manager | Automatische Aktualisierungen deaktiviert
Yoast SEO Version 14.9 von Team Yoast | Automatische Aktualisierungen deaktiviert
polevaultweb commented 4 years ago

Ok give me an hour or so and I'll give you some debugging code to try on your end 👍

polevaultweb commented 4 years ago

Hi @apermo, so to debug:

Can you set your WP_DEBUG constants as outlined here

Can you install this logging mu-plugin (instructions on the gist)

Can you then deactivate and delete the plugin again. Then install it (but don't activate yet).

Add this code to wp-content/plugins/wp-user-manager/includes/install.php at line 133:

pvw_trace( 'wpum_install_registration_form' );

Add this code to wp-content/plugins/wp-user-manager/includes/wpum-upgrades/class-wpum-plugin-updates.php at line 508:

pvw_trace( 'install_registration_form' );

Then activate the plugin.

Hopefully the same duplicate record is created, and you should see a wp-content/debug.log file appear. Please send that on to me or paste in here.

Thanks so much for your help with this!

polevaultweb commented 3 years ago

hey @apermo did you get chance to look at this? Also who is the site hosted with?

polevaultweb commented 3 years ago

Note: this has happened to another user, who is on WordPress.com hosting, which uses Batcache as object cache. Might nee d to follow up with https://wordpress.com/help/contact if needed

apermo commented 3 years ago

hey @apermo did you get chance to look at this? Also who is the site hosted with?

Hey, didnt find time yet.

The problem occurs locally on my MAMP installation, as well as on our host www.wp-projects.de Since it occurs locally I'd assume the hosting isnt the issue in this case.

I'll come back to you asap.

polevaultweb commented 3 years ago

Thanks @apermo

Does your MAMP site have the object cache turned on? (Like redis)

apermo commented 3 years ago

@polevaultweb Both Memcached & Redis are disabled.

polevaultweb commented 3 years ago

🧐 there goes that theory. 🤣

apermo commented 3 years ago

Always a pleasure to destroy theories. Let me quickly try and install the plugin on my MAMP on a fresh WordPress.

apermo commented 3 years ago

Result:

Latest WP, twentytwenty as theme, no other plugins => all good, i'll try and see which Plugin causes the side effects and get back to you when I found it.

polevaultweb commented 3 years ago

Thanks for your help!