Open houcemL opened 3 years ago
if no field is displayable, the step is skipped but this does not cause an infinite loop.
infinite loops can be caused when executing business rules. For example: 1) Rule R1 modifies the value of data D1. 2) D1 triggers rule R2 3) R2 modifies the value of D2 4) D2 triggers rule R3 5) R3 modifies the value of D1 6) and hop, we go back to 2)
So check your rules!
Ths for your reactivity
Actually for my infint loop i have no business rule, no fields or group of field even i have no data, all what i do is defining a step with a section with some text
In the algorithm if we have one field displayable we consider the step it self displayable ...
Is your xml confidential? if not can you post it here?
`<?xml version="1.0" encoding="utf-8"?>
I cannot run your XML because it is malformed
i just edit my comment deleting all content from CDATA you can add manually some text
the main idea to reproduce the behavior is to define a simulator with a step with a panel with a bloc of information with a chapter with a section with some text. nothing else. no data no group of fields no fields nor rules.
i fixed with default value $direction = 1; don't sure if i will have some regressions.
but still don't understand the stepDisplayable meaning https://github.com/eureka2/G6K/blob/3fe4dc0488aa12475061f7f74194b2ce00f5ad6a/src/G6K/Controller/BaseController.php#L522
Fixed in release 4.4.8 ! thks fo reporting
ths this resolve the behavor but still have some idéas, what if we consider a step displayable if all block info displayable or all field displayable ? we will have a while condition like this
} while ($stepDisplayableInfos && $stepDisplayableFields && $istep > 0 && $istep <= $stepCount);
and these two flags are initialized as true in the begening of each step processing
do { $stepDisplayableFields = true; $stepDisplayableInfos = true;
https://github.com/eureka2/G6K/blob/3fe4dc0488aa12475061f7f74194b2ce00f5ad6a/src/G6K/Controller/BaseController.php#L771
Hello
Refering to the LOC the algorithm consider the step diplayable when at least one field is displayable. What if we have one field displayable = true and another false ? or there is a certainty that if one field is displayable all the others are ?
What if we want to make a pure informatif step with no fields ? i already try to make so all is goog the xml is valid but all what i'v got is a infinit loop testing the result with try it
Ths