phorax / formhandler Goto Github PK
View Code? Open in Web Editor NEWFork of TYPO3 extension «Formhandler»
License: GNU General Public License v2.0
Fork of TYPO3 extension «Formhandler»
License: GNU General Public License v2.0
I've upgraded formhandler for using with TYPO3 10.4.
After upgrading I have two major problems:
Before upgrading formhandler runs fine on TYPO3 9.5.x
Can you help?
If users leave a form at step 2 or higher without submitting and come back later, formhandler will prefill the form with the data from the session and show them the unsubmitted step.
The form will however not work, because the form tag is missing.
The problem originates in \Typoheads\Formhandler\View\Form::render(), Line 100ff.:
if (!$this->gp['submitted']) {
$this->storeStartEndBlock();
} elseif ((int)($this->globals->getSession()->get('currentStep')) !== 1) {
$this->fillStartEndBlock();
}
Because the step was not submitted, the StartEndBlock will not be restored from the session.
Solution 1: Remove the "else" and make it two independent conditions (or alternatively re-order the sequence)
Solution 2: If not submitted and currentStep > 1, change currentStep = 1 before rendering
I'm currently not sure, which solution would be the better one.
The forms are displayed, but the page is messed up: it uses the layout “Default.html“ from typo3/sysext/fluid_styled_content/Resources/Private/Layouts/Default.html instead of my defined layout (page.10.layoutRootPath).
If I use the notation EXT:extensionName/... in typoscript in TYPO3 v9, for example for the langFile, the frontend displays an error for this line: web/typo3conf/ext/formhandler/Classes/Utility/GeneralUtility.php:681
The method extRelPath is deprecated:
https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/8.4/Deprecation-78193-ExtensionManagementUtilityextRelPath.html
Notation like typo3conf/ext/extensionName/... is possible
Check all finisher for TYPO3 v11 compatibility
I replaced
$pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
by
$pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
in /formhandler/Classes/Controller/Form.php
to solve this issue.
working with a more current fork of this one (https://github.com/dmind-gmbh/formhandler) and the discontinued EXT:formhandler_subscription on TYPO3 v9:
$queryBuilder->getRestrictions()->removeByType(HiddenRestriction::class);
Is that not needed in GenerateAuthCode.php, too?
Hi
phorax/[email protected] ships an ext_emconf.php with version 2.4.0
This confuses our security extension scanner.
Sadly, it is not fixable without breaking the git history.
So this issue is more a warning for users than a request for fix.
Cheers.
When i use the filter in the forhandler log and set an startdate i get following error:
An error occurred while trying to call Typoheads\Formhandler\Controller\ModuleController->indexAction()
I tried formhandler 2.4.1 and also 3.1.0 but same problem appears. I am using TYPO3 8.7.20
Unify coding convention via php-cs-fixer.
Filing as an umbrella bug for the overall feature of adding all fixes for Typo3 11.5.x
Split up the work done in RP #83
php 7.4
Typo3 v11.5.x
debug mode on
error level 12290
suggestion to make a simpler condition avoiding null variable
if (!$found && !$sessionFiles[$this->formFieldName]) {
$checkFailed = $this->getCheckFailed();
}
TYPO3 8.7
Core: Error handler (FE): PHP Warning: count(): Parameter must be an array or an object that implements Countable in /sites/gazvacancy/htdocs/typo3conf/ext/formhandler/Classes/Validator/ErrorCheck/FileRequired.php line 35
Configuration in Flexform is not fully compatible with TYPO3 v11.
Fix Flexform config in flexform_ds.xml
See 3a265cb#diff-4587764e4a3dbcca2c5b92ce67027cefd40b977f6d6fde903add61941a26e512
In released version 3.0.0
file ext_emconf.php
still has version 2.4.1
There is a security fix in formhandler 2.4.1 (released yesterday), I think this should be fixed here, too.
I installed the master but i doesn't get any output from formhandler on frontend. Only the Header Title will be displayed ... cache cleard. Formhandler can element can be displayed and edited in Backend.
This is already covered with pull request #4, but since this was not merged for a long time i'd ask to at least fix this simple issue to make form validation using ajax (eID) work again.
diff --git a/Classes/Utility/GeneralUtility.php b/Classes/Utility/GeneralUtility.php
index 9cf4d7a..a691392 100644
--- a/Classes/Utility/GeneralUtility.php
+++ b/Classes/Utility/GeneralUtility.php
@@ -839,7 +839,7 @@ class GeneralUtility implements SingletonInterface
$GLOBALS['TSFE']->fe_user->fetchGroupData();
// Include the TCA
- \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->loadCachedTca();
+ \TYPO3\CMS\Frontend\Utility\EidUtility::initTCA();
// Get the page
$GLOBALS['TSFE']->fetch_the_id();
Scenario:
If there is any sort of proxy or caching server in front of your actuall application server (e.g. varnish or nginx proxy/lb) $_SERVER['REMOTE_ADDRESS'] may alway contain 127.0.0.1
That issue is related to logging and the ipblocking Interceptor. And may result in your forms getting blocked.
Solution 1:
Introduce some sort of automatic detection e.g.:
check if REMOTE_ADDRESS points to 127.0.0.1 and check for the existens of e.g. $_SERVER['HTTP_X_REAL_IP'] (Might varydepending on the actuall infrastructure).
Solution 2:
Introduce some sort of configuration for that.
Note:
Keep in mind that \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv is not aware of any key in e.g. $_SERVER.
See #89
Fluid ViewHelper <f:be.widget.paginate> had been removed. Refactor code to mitigate this issue.
Fix Validator Session Problem
Thanks for the fork. In another fork I saw some upcoming security problems which should be solved in this fork, too: pluspol-interactive/typo3-formhandler#1
For DB Inserts using the QueryBuilder we have to use ->values instead of ->set (which is for updates)
I used the latest commit with TYPO3 8, the forms are displayed, but the page is messed up (parts are missing).
I installed you extension but i only got a empty div on the formsite.
Also by activated debugs without any error outbut
`plugin.Tx_Formhandler.settings.predef.validation-contact {
debug = 1
addErrorAnchors = 1
name = Kontakt Formular`
I copyed a old TS from a working typo web (7.6.x), so the TS code should be fine.
There is no output and also no error in any logfile.
Any suggestions to this issue?
hi,
Do you have plans for a TYPO3 8.7.x release? and possible a TER release?
Best Regards
When setting singleFileMarkerTemplate.showThumbnails
an exception is thrown once a file has been uploaded:
Uncaught TYPO3 Exception
Call to undefined method TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::IMAGE()
Error thrown in file
/.../typo3conf/ext/formhandler/Classes/View/Form.php in line 920.
21 Typoheads\Formhandler\View\Form::getThumbnail(array, array)
/.../typo3conf/ext/formhandler/Classes/View/Form.php:
00813: if (intval($settings['singleFileMarkerTemplate.']['showThumbnails']) === 1 || intval($settings['singleFileMarkerTemplate.']['showThumbnails']) === 2) {
00814: $imgConf['image.'] = $settings['singleFileMarkerTemplate.']['image.'];
00815: $thumb = $this->getThumbnail($imgConf, $fileInfo);
00816: }
00817: $text = $this->utilityFuncs->getSingle($settings['files.'], 'customRemovalText');
20 Typoheads\Formhandler\View\Form::fillFileMarkers(array)
/.../typo3conf/ext/formhandler/Classes/View/Form.php:
00610: $this->fillCaptchaMarkers($markers);
00611: $this->fillFEUserMarkers($markers);
00612: $this->fillFileMarkers($markers);
00613:
00614: if (!strstr($this->template, '###HIDDEN_FIELDS###')) {
19 Typoheads\Formhandler\View\Form::fillDefaultMarkers()
/.../typo3conf/ext/formhandler/Classes/View/Form.php:
00107:
00108: //fill default markers
00109: $this->fillDefaultMarkers();
00110:
00111: if (intval($this->settings['fillValueMarkersBeforeLangMarkers']) !== 1) {
18 Typoheads\Formhandler\View\Form::render(array, array)
/.../typo3conf/ext/formhandler/Classes/Controller/Form.php:
00368: return $this->processFinished();
00369: } else {
00370: return $this->view->render($this->gp, $this->errors);
00371: }
00372: } else {
17 Typoheads\Formhandler\Controller\Form::processSubmitted()
/.../typo3conf/ext/formhandler/Classes/Controller/Form.php:
00147: return $this->processNotSubmitted();
00148: } else {
00149: return $this->processSubmitted();
00150: }
00151: }
16 Typoheads\Formhandler\Controller\Form::process()
/.../typo3conf/ext/formhandler/Classes/Controller/Dispatcher.php:
00112: }
00113:
00114: $result = $controller->process();
00115: } catch (\Exception $e) {
00116: \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog(
15 Typoheads\Formhandler\Controller\Dispatcher::main("", array)
/.../typo3conf/ext/formhandler/pi1/class.tx_formhandler_pi1.php:
00044: $dispatcher = new \Typoheads\Formhandler\Controller\Dispatcher();
00045: $dispatcher->cObj = &$this->cObj;
00046: return $dispatcher->main($content, $conf);
00047: }
00048: }
14 tx_formhandler_pi1::main("", array)
...
This and other similar methods have been dropped in TYPO3v8 after deprecation in v7.
is there any official compatibility with LTS 9 planned, if yes is there a timeframe for it? thanks a lot for your feedback
Formhandler uses a own session for storing values. It can be configured to not use cookies. This is done by modifing php ini settings. Unfortunally PHP 7.2 throws a warning when changing a session ini setting after the session was started.
In the class Typoheads\Formhandler\Session\AbstractSession and start() function there is already a check if the session is started or not. The lines for modifing the ini settings should be moved inside the if condition so it will be executed only once when the session was not started.
The option $GLOBALS['TSFE']->renderCharset was marked deprecated in TYPO3 8.0 (see change #73794) and completely removed in TYPO3 9.0 (see change #80700).
renderCharset is still used in some validators, for example Classes/Validator/ErrorCheck/MaxLength.php.
Could you please return to numbering ext version, like in any other extension. We have now ~10 installations with different versions tested to compare and now after a few months I have absolutely no idea which is which, which is newer, it's a huge problem when maintaining many projects, with xclasses, during updates, calculations and analysis. Please just put it back there
See tlueder:Fix-persistence-configuration
PR #87
TYPO3 7.6.15 +gridelements 7.0.6-dev + bootstrap_grids 1.3.1 + formhandler 2.4.0
Create a grid-CE on a page.
Create a formhandler-plugin inside a column of that grid-CE.
The formhandler-plugin is not there because fields tx_gridelements_columns and tx_gridelements_container set to 0.
Any other CE works, but not formhandler-plugin.
Creation of formhandler-plugins outside a grid-CE works, also moving that plugin into grid-CE. Only creation inside grid-CE fails.
Hi I am trying to bring some old mega-forms to typo3 11, after an update, in 10 the templateFile, langFile and cssFile paths seem to work in the setup ( plugin.Tx_Formhandler.settings { ... } ), in typo3 11 only the templateFile is accetped, the other two aren't. Is there a way to set these paths otherwise?
In the Plugin Options (flexform), I can only select the folder, and not the files.
Scenario:
DoRedirect is called with non existing pid
Result:
Empty content is shown due to:
https://github.com/PHORAX/formhandler/blob/master/Classes/Utility/GeneralUtility.php#L323
Solution:
Check output of:
https://github.com/PHORAX/formhandler/blob/master/Classes/Utility/GeneralUtility.php#L316 and throw an exception or show an error Message if $url ist empty.
Porting Pagination to TYPO3 V11 is too time consuming for now. Therefore remove
When I try to view a log in "Formhandler" backend module, I get an exception(stack below).
TYPO3: 8.7.20
Formhandler: 3.0.0
Error stack
Uncaught TYPO3 Exception
Subject given to f:count() is not countable (type: string)
TYPO3Fluid\Fluid\Core\ViewHelper\Exception thrown in file
.../vendor/typo3fluid/fluid/src/ViewHelpers/CountViewHelper.php in line 70.
31 TYPO3Fluid\Fluid\ViewHelpers\CountViewHelper::renderStatic(array, Closure, TYPO3\CMS\Fluid\Core\Rendering\RenderingContext)
.../public/typo3temp/var/Cache/Code/fluid_template/Module_action_view_19ca6c025e5a7b2a83c84a119983166163e9c96a.php:
00411: $arguments41 = array();
00412: $arguments41['subject'] = NULL;
00413: $renderChildrenClosure42 = ($arguments41['subject'] !== null) ? function() use ($arguments41) { return $arguments41['subject']; } : $renderChildrenClosure42;$array40['0'] = TYPO3Fluid\Fluid\ViewHelpers\CountViewHelper::renderStatic($arguments41, $renderChildrenClosure42, $renderingContext);
00414: $array40['1'] = ' > 0';
00415:
30 Module_action_view_19ca6c025e5a7b2a83c84a119983166163e9c96a::{closure}()
.../vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractConditionViewHelper.php:
00083: }
00084: if (isset($arguments['__thenClosure'])) {
00085: return $arguments['__thenClosure']();
00086: }
00087: } elseif (!empty($arguments['__elseClosures'])) {
29 TYPO3Fluid\Fluid\Core\ViewHelper\AbstractConditionViewHelper::renderStatic(array, Closure, TYPO3\CMS\Fluid\Core\Rendering\RenderingContext)
.../public/typo3temp/var/Cache/Code/fluid_template/Module_action_view_19ca6c025e5a7b2a83c84a119983166163e9c96a.php:
00444: };
00445:
00446: $output33 .= Typoheads\Formhandler\ViewHelpers\IsArrayViewHelper::renderStatic($arguments35, $renderChildrenClosure36, $renderingContext);
00447:
00448: $output33 .= '
If you use errorCheck float then you get the error: Fatal error: Cannot use 'Float' as class name as it is reserved in /html/typo3/typo3conf/ext/formhandler/Classes/Validator/ErrorCheck/Float.php on line 20
You have to rename Float.php into f.e. Phpfloat.php
Then rename the class in this file the same way.
And then you can use phpfloat as errorCheck.
Goal: set strict_types = 1 in all files
In the description this is the version for TYPO3 8.7 but in the files there are customizations for TYPO3 9.5, like e.g. in ext_emconf.php
There is only one branch "Master", is there a formhandler version for TYPO3 8.7?
I was hoping to find at least one branch for version 8 :)
Remove $GLOBALS['TSFE']->initLLvars() calls and mitigate.
hi @7elix
if you have a normal form on a site and use some special character in the fields like & or ", this got encoded twice. "&" --> $amp;amp;
it's related to this change: 5a1e223
with TYPO3 8 all things went fine, but in 9.5 you have the double encoding.
do you have an idea where that comes from and how to fix it?
best regards
Sven
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.