loadPrototype() called in frontend editing without a valid doc instance.
When using frontend editing with the edit forms appearing directly on the page (and not in a popup) the following fatal error is generated.
PHP Fatal error: Call to a member function loadPrototype() on a non-object in /Users/jsegars/Sites/typo3_src/trunk/t3lib/class.t3lib_tceforms.php on line 5136
This was caused by RFC #20229: Use new JS-function for loading prototype/scriptaculous/extJS which references $GLOBALS['SOBE']->doc directly in tceforms, which may be used in the frontend or the backend. When edit forms appear directly on the page, $GLOBALS['SOBE']->doc does not exist at all.
We've seen this sort of problem pop up several times now, so I think the best solution is create a dummy instance of $GLOBALS['SOBE']->doc in the frontend context so that we don't have to worry about frontend or backend when using tceforms. The attached patch adds a new tsfeDoc to typo3/template.php and creates a dummy version of $GLOBALS['SOBE'] within tceforms_fe.
The only potential compatibility issue is that tceforms no longer includes tceforms_fe. This inclusion was for compatibility reasons, as tceforms and tceforms_fe used to be a part of the same file. Keeping the inclusion meant tceforms_fe was always included in the backend context and defining $GLOBALS['SOBE'] there caused lots of errors. With the addition of the autoloader recently, this change may not even be the minor issue that I originally thought it was :)
(issue imported from #M11166)