Vancouver
Account created on 5 July 2007, almost 18 years ago
#

Merge Requests

More

Recent comments

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Since @catch reverted the other issue, I caught up the branch to see if it now passes as I assume is expected now.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → made their first commit to this issue’s fork.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Sorry if I sound defensive, I am in a rush to get out the door... I will look a bit later to see if I can understand a bit deeper what is going on between the two regressions. It feels like it needs to be some sort of fallback in my guess, but it is likely way more complicated than that.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

@acbramley see the test we have here, there was a regression fixed here as well. The screenshot shows the field handler was copied to all the handlers where in D7 it was only on 2 (that's why it appears to be a copy/paste mistake, it wasn't copied over like that on any of the other related commits at the time, in my deep dive/hunt for the root of the problem). Removing them let the default shine through (EntityField in our case).

https://git.drupalcode.org/project/drupal/-/commit/d15e2ea581dac9e112f15...

The here is the field we are testing aggregation on (id).
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/views...

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

@catch, It looks like there may be a regression—thanks for catching that.

Ideally, we'd add more tests here to show the new regression, no? The test in here shows the regression we'd been living with for a while.

See the screenshot of the various problems this solves in #58 #2735997-58: Decimal separator and decimals settings ignored when aggregating decimal fields → on top of it looking to be a copy/paste mistake (I keep saying that but looking at the diff it might be hard to see what I am saying), I wish dawehner could confirm this... sigh

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → made their first commit to this issue’s fork.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → made their first commit to this issue’s fork.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

The formatting is a bit jarring but the code looks solid.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

That is reasonable and good to bump the version of Drupal up to 10.3 to coincide with this change.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

That seems like a way forward here, thanks @joachim

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver
šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → created an issue.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Thanks for your help I finished off the last little bits here and committed this all.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Thanks, glad to be on the board of dependencies!

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Thank you @anish.ir, I have merged this in.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

šŸ“Œ Add DDEV Drupal Contrib for ease-of-maintenance Active Hope you don't mind, I cloned this great issue summary for calendar.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Looks like this has been resolved, I did offer to co-maintain that module to help easier in the future. šŸ“Œ Offer to co-maintain Active

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

I know there are test failures. I will fix them in the parent issues. I made PHPCS more strict, copying from what we did in og → .

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → created an issue.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

This is a quickfix but it needs a pager that reads the value too, though it is better than nothing as someone could write a Views argument or argument default plugin that would read from the query string.

Side comment in the issue summary I wrote ?month=2025-04 even though I know in D8+ the month arg is in Ym format. I would like to see this easily configurable because ?month=202504 is practical but not a great hackable/human parseable URL

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Thanks @claudiu.cristea!

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Reviewed about half of the files touched here, caught a couple of things and they were addressed. This is good enough to be committed to the dev branch as all the big things are addressed and lots of huge improvements. Anything missed can be caught in production šŸš€ 🫣

Thanks @claudiu.cristea for taking this on!

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Needs review from a path forward/proposal perspective, I know it needs tests still.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Could use a second pair of eyes, but this simple changes makes a big difference.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → created an issue.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Back to RTBC, the problem I ran into was a separate issue, this MR doesn't affect submissions, I will create a separate issue for that.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → changed the visibility of the branch 8.x-1.x to hidden.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → changed the visibility of the branch 2.0.x to hidden.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Have one issue where the first column misses values (most of the time, I saw one numeric one migrate fine).

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Fix seems to work.

Here's an example config export diff after it works, that is the way the current webform exports this.

diff --git a/config/sync/webform.webform.webform_838.yml b/config/sync/webform.webform.webform_838.yml
index 8474014b2..608564abe 100644
--- a/config/sync/webform.webform.webform_838.yml
+++ b/config/sync/webform.webform.webform_838.yml
@@ -149,16 +149,17 @@ elements: |-
             checked: true
   current_employer:
     '#type': textfield
-    '#unique': false
-    '#title_display': inline
     '#title': 'Current employer'
+    '#title_display': inline
     '#states':
       visible:
-        - ':input[name="current_employment_status[industry]"]':
+        - ':input[name="current_employment_status[Industry]"]':
             checked: true
-        - ':input[name="current_employment_status[academia]"]':
+        - or
+        - ':input[name="current_employment_status[Academia]"]':
             checked: true
-        - ':input[name="current_employment_status[startup]"]':
+        - or
+        - ':input[name="current_employment_status[Startup]"]':
             checked: true
   current_job_title:
     '#type': textfield

Note the keys aren't lowercased because that is not correct and has been corrected here as well.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

The reroll is quite tricky because the logic for yaml creation changed... I am moving this back

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → changed the visibility of the branch 8.x-1.x to hidden.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Let's see this on 2.x

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

It would be so nice if the tests didn’t change. Are the test changes really necessary? Adding more expected assertions is fine, but changing the provider values reduces confidence in the change.

Thanks for picking this up, it's been sitting for a while.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

We don't need to bump Drupal here as if 2.x is asked for composer will do the requirements there for Drupal 10.3. So I will leave this commit simple.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

I would say this adds lots of complexity for little value, I would suggest closing as won’t fix. Consider deleting would have no rows to select for example. I’ll let Graber decide though, he might have another take

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Could you tell me what issues you have worked on for this?

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → made their first commit to this issue’s fork.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

I cherry-picked the version into the 2.x branch to move the needle a bit, I want to get some constraints using PHP attributes.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Thanks moshe in slack for pointing me here and thanks @herved for the workaround in #203!

