- Issue created by @mkalkbrenner
- 🇮🇱Israel jsacksick
Are you using the contextual filter introduced in the latest release? From issue ✨ Provide Views argument for current user's profile ID Fixed ?
Downgrading the priority to "major" as it doesn't render your site unusable afaik: https://www.drupal.org/docs/develop/issues/fields-and-other-parts-of-an-... →
- 🇩🇪Germany mkalkbrenner 🇩🇪
Are you using the contextual filter introduced in the latest release? From issue #2835930: Provide Views argument for current user's profile ID?
No, it happens with the current store and our own contextual filters. So it seems that this new contextual filter modifies all the forms somehow.
And https://git.drupalcode.org/project/profile/-/commit/457170d860ab4aa6d3b3... seems related.BTW for us it is critical as we need to adjust all our views with contextual filters and that can't be done by the site administrators.
- 🇮🇱Israel jsacksick
hm... Extremely weird that the setting applies to all contextual filters... So you're saying just the "#required" attribute is causing this? WIthout the #required flag everything works ok?
- Status changed to Needs review
10 months ago 8:29am 26 March 2024 - Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
10 months ago Waiting for branch to pass - 🇩🇪Germany mkalkbrenner 🇩🇪
This patch solves the issue for us. It seems that you have to set the required flag only if this default argument is really selected. Or handle it in the form validation.
- 🇮🇱Israel jsacksick
I didn't test that change I must admit, I was pinged by somebody from my team who reviewed the contextual filter and was surprised to see the setting not required as the contextual filter cannot work without the #required attribute.
- 🇸🇰Slovakia poker10
@jsacksick I can confirm this issue as well (as I have also reported here ✨ Provide Views argument for current user's profile ID Fixed ). The #required attribute is the problem. The filter seems to be rendered even if not selected and thus the #required attribute prevents the possibility to save all contextual filters (therefore I think this is pretty major). Removing the #required attribute solved the problem for us.
I do not see any other class extending
ArgumentDefaultPluginBase
with #required attribute inbuildOptionsForm()
. If we want to require it, maybe we can use#states
instead, or check it in the validation, as proposed in #5. Thanks for looking at this! -
jsacksick →
committed 832344ae on 8.x-1.x
Issue #3435967 by mkalkbrenner: Saving contextual filters broken in...
-
jsacksick →
committed 832344ae on 8.x-1.x
- Status changed to Fixed
10 months ago 1:14pm 27 March 2024 - 🇮🇱Israel jsacksick
Committed the change, thanks! Will tag a new release with the fix.
- 🇩🇪Germany geek-merlin Freiburg, Germany
FTR: If this causes regressions, i guess the #states voodoo needs to care for #required too.
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇺🇸United States Cayenne
I just updated to the latest version (10.2.5) and I am still experiencing this bug
Simple view of nodes, add a contextual filter by ID fails, with the dreaded "The submitted value in the Profile type element is not allowed." problem.
- 🇸🇰Slovakia poker10
@Cayenne Have you updated the Profile module to 8.x-1.10 → as well? This was a bug in the Profile module, not in Drupal core.