Hi Luo,
Thanks for helping.
Just tried to make the proposed changes and this is not working.
Here is the new Views result :
{"value":"12284","label":"Conférence – Où est le sens – 04-06-2021 – 2020"},{"value":"12283","label":"Conférence – Peut-on vraiment changer – 22-04-2021 – 2020"} ,{"value":"12282","label":"Conférence – L avenir de la famille – 20-03-2021 – 2020"} ,{"value":"12281","label":"Conférence – La passion de la France – 05-02-2021 – 2020"} ,{"value":"12280","label":"Conférence – Une philosophique de la société – 22-01-2021 – 2020"} ,{"value":"12279","label":"Conférence – L éloge de l énergie vagabonde – 13-11-2020 – 2020"} ,{"value":"12258","label":"Conférence – Une observatrice dans les coulisses du pouvoir – 15-10-2020 – 2020"}
Just for info, as mentioned in my first post, if I replace the shortcode by the Views result inside the generic field, this is working fine (even with the special caracters !). It sounds that this is more related to the shortcode management inside the generic field?
I have also 2 other Forms that are using the same kind of generic field with Views (also linked to products) as select and they are working fine. I have tried to place a special caracter in one of the title and this is stil working fine. Here is the result one one of the Views :
{"value":"12301","label":"Sortie – MENTON : JARDIN SERRE DE L’A MADONE – 15-04-2021 – 2020-€"},{"value":"12224","label":"Sortie – BIOT : LE MAQUIS ET LA GÉOLOGIE DU DÔME VOLCANIQUE – 18-03-2021 – 2020-€"} ,{"value":"12221","label":"Sortie – AUTOUR DE SIX-FOURS : ART, JARDIN ET SCULPTURES – 03-12-2020 – 2020-39€"} ,{"value":"12149","label":"Sortie – LES MUSÉES DE TOURRETTE-LEVENS – 05-11-2020 – 2020-€"} ,{"value":"12146","label":"Sortie – QUINSON/GANAGOBIE – 08-10-2020 – 2020-€"}
Last info, I'm using a hook for using a Views inside a Cred :
add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_clean_view_output', 5, 2 );
function prefix_clean_view_output( $out, $id ) {
if (( $id == '5880' ) OR ( $id == '6152' )OR ( $id == '6184' ))
{
$start = strpos( $out, '<!-- wpv-loop-start -->' );
if (
$start !== false
&& strrpos( $out, '<!-- wpv-loop-end -->', $start ) !== false
) {
$start = $start + strlen( '<!-- wpv-loop-start -->' );
$out = substr( $out, $start );
$end = strrpos( $out, '<!-- wpv-loop-end -->' );
$out = substr( $out, 0, $end );
}
}
return $out;
}
Any idea?
Regards
Pat