Reply to thread

Admittedly I did miss the info about toggling so I was rash in my dismissal of it. Sorry about that. But to be clear, the behaviour you describe in your first example is not how it works. We do only toggle ads that are passed into the request and others are ignored.


[CODE="php"]$activeState = $this->request->filter($options['input'], 'array-bool');

$entities = $this->em->findByIds($identifier, array_keys($activeState));[/CODE]


$options['input'] here is the name of the input. It's usually active and will get the IDs of each checkbox on the current page, then what is fetched and toggled from there is based entirely on that. In other words if Bob has ads 1 and 2, and Alice has created ad 3 since Bob reloaded the page, only ads 1 and 2 will be changed.


Your second example is reproducible but my feelings of it still mostly stand. This is how we've been handling toggle elements as far back as XF 1.0 and it affects literally any list page that contains toggles. Changes here would be outside the scope of a bug report as it would require a fairly significant change of approach and not one we would be targeting for a bug fix release.


Back
Top Bottom