Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: live627 on April 25th, 2012, 08:04 AM

Title: Undefined index in wetem::find
Post by: live627 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.
Title: Re: Undefined index in wetem::find
Post by: Nao 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 :)
Title: Re: Undefined index in wetem::find
Post by: live627 on February 28th, 2013, 02:31 AM
Note to self: this may be fixed in r1957.
Title: Re: Undefined index in wetem::find
Post by: Nao on February 28th, 2013, 07:13 AM
Can't believe you reported it a year ago... ;(