Both sides previous revisionPrevious revision | Next revisionBoth sides next revision |
en:create:debugging [22.09.2017 17:09] – johannes.lotz | en:create:debugging [22.09.2017 17:22] – johannes.lotz |
---|
{{:de:create:scr.debug.info03source.png?nolink|Eine Fragebogenseite, die u.U. leer bleibt}} | {{:de:create:scr.debug.info03source.png?nolink|Eine Fragebogenseite, die u.U. leer bleibt}} |
| |
In der [[#debug-information|Debug-Information]] ist nicht nur ersichtlich, dass und weshalb die Frage "AB05" nicht angezeigt wird, sondern auch dass es automatisch mit der nächsten Seite Nr. 4 weitergeht. | In the [[#debug-information|Debug-Information]] not only can one observe why item "AB05" is not shown but also that it will automatically continue with page 4. |
| |
{{ :de:create:scr.debug.info03.png?nolink |beispiel}} | {{ :de:create:scr.debug.info03.png?nolink |beispiel}} |
| |
Darüber hinaus ist links oben an der Seitennummer "3+4" erkennbar, dass die Seiten 3 und 4 gemeinsam angezeigt werden. Diese Anzeige erhält man auch, wenn man ''[[:de:create:functions:gotopage]]'' verwendet: Dieser Befehl springt aus einer Fragebogenseite hinaus direkt zu einer anderen. | Furthermore, on the top left you can find the page numbers "3+4", which means that these pages will be shown at once. This display also results if you use ''[[:de:create:functions:gotopage]]'' : this command takes you directly from one page of the questionnaire to another. |
| |
| |
==== Beispiel ==== | ==== Example ==== |
| |
Folgender PHP-Code sollte ab einem Summenwert von 25 zu einer anderen Fragebogen-Seite springen und dort (über den weiteren Fragen) einen Text anzeigen -- aber vom Text ist nichts zu sehen: | The following PHP code shall after a value of the sum of 25 jump directly to another page of the survey and there (above other questions) show a specific text information -- but the text cannot be found: |
| |
<code php> | <code php> |
</code> | </code> |
| |
Hier helfen nun die Informationen, welche der Debugging-Modus liefert ([[#debug-information|Debug-Information]]). Diese zeigen, dass der Befehl ''[[:de:create:functions:text]]'' gar nicht ausgeführt wird, das ''goToPage()'' aber schon. Am Filter kann es also nicht liegen, dieser funktioniert. | Here only the output of the debugging mode will help ([[#debug-information|Debug-Information]]). This shows that the command ''[[:de:create:functions:text]]'' is not being executed, the ''goToPage()'' however is. Thus it is not the filter that produces the problem. |
| |
Ein Blick in die Anleitung des Befehls ''[[:de:create:functions:gotopage]]'' verrät daraufhin, dass dieser direkt zur angegeben Seite springt und dann nichts mehr von der aktuellen Seite ausgeführt wird, in diesem Beispiel also auch nicht das ''text()''. Kennt man die Ursache, ist die Lösung einfach: Das ''text()'' muss vior das ''goTopage()''. | Take a look a the initial of the command:''[[:de:create:functions:gotopage]]''. It tells us that it will make you jump to the specific page directly without executing anything else on the page of origin. In this example, not even ''text()''. If you are aware of the cause, the solution is simple: Move ''text()'' in front of ''goTopage()''. |
| |
<code php> | <code php> |