I was getting
Behat\Mink\Exception\ElementNotFoundException: Button with id|name|label|value "Save" not found.
Which was a FieldException if you looked at the page content

The website encountered an unexpected error. Try again later.

Drupal\Core\Field\FieldException: Attempted to create, modify or delete an instance of field with name og_audience on entity type node when the field storage does not exist. in Drupal\field\Entity\FieldConfig->getFieldStorageDefinition() (line 323 of core/modules/field/src/Entity/FieldConfig.php).

Drupal\og\OgGroupAudienceHelper->getAllGroupAudienceFields() (Line: 48)
šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Thanks for the call today. I realized during the call og_non_member_post was custom in D7 on our site, so we can just implement that.

We will handle the bug (I think @ramil g did it already) in šŸ“Œ OG reference field widget update: MR #570 did not properly merge, leaving og_complex in place Active .

I will close this as works as designed.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

It should pass the tests and merge, closing as fixed.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → created an issue.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Thanks for catching that, I have committed the code.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → made their first commit to this issue’s fork.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Thanks @smustgrave for trying to triaging this queue, and trying to reproduce the bug, also appreciated.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Same solution we are using in QuickTabsInstanceEditForm, and the function quicktabs_machine_name_exists doesn't exist so obvious oversight along the way. Thanks for the fix @tibezh.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

@osopolar that’s a really good point — I should know better than to make assumptions about how this works. I was under the impression minified was an action to be taken rather than a descriptor. But you’re right, the docs clearly state otherwise. Looks like I’ve been shooting myself in the foot here! Thanks so much for pointing it out.

That said, I still think the page-cached asset URLs are a problem, regardless of my incorrect understanding. I’ll try to update the issue summary to reflect that.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Yes and no:), we have language enabled because search_api or the solr extension requires it but we are doing that one to one, und to en.

Do you think that is the ticket?

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

@amitaibu alternative I discussed with @ramil g, we can force the og:default in the field UI, and maybe strip out the option to select views or other ER entity reference selection handlers that are inherited? Then we create a separate OG specific handler for og_non_member_post.

For illustration purposes this is what I am talking about regarding this bug.

Before save:
→

After save:
→

D7
→

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

@amitaibu, thanks for the context. Just to clarify, when the field UI saves, it saves/exports the default:node selection handler, when it's created it's og:default. Although you mentioned it might be a bug, I believe it’s working as intended—that it should export and create the handler that way (currently creates the field as og:default).

The result would be that the audience field is created with a new handler that only allows selecting groups where the user is a member (with the OG admin exceptions), while default:node continues to work like the D7 og_non_member_post. This approach keeps the logic simple and ties it directly to the site builder’s explicit choice. What do you think?

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Thanks for the context, @catch—much appreciated! I was pretty sure it would get in eventually, just didn’t want it to be one of those ā€œnot really RTBCā€ cases.

I’m really glad this bug is finally squashed—I kept running into it with aggregation enabled on all my migrations!

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Thank you both and sorry for the delay, I just spotted this today.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

@berdir Making the references to the preprocess in the Twig file is important to indicate the alter point.
That said, I prefer using the new/recommended approach while still preserving the old method. This serves as implicit documentation, helping those extending it understand how to do it going forward properly.

So +1 for what you've been doing from what I see at a glance. /Theme system maintainer hat šŸŽ©/

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

I've merged this into 2.x branch. All the tests and some quick manual tests show it's working the same as it did before.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Thanks for reporting this, the proposed solution is good, it’s likely coming from an upgrade where we didn’t provide defaults in a hook or otherwise

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

joelpittet → changed the visibility of the branch 8.x-1.x to hidden.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

To reiterate, this issue was introduced accidentally due to a copy/paste error, and it has been there for quite some time.
https://git.drupalcode.org/project/drupal/-/commit/684b4a036e736b16d21a1...

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

@heddn thanks for adding checkboxes support, any idea why it's not whitelisted and implicitly unsafe in the tests? Scouring the code didn't help discern why.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

It looks like something changed the useage needs a value of 'true' now
prepopulate/src/Populate.php:137

        case 'checkbox':
          $form['#checked'] = $value === 'true';

So that would be
edit[field_name][widget][123]=true

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

We might need to do what @kerasai and extend PaymentInformation because we can get a free order with the promotion but trouble when the product is price 0 to begin with.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Sorry you did this already, I must have been looking at the wrong branch. It seems like the branches are a bit wonky in here btw, this MR is ahead and behind and also on 3.4.x all at the same time, won't update the branch for some reason

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

@amitaibu and @claudiu.cristea,

While working on this, I’m not finding ā€œrealā€ permissions. The code isn’t detecting ā€˜administer group’, and it’s getting removed in OgRole::calculateDependencies().

This line: $permission_definitions = \Drupal::service('user.permissions')->getPermissions(); isn’t returning the expected results.

I’m unsure about the intended behaviour—are we relying on Drupal’s permissions, or are we using our own? If it’s the latter, I can dig in further, but I’m currently hitting a wall. Any insights?

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Fixed that caveat by trimming the raw value to remove whitespace before and after the values.

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Maybe it’s not being encoded and/or decoded with urlencode()?

Probably need to step through

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

@nicxvan I had a look, trying it out IRL right now. The code looks good to me, going to mark this RTBC from my end as it does what is on the Tin ;)

šŸ‡ØšŸ‡¦Canada joelpittet Vancouver

Already in both branches as it was committed before the creation of the 2.x

Production build 0.71.5 2024