Skip Navigation

[Resuelto] Latest update cause select field to populate empty option.

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
Views 2.6.2 changed how empty default options are added to Views filters where the options are manually set, adding an empty option even if one already exists.

Solution:
This was an unintended change which will be reverted in the next version of Views.

Relevant Documentation:
https://toolset.com/errata/default-value-issues-for-frontend-filters-styled-as-select-or-radio-fields/

This support ticket is created hace 6 años, 4 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Este tema contiene 12 respuestas, tiene 2 mensajes.

Última actualización por Akhil hace 6 años, 4 meses.

Asistido por: Nigel.

Autor
Mensajes
#948940

hi guys, it was all good before the update, after update i have this strange issue,

i looked at the code its generated as ' <option value="" checked="checked"></option> '

again i hope this is a known issue.

#949068

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

I can't replicate the issue, can you give more details about where exactly you see this?

I have a Types select field which works fine on the backend post edit screens, fine in front-end Forms, and also outputs its value correctly in templates.

#949112

i can confirm the latest update cause the issue but its not that serious,

i am guessing its attr 'default label', or the empty label issue. ill post some updates soon.

#949136

previously >

display_values="default,option1,option2" .....values=",option1,option2" ....default_label="default"

curently need to adjust to >

display_values="option1,option2 "... values="option1,option2 " .... default_label="default"

not an issue i just need to edit all the codes for 10 cpt. going to take some time to do this unless there is another way.

#950271

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Sorry, I can't tell where you are seeing the problem.

The custom fields settings screen?
A post edit screen?
A Toolset Form?
A View?

Can you show me a screenshot and then I'll recognise where this is happening.

#950279

wordpress archive edit page, code generated from the filter plus custom attributes.

could you just get some info from the developers on the changes made so that we know its the case and can close this case ?

thanks!

update : i am thinking that previously the attr "default-value" was not supported fully, now it does.

#950294

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

OK, I have it now.

When you insert a select field filter control in an archive with manual options where you include a default option, since Views 2.6.2 an additional empty default option has been added automatically, too.

Let me check with the developers before you go making any changes, because you might edit your archives to remove the manual default option, only to find that the automatic default option gets removed in a future update.

I'll update you when I hear from them about how to proceed.

#950296

oh my i just edited all my 10 cpt :0 . hope i am doing the right thing, wait for your update soon then, cheers

#950304

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

I just confirmed with the developer that this was unintended and it will be reverted to the prior behaviour.

Sorry I didn't get back to you more quickly, but at least they will look correct in the meantime until a fix is released.

#950644

Sorry but i have to voice out on this.

This is so unproffesional !
. why would you want to include something thats not permanent and confuse the end users ?

it's time consuming for us to update all the codes to fit the latest release.

#951091

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

As I said, it wasn't intended, the change looks to be a side effect of something else that was changed in Views 2.6.2, we can call it a bug, and it will be fixed soon.

If you have made changes to adapt to the bug then I'm sorry if that involves changing back again when the bug is fixed.

I expect it to be resolved quickly and I'll let you know when it is.

#955562

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

A quick update to confirm that this issue will be fixed in the next Views release, and that a patch is available as described in this erratum: https://toolset.com/errata/default-value-issues-for-frontend-filters-styled-as-select-or-radio-fields/

Again, sorry for the inconvenience caused.

#955599

Thank you , its not on you Nigel .
appreciate the effort,
now im back to adjust the code again.