It worked, now it doesn't
-
Hi, until some days ago the plugin worked, now it doesn’t. It doesn’t show me the labels in the check box, like you can see here: https://www.iluoghidirigonistern.it/lavorazione2/
Could it be ‘couse the upgrade to wordpress 4.0?
Thanks!https://www.ads-software.com/plugins/search-types-custom-fields-widget/
-
Hi, I checked also with WP 3.9.2, so it isn’t a problem with the version.
I had the same problem with another website: https://www.turismograndeguerra.com/riserva/
Here, only two labels have the name (instead of four), while the other two have only the colons. But in all labels the “open” button doesn’t work.
What could be the problem?
Clicking on the open button is actually toggling the display state but for some reason there are no entries to display so it appears that nothing happened. (You will note that the button label changes to “Close” and using the browser debugger I can see that the div element css display attribute is being set to ‘block’ from ‘none’ however the div element contains no entries so it displays nothing. For some reason the plugin is not finding any data.
Does the administrator’s interface where you configure the plugin show non zero counts for these fields?
Has your database recently changed? Can you see valid data using a SQL client?
Has anything else changed from the time the plugin was working?
I don’t understand why but the plugin is not finding or maybe nt creating any entries for these fields.
mc
A detail: it doesn’t work with “Checkboxes”, but it work! with “Radio”. A mistery…
Do you mean that all the 6 fields that are failing are of type “Checkboxes”?
Yes, they are all of type Checkboxes.
The only thing changed from the time the plugin was working are the upgrades of plugin (the Search and the Types) and the upgrading to WP 4.0.
Does the administrator’s interface where you configure the plugin show non zero counts for these fields?
How are the checkboxes configured?
Which of the following is selected?
When unchecked, save 0 to the database
When unchecked, don’t save anything to the databaseWhich of the following is selected?
Display the value of this field from the database
Show one of these two values:I am running WordPress 4.0 and Types 1.6.3 and Search Types 0.4.6.1.1 and my checkboxes are working with ‘When unchecked, don’t save anything to the database’ and ‘Show one of these two values’. I have a more comprehensive database but it is on a different computer. I will try that later.
I updated one of my checkboxes field and it is now broken exactly as you have described. So, apparently something has changed in the update.
Yes, things are now seriously broken. Thank-you very much for reporting the error. I still don’t understand what is causing the problem so I cannot tell you when it will be fixed. I have stopped my other work so that I can work full time on fixing this. Thanks again for the detailed error report.
mc
The administrator’s interface shows me non zero counts for those fields.
I set everything like you, but it still doesn’t work.
Anyhow, my purpose is to allow to the users to filter the posts, i.e. for theme, for area, etc.
I think I can reach the same goal with the “Radio” field, isn’t it?Just a question: in the search form, can I eliminate the first number between the brackets after each option?
I think I have solved the problem. I have released a new version. Please give it a try. The radio field only allows a single selection whereas the checkboxes allow multiple selections so they are not equivalent.
The first thing in parenthesis is another code for the option which may be redundant or not user friendly in some cases. I have chosen to display it because I felt more information is better than less information. If you are willing to edit the source code I can show you how to remove it.
To remove the first thing in parenthesis for checkboxes please edit the file ‘search-types-custom-fields-widget.php’ as follows:
delete lines 797-801
if ( $wpcf_field['data']['options'][$value]['display'] == 'db' ) { $label .= ' (' . $wpcf_field['data']['options'][$value]['set_value'] . ')'; } else if ( $wpcf_field['data']['options'][$value]['display'] == 'value' ) { $label .= ' (' . $wpcf_field['data']['options'][$value]['display_value_selected'] . ')'; }
and delete lines 1409-1413
if ( $wpcf_field['data']['options'][$value]['display'] === 'db' ) { $current .= ' (' . $wpcf_field['data']['options'][$value]['set_value'] . ')'; } else if ( $wpcf_field['data']['options'][$value]['display'] === 'value' ) { $current .= ' (' . $wpcf_field['data']['options'][$value]['display_value_selected'] . ')'; }
This request has been made before so I will make it a configurable option in a future version. I also will wrap my labels with the __() function so you can apply localization to my labels. Did not realize how strange it is to have a page which is half in Italian? and English until I saw your page.
mc
Now the search form seems to be ok, I see correctly the options, but it doesn’t show me any result!
Is it only a my problem, what about your sites?P.S.: my site is temporary half english and half italian, soon it will be all in english ??
I am very stupid. The new format would also break the matching logic in the search routine which I did not fix.
I think I have fixed the other half the problem. I have released another version please try it.
mc
It seems to be all right. Great work! ??
Tomorrow morning I will try again with more fields and I will confirm to you.
Thank you very much, your plugin is very useful for me.
Bye!
- The topic ‘It worked, now it doesn't’ is closed to new replies.