Ce sujet a été marqué résolu par son auteur, le 16 Mars 2013 à 01:36
Undefined index in wetem::find

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Messages: 1 670
Undefined index in wetem::find
« le 25 Avril 2012 à 08:04 »
If the target layer/block doesn't exist, $to is never defined.

Case in point: I have added a block to the body, which works fine, The problem comes in XML mode, where the layer isn't registered.
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Nao

  • Dadman with a boy
  • Messages: 16 082
Re: Undefined index in wetem::find
« Réponse #1, le 26 Avril 2012 à 17:08 »
How could it return an undefined index on $to? $to is never used as an index, AFAIK...?

As for what you're describing -- it's actually addressed in the wetem::find source code.

Code: [Sélectionner]
// If we try to insert a sideback block in XML or minimal mode (hide_chrome), it will fail.
// Plugins should provide a 'default' fallback if they consider it vital to show the block, e.g. array('sidebar', 'default').

So there you go... Just add , 'default' right after the name of the layer where you want to add :)

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Messages: 1 670

Nao

  • Dadman with a boy
  • Messages: 16 082