Settings not being respected
-
Hey guys,
Sometime in the last couple of updates Helpful stopped respecting the admin settings.
I’ve set up a test page at https://wpfusion.com/documentation/additional/helpful-test/
If you look at the settings here https://share.getcloudapp.com/8LukXG0W
1. It should not show the form for a Pro vote
2. When a negative vote is left, the message should be displayedIn both cases the form is displayed, but no message.
This affects logged in users, and guests.
If I enable the “Show form after positive vote” setting, the form is still shown, and no message is shown (it does not make any difference)
In version 4.4.26, both the positive and negative votes showed the message “Thank you very much. Please write us your opinion, so that we can improve ourselves.” (the default message), despite settings being configured in the admin.
Updating to 4.4.27 removed the default message, and now no message is shown.
You can see the Helpful options from the database here https://share.getcloudapp.com/E0u9x2X7
They all seem correct.
I tracked down part of the issue to /helpful/core/helpers/class-feedback.php, around line 442
$type = User::get_user_vote_status( $user_id, $post_id );
$type
is always blank. So there’s no vote status.I tried to fix that by adding
if ( isset( $_POST['type'] ) ) { $type = sanitize_text_field( $_POST['type'] ); }
but it still didn’t fix the messages or the form display.
As well, this was working correctly, with no form for positive vote / form + custom message for negative vote as recently as January. We haven’t really changed much on the site. The page is cached, but we have the nonces disabled (which was working before). And regardless, the same bug affects logged in users, who shouldn’t be cached.
I was going to roll back to the January update of Helpful but thought I’d post here first in case you have any ideas. Thanks!
The page I need help with: [log in to see the link]
- The topic ‘Settings not being respected’ is closed to new replies.