b13 / authorized-preview Goto Github PK
View Code? Open in Web Editor NEWTYPO3 Extension for previewing disabled languages without a backend login
License: GNU General Public License v2.0
TYPO3 Extension for previewing disabled languages without a backend login
License: GNU General Public License v2.0
Hi,
your extension was recommended to me by @bmack and maybe your extension could be extended...
We have the following use case:
An editor creates a new page. This page is hidden at first because the editor needs an approval from another person before the page can go live. Therefor the editor has to send the preview url to this person. Right now that is possible only with workspaces. In Workspaces you have the option to generate a preview url. So the editor created a new page, switches to the Workspace and copies the preview url, sends the url to the other person...
It would be good if workspaces are not needed in order to copy a preview url for people who are not logged-in into TYPO3 (or doesn't have a TYPO3 account).
Maybe this feature could be added, so that the preview url not only works for pages with deactivated languages but also for pages with activated languages?
Thank you very much.
The current implementation uses setcookie
which does not allow to use this extension as subrequest.
https://github.com/b13/authorized-preview/blob/master/Classes/Http/Middleware/Preview.php#L89
TYPO3 Core uses it differently https://github.com/TYPO3/TYPO3.CMS/blob/87dd80d5810e1e8f559b5a9584f423c4dada4544/typo3/sysext/core/Classes/Middleware/BackendUserAuthenticator.php#L74
This extension should be compatible with PHP 8.1.
I get a lot of warnings in the log like this:
Core: Error handler (BE): PHP Warning: Attempt to read property "id" on null in /.../ext/authorized_preview/Classes/Http/Middleware/Preview.php line 114
Core: Error handler (BE): PHP Warning: Undefined global variable $TSFE in /.../typo3conf/ext/authorized_preview/Classes/Http/Middleware/Preview.php line 114
Maybe this is caused by some subrequest, e.g. solr? ๐คท I guess it should be safe to to add something like this?
if (!isset($GLOBALS['TSFE']) || !$GLOBALS['TSFE'] instanceof \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController) {
return $handler->handle($request);
}
TYPO3: 11.5.27
authorized_preview: 2.1.0 and 3.0.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.