(12 intermediate revisions by 5 users not shown) | |||
Line 12: | Line 12: | ||
You can use the following syntax, it at least will not break. It is another way of writing tag code.<syntaxhighlight lang="html"> | You can use the following syntax, it at least will not break. It is another way of writing tag code.<syntaxhighlight lang="html"> | ||
{{#tag:_input||type=text|value=hello<br>how are you}} | {{#tag:_input||type=text|value=hello<br>how are you}} | ||
− | </syntaxhighlight>The HTML will be filtered out. | + | </syntaxhighlight>The HTML will be filtered out. '''However, with the new Parsoid Parser that is introduced, do not use the <nowiki>{{#tag:}}</nowiki> method anymore.''' It will give unpredictable results as Parsoid renders these tags in no particular order. |
Here's a list of common error messages that might occur, with a brief description of what the problem might be. | Here's a list of common error messages that might occur, with a brief description of what the problem might be. | ||
Line 28: | Line 28: | ||
|- | |- | ||
|not a secure form | |not a secure form | ||
− | | | + | |form |
|shown when the sec option is set to true and the form has been manipulated after form submit | |shown when the sec option is set to true and the form has been manipulated after form submit | ||
| | | | ||
|- | |- | ||
|Secure fields not complete | |Secure fields not complete | ||
− | | | + | |form |
|shown when the sec option is set to true and files with type is secure (not to be manipulated with) are incomplete after a form submit | |shown when the sec option is set to true and files with type is secure (not to be manipulated with) are incomplete after a form submit | ||
| | | | ||
|- | |- | ||
|Did not receive a session token from the form | |Did not receive a session token from the form | ||
− | | | + | |form |
|shown when a secure token that is generated by FlexForm did not come with a form submit | |shown when a secure token that is generated by FlexForm did not come with a form submit | ||
| | | | ||
|- | |- | ||
|Form session expired | |Form session expired | ||
− | | | + | |form |
|shown when the time between a form render and the actual submit has taken to long | |shown when the time between a form render and the actual submit has taken to long | ||
|Change the config option '''form-timeout-limit''' to a higher number in seconds ( default 7200 secs = 120 mins = 2 hours ) | |Change the config option '''form-timeout-limit''' to a higher number in seconds ( default 7200 secs = 120 mins = 2 hours ) | ||
|- | |- | ||
|No return found | |No return found | ||
− | | | + | |form |
|shown when a form has been submitted but FlexForm cannot find a page to return to after handling the form | |shown when a form has been submitted but FlexForm cannot find a page to return to after handling the form | ||
| | | | ||
Line 58: | Line 58: | ||
|- | |- | ||
|No requests | |No requests | ||
− | | | + | |form |
|shown when a form has been submitted, but FlexForm could not find any valid request | |shown when a form has been submitted, but FlexForm could not find any valid request | ||
|Usually this means the '''action''' parameter of a form is invalid. | |Usually this means the '''action''' parameter of a form is invalid. | ||
+ | | | ||
+ | |- | ||
+ | |Cannot find user to connect to file upload | ||
+ | |form | ||
+ | | | ||
+ | |- | ||
+ | |PHP move uploaded file error (file-handling) | ||
+ | |upload and canvas | ||
+ | |shown when a files or files are uploaded using FlexForm, but FlexForm cannot store them in the defined temp folder | ||
+ | |Make sure you set the FlexForm config : <code>$wgFlexFormConfig['file_temp_path'] = "";</code> | ||
+ | to a path where FlexForm has write rights. If you leave this empty, FlexForm will try to temporarily store the uploaded files in its own extension folder in the uploads folder. You can also check to see if this folder has write rights. | ||
+ | |} | ||
+ | |||
+ | === Error messages in the browser's console === | ||
+ | |||
+ | {| class="table" | ||
+ | |- | ||
+ | | <code>Uncaught (in promise) ReferenceError: wgFlexFormSecure is not defined</code> (FlexForm.general.js) | ||
+ | | JavaScript error. This message may show if you forgot to set <code>$wgParserCacheType = CACHE_NONE;</code> in your LocalSettings.php file. Some features, such as instances, may not work without it. | ||
+ | |- | ||
+ | | <code>Uncaught SyntaxError: redeclaration of let ffDecryptObj</code> (FlexForm.general.js) | ||
+ | | JavaScript error. Same as above. | ||
+ | |- | ||
+ | | <code>SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line [...] column [...] of the JSON data</code> (FlexForm.general.js) | ||
+ | | This may happen if you have set your config options for debugging in such a way that any PHP warnings are printed, in turn mangling the JSON output expected by FlexForm. It is generally not a good idea to permanently use settings like <code>ini_set( 'display_errors', 1 ) </code> or <code>error_reporting( E_ALL )</code> in a live environment. | ||
|} | |} | ||
− | ===Discord=== | + | === Discord === |
You might find a helping hand here as well : https://discord.gg/ehFrPmT | You might find a helping hand here as well : https://discord.gg/ehFrPmT | ||
ws-class-props | |||
---|---|---|---|
Line 1: | Line 1: | ||
− | + | {{Doc properties | |
+ | |Doc subject=DevOps:Doc/FlexForm | ||
+ | |Subject version=1.0,1.1,2.0,2.1 | ||
+ | |Doc parent= | ||
+ | |Doc sort order=1000 | ||
+ | |Doc target group=User | ||
+ | |Doc synopsis=Common behaviour and list of (error) messages that might occur | ||
+ | }} | ||
ws-seo | |||
Line 1: | Line 1: | ||
− | + | {{SEO | |
+ | |Title=Troubles and Error messages | ||
+ | |Keywords=mediawiki,flexform | ||
+ | |Description=Common behaviour and list of (error) messages that might occur | ||
+ | |Section=Documentation/FlexForm | ||
+ | |Title mode= | ||
+ | |Title separator= | ||
+ | |Robots= | ||
+ | |Googlebot= | ||
+ | |Image=About_FlexForm.jpg | ||
+ | |Image alt= | ||
+ | |Image width= | ||
+ | |Image height= | ||
+ | |Locale= | ||
+ | |Site name= | ||
+ | |Author= | ||
+ | |Published time= | ||
+ | }} | ||
ws-page-props | |||
Line 1: | Line 1: | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 12:47, 11 June 2024
Name
Troubles and Error messages
Type
_form
Synopsis
Common behaviour and list of (error) messages that might occur
Description
Tag extensions, like FlexForm, cannot hold any html in its arguments.
<_input type="text" value="hello<br>how are you" />
The above example will simply not be rendered. This is how MediaWiki tags work. You can use the following syntax, it at least will not break. It is another way of writing tag code.
{{#tag:_input||type=text|value=hello<br>how are you}}
The HTML will be filtered out. However, with the new Parsoid Parser that is introduced, do not use the {{#tag:}} method anymore. It will give unpredictable results as Parsoid renders these tags in no particular order.
Here's a list of common error messages that might occur, with a brief description of what the problem might be.
Message | Type | Why | Possible solutions | |
---|---|---|---|---|
Can not find template | _email | shown when the page mentioned in the template cannot be read or parse by the API | check page name if it exists or not miss-spelled | |
not a secure form | form | shown when the sec option is set to true and the form has been manipulated after form submit | ||
Secure fields not complete | form | shown when the sec option is set to true and files with type is secure (not to be manipulated with) are incomplete after a form submit | ||
Did not receive a session token from the form | form | shown when a secure token that is generated by FlexForm did not come with a form submit | ||
Form session expired | form | shown when the time between a form render and the actual submit has taken to long | Change the config option form-timeout-limit to a higher number in seconds ( default 7200 secs = 120 mins = 2 hours ) | |
No return found | form | shown when a form has been submitted but FlexForm cannot find a page to return to after handling the form | ||
no captcha details | reCaptcha | shown when a form with a recaptcha has been submitted, but no recaptcha information can be found in the form | ||
No requests | form | shown when a form has been submitted, but FlexForm could not find any valid request | Usually this means the action parameter of a form is invalid. | |
Cannot find user to connect to file upload | form | |||
PHP move uploaded file error (file-handling) | upload and canvas | shown when a files or files are uploaded using FlexForm, but FlexForm cannot store them in the defined temp folder | Make sure you set the FlexForm config : $wgFlexFormConfig['file_temp_path'] = "";
to a path where FlexForm has write rights. If you leave this empty, FlexForm will try to temporarily store the uploaded files in its own extension folder in the uploads folder. You can also check to see if this folder has write rights. |
Error messages in the browser's console
Uncaught (in promise) ReferenceError: wgFlexFormSecure is not defined (FlexForm.general.js)
|
JavaScript error. This message may show if you forgot to set $wgParserCacheType = CACHE_NONE; in your LocalSettings.php file. Some features, such as instances, may not work without it.
|
Uncaught SyntaxError: redeclaration of let ffDecryptObj (FlexForm.general.js)
|
JavaScript error. Same as above. |
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line [...] column [...] of the JSON data (FlexForm.general.js)
|
This may happen if you have set your config options for debugging in such a way that any PHP warnings are printed, in turn mangling the JSON output expected by FlexForm. It is generally not a good idea to permanently use settings like ini_set( 'display_errors', 1 ) or error_reporting( E_ALL ) in a live environment.
|
Discord
You might find a helping hand here as well : https://discord.gg/ehFrPmT