Buttons are blank?
-
I installed this on two different sites to try it out (looks great!) but in both cases the buttons themselves (pro and contra) are blank. And you can not save new text. The UI says it saves, but it doesn’t not. Makes it entirely unusable.
-
Hi @chriscoyier
Thank you for your feedback. This is a strange error. Helpful uses the register_setting and update_option used by WordPress. Are you using plugins that hook there somehow and possibly manipulate the options before saving?
I can’t reproduce the error on my end. I took another look at the code just to be sure.
Helpful doesn’t give any error messages there, because it basically only works with update_option and that usually always works. I’ll see if I can change that to make it clearer. In WordPress, unfortunately, there aren’t really debugging options as far as update_option is concerned. Either it is saved, or not saved.
Stay healthy and have a great day!
Kevin
The options that are affected are:
helpful_pro
andhelpful_contra
.Are you using any other plugins that touch these options? And do the other options work when you update the texts?
Thanks again!
-
This reply was modified 3 years, 9 months ago by
Pixelbart.
Surely it could be “just me” problem. But here’s a video of me trying to make it work on a local install (I use Local by Flywheel for the local dev environment).
Does anything stand out there?
Hi @chriscoyier,
super annoying. I can’t see any error unfortunately, but you could still help me by placing in the
wp-config.php
the following variables:define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
After that, save the options with your text again and then look at
wp-content/debug.log
to see if an error is registered there. Here it seems thatupdate_option
is manipulated somehow/somewhere. A simple text, without emoticons does not work either?Strangely enough,
update_option
works on the page where you set the post_types, which is why it could be a formatting issue – though I haven’t actually set any filters here, so users can also paste font-awesome etc as HTML.I can’t reproduce the error on my end to find it easily, unfortunately. So I would be very grateful for your help.
Sorry for the inconvenience.
LG Kevin
Alrighty I tried that. Here’s a screenshot of a log right after saving. I also deactivated every plugin except Helpful and activated the default TwentyTwenty theme just in case.
Still just won’t save.
Is there somewhere I could look in the DB to see if it makes it that far?
Thank you for your help!
The errorlogs look okay so far, so the one with the sessions is unfortunately a known problem, which I still have to solve… this is always a problem with WordPress, because here again something is output before, which must not be output, which is why then the header is already sent.
You can look in the wp_options table if
helpful_pro
orhelpful_contra
are set. Helpful uses WordPress functions to save, which is why I’m wondering why it doesn’t work. I also explicitly omit Ajax in the options so there are no problems here.You could also test once if the function
update_option('helpful_pro', 'My Pro Button');
orupdate_option('helpful_contra', 'My Contra Button');
works if you put it infunctions.php
. But this is not the solution to the problem. I’ll look further too.Thanks again!
LG Kevin
I just looked again, are you possibly using a multisite? Maybe the error is related to this. Actually WordPress should check this itself and save the option correctly. Very crazy.
No multisite here.
Is it notable my DB is using a table prefix? Table name isn’t
wp_options
butwp_RANDOM_options
.Helpful is putting a bunch of stuff in there: https://d.pr/i/RxYv2i
And yep, if I put those saving lines into
functions.php
it DOES save them to the DB.Thank you once again!
Yes, Helpful has a lot of options in there. At that time I didn’t know any better. I still have to update that it is also stored in an option as an array. Is all more a hobby project.
The database is a good hint. Helpful uses the $wpdb->prefix. Maybe it is different for you.
You could test once, how that looks with you:
global $wpdb; echo $wpdb->prefix . 'helpful'; echo $wpdb->prefix . 'helpful_feedback';
If the tables then look different than yours, Helpful can’t find the prefix. But this has nothing to do with update_option. This is a matter of
wp-admin?options.php
… Helpful does it all WordPress codex-style, which is why it’s so weird.Currently I don’t know a solution yet… I had a look if there are other people with this problem, but so far I didn’t get any agreement. Also, it doesn’t explain why you can set the option when you set the post_type but no text is passed. WordPress unfortunately doesn’t have an internal option built in there either and just always returns a url parameter
?settings-updated
.Although I’d love to see Helpful on your site, it’s probably easier for you if you’re looking for an alternative. I don’t know how long it will take to find a solution here, and I don’t want to stop you from updating your site – just because Helpful doesn’t work.
Kevin
Yeah no problem. I’m already using a less helpful (lol) plugin. This one is just so much nicer with the written feedback stuff! It’s almost certainly a just-me problem, but what is so weird about my site I’m just not sure.
This is what amazes me. I don’t see any problems here at all, so I can’t understand it. The errors in the debug.log should be fixed by now… there an output_buffering worked wonders.
That with the options is unfortunately, as always, a WordPress plugin. WordPress is constantly expanded, but old issues simply not touched or simply set to closed.
I keep my eyes and ears open but and try to find a solution here. Possibly the options array already solves the problem, although I doubt it a bit.
Some also had problems with their caching, where the security mechanisms of WordPress have made problems. WordPress uses nonces and they are often swallowed by caching software.
But as I said: All this does not have to be with you, especially if you test it locally. Does this actually only affect a web browser, or have you also tested it in another browser?
-
This reply was modified 3 years, 9 months ago by
- The topic ‘Buttons are blank?’ is closed to new replies.