This topic was marked solved by its starter, on March 16th, 01:36 AM
Undefined index in wetem::find

live627

  • Talking Head
  • 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
  • Posts: 1,412
Undefined index in wetem::find
« on April 25th, 2012, 08:04 AM »
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.

Nao

  • With a Box
  • If you say so.....
  • Posts: 12,900
Re: Undefined index in wetem::find
« Reply #1 on April 26th, 2012, 05:08 PM »
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: [Select]
// 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 :)
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

live627

  • Talking Head
  • 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
  • Posts: 1,412
Re: Undefined index in wetem::find
« Reply #2 on February 28th, 02:31 AM »
Note to self: this may be fixed in r1957.

Nao

  • With a Box
  • If you say so.....
  • Posts: 12,900
Re: Undefined index in wetem::find
« Reply #3 on February 28th, 07:13 AM »
Can't believe you reported it a year ago... ;(
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)