• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Error: missing variable 'layout' in line 119 of fabrik-formbot.php

crandaddy

New Member
Hello, I was getting an error in my log file
"[error] PHP Notice: Undefined variable: layout in /.../mambots/content/fabrik-formbot.php on line 119 "

When I looked at the file, it looked like you had declared the other variables (formid, rowid, usekey) around line 89 and set them to '' but $layout was not declared there with the others. I went ahead and added $layout = ''; in line 92 and that seems to have fixed the missing variable problem.

Do you see any problems with this approach?

Thanks
Don
 
As I recall, 'layout' is supposed to be an optional CGI argument to override the template on the fly. So it should probably be set to something like mosGetParam($_REQUEST, 'layout', ''). I'll have a look ASAP.

-- hugh
 
hugh - probably best to ingore the querystring layout var in the mambot - as its unclear as to which bot that param refers to. (e.g. y tablebots or x fombots)

think u can do this

repalce

Code:
		if(strstr($m, "layout=")){
			$layout = trim(str_replace("layout=", "", $m));
		}

with

Code:
$layout = 	(strstr($m, "layout=")) ? trim(str_replace("layout=", "", $m)) : '';

what do you think?

Rob
 
Just wanted to let you know that this is not updated in the latest SVN. It is an issue and I used your changes to the file and the error did go away.

CK
 
It's now fixed in SVN.

And yes, lets ignore the query string layout, and just use the {foo layout="bar"} one.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top