[TYPO3-core] RFC: Feature #10155: Add controller switching for frontend editing

Jeff Segars jsegars at alumni.rice.edu
Sun Mar 8 00:33:24 CET 2009


Jeff Segars wrote:
> Jeff Segars wrote:
>> Hey guys,
>>
>> This is a SVN patch request.
>>
>> Type: Feature
>>
>> Bugtracker reference: http://bugs.typo3.org/view.php?id=10155
>>
>> Branches: Trunk
>>
>> Problem:
>> The recent frontend editing overhaul for version 4.3 moves the logic 
>> of saving records into a controller in t3lib_frontendedit. This 
>> controller works for classic page templating, but TemplaVoila (and 
>> other future templating methods) may need their own options for 
>> handling moves, deletes, etc.
>>
>> Also, multiple controllers may be used throughout the site as 
>> different branches of the pagetree use different templating methods.
>>
>> Solution:
>> Introduce a new Page TSConfig option (TSFE.frontendEditingController) 
>> and use t3lib_frontendedit as the default controller.
>>
>> Also, in order to access Page TSConfig, we had to move frontend 
>> editing a little bit later within index_ts.php. I haven't seen any 
>> side effects from this move.
>>
>> Notes:
>> I also added a test extension with an alternate controller that dies 
>> as soon as a record is saved in frontend editing with a message that 
>> not frontend editing actions are allowed. You can get this from the 
>> bugtracker to help with testing.
>>
>> To activate the default controller, set TSFE.frontendEditingController 
>> = default in Page TSConfig or don't set anything at all. To activate 
>> the the test controller, set TSFE.frontendEditingController = test.
>>
>> Thanks,
>> Jeff
> 
> Argh, went a little too far in moving the frontend editing 
> initialization around.
> 
> Background:
> In the index_ts.php portion of the original patch, you'll notice two 
> sets of changes.
> 
> 1) Moving the call to $BE_USER->initializeFrontendEdit() from the rest 
> of the $BE_USER setup until a few lines lower when we get ready to use 
> frontend editing for the first time by calling initConfigOptions.
> 
> 2) Moving the entire frontend editing block from #1 to be after TS 
> initialization and cache checks.
> 
> 
> Problem:
> The first portion was actually needed because it delays frontend editing 
> initialization until TSFE->page is ready so that we can read Page 
> TSConfig and figure out whether we need to use the default controller or 
> another controller (ie. templavoila).
> 
> The second portion is not needed and causes problems because it 
> initializes frontend editing after we've already retrieved a cached 
> version of the page content.
> 
> 
> Solution:
> Keep the frontend editing block where it was before: right after 
> TSFE->page is ready but before a cached page is retrieved.
> 
> Notes:
> To test, follow these steps
> 1. View a cacheable page in frontend editing mode, with editforms on- 
> page checked in the admin panel.
> 2. Log out of the backend and reload this page, confirming that the 
> admin panel and edit panels go away.
> 3. Re-login to the backend and reload this page.  Without the followup 
> patch, you should see an admin panel but no edit panels. With the 
> followup patch, you should see both admin panel and edit panels.
> 
> Thanks,
> Jeff
> 

Would another core developer be willing to give me a quick test on this 
prior to the beta2?

If we can get this in, the new frontend editing should run properly as 
an extension without any core patching.

Thanks!
Jeff


More information about the TYPO3-team-core mailing list