- π©πͺGermany Anybody Porta Westfalica
Latest changes should go into 2.1.x - please recheck if this issue still exists!
- Status changed to Postponed
6 months ago 5:29pm 11 November 2024 - π©πͺGermany Anybody Porta Westfalica
I guess we should better postpone this on π ConditionManager::evaluate() should not negate results itself Needs work to inform others and use the patch until that, if needed.
- πΊπΈUnited States droath
I finally decided to confront this issue myself and began investigating what was happening, while also trying to recall my thoughts during the initial development process. Based on the current architecture of the Drupal condition API, it seems that core conditions are at least managing negation within the evaluation method of the condition plugin. I believe this was the standard that most developers were using within contrib. has well.
With that in mind, it makes more sense to wait for guidance from Drupal core. If they decide that condition plugins shouldn't handle their own negation, then we can patch the code accordingly. However, until a decision is made, I think the best approach would be to use the Drupal core patch https://www.drupal.org/project/drupal/issues/2535896 π ConditionManager::evaluate() should not negate results itself Needs work to address this issue. Checking the `$condition->isNegated()` method and negating the value ourselves could introduce more bugs, as there is no clear way to determine whether the condition evaluation method has implemented the negation within the evaluation or not.