Polyglots (multi tags) do not work - SPIP 4.0.1

Hello,
I have SPIP 4.0.1. Polyglots (multi tags) do not work in this version, particularly for the author’s name.
For instance:
[en]News Desk[fa]میز خبر

returns
[en] News Desk [fa]میز خبر

Any solution?

One more thing:
in SPIP 4.0.1. I still need to move plugin Big Upload outside of plugins-dist to be able to upload article logos and documents.

Regards
Kamran

Hello Kamran

Try adding the following to the file mes_options.php in /config:
function multi_nom($flux) {
$flux[‹ table_des_traitements ›][‹ NOM ›][‹ spip_auteurs ›] = ‹ extraire_multi(%s) ›;
return $flux;
}

table_des_traitements, NOM and spip_auteurs are between quotes, I don’t know why this editor turn them into < and >.

I think this will be corrected in the next version of SPIP.

Try adding the following to the file mes_options.php in /config:

Caution, you miss the declaration of the pipeline before + you need to keep the security :

$GLOBALS['spip_pipeline']['declarer_tables_interfaces'] .= "|multi_nom";
 
function multi_nom($flux) {
    $flux['table_des_traitements']['NOM']['spip_auteurs'] = 'safehtml(supprimer_numero(extraire_multi(%s)))';
	return $flux;
}

Anyway, yes : this is fixed in all next versions :slight_smile:


RastaPopoulos

$GLOBALS['spip_pipeline']['declarer_tables_interfaces'] .= "|multi_nom";
 
function multi_nom($flux) {
    $flux['table_des_traitements']['NOM']['spip_auteurs'] = 'extraire_multi(%s)';
	return $flux;
}

With the right quotes and double quotes

I insist: this is not the right fix, you need to keep the security, like in the real fix in the next versions: safehtml(supprimer_numero(extraire_multi(%s)))