🇨🇦Canada @laura.j.johnson@gmail.com

Toronto
Account created on 2 June 2008, over 16 years ago
#

Recent comments

🇨🇦Canada laura.j.johnson@gmail.com Toronto

I implemented it by creating an entity reference view that filters by group argument and then altering the link widget on the menu_link_content form to use that view for autocomplete. But yes it would be a helpful feature! +1

🇨🇦Canada laura.j.johnson@gmail.com Toronto

We decided not to add POTS to Sous as we may want other options.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

If it fails validation after the recipe is applied, then what should happen?

🇨🇦Canada laura.j.johnson@gmail.com Toronto

I agree, I think the Distributions part is a bit misleading and confuses people.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

Thanks Mike! Putting back into RBTC.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

Can we put it back into RBTC or is there something else needed?

🇨🇦Canada laura.j.johnson@gmail.com Toronto

Great! Just tagging Josué for credit for his review/test.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

I have verified this is not an issue in the current version. Marking as fixed.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

This is available in the current version. Marking as fixed.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

This exists in the current version, closing.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

I believe this ticket is still valid for Sous with recipes but needs to be updated.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

This was for the previous release of Sous. It would be helpful to know if you run into the same issue now. The command is the same minus the --no-interaction.

composer create-project fourkitchens/sous-drupal-project [PROJECT-NAME]

🇨🇦Canada laura.j.johnson@gmail.com Toronto

Good point, maybe we can discuss in Same Page? I'll open an issue.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

PR was merged, this was fixed.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

I added a MR with an update to RecipeConfigInstaller to install config in collections if provided. It works, although I'm not sure if there should be more to it than that, ie does the config in collections also need the dependency manager.

I added an example_translation recipe and an automated test.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

In attempting to create a test for this I found that the RecipeConfigInstaller doesn't process translations, which is to say that if you put language files in config/language/[langcode], it ignores that config. I'll create a new issue for that and leave this one here for creating documentation once that's fixed.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

For this we're testing enabling translations and adding config of different languages to the config folder and verifying that it imports it correctly, yes?

🇨🇦Canada laura.j.johnson@gmail.com Toronto

I am also running into this by installing the Minimal profile and then applying a recipe that enables gin + gin_toolbar + navigation and importing config '*' from the navigation module.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

Yes I was going to say that it could take region as an argument...

🇨🇦Canada laura.j.johnson@gmail.com Toronto

This looks good to me, except that I find it a little odd that in some cases we label it in agreement with the method verb:
setRequired() label = 'Set whether field is required'

...but other times instead of 'set' it's 'change'
setSettings() label = 'Change field settings'

I think I would always go with 'Set' (or whatever the verb of the method is).

I'll test all of these in a recipe at contrib day tomorrow.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

We are also encountering this issue with 6.1.3 using the Linkit widget with a core formatter, in this case the Separate link text and URL formatter. And it's also with file entities.

If core link formatters expect a decoded url then it seems ideal that the Linkit widget should take care of decoding the url. I'm not sure if there is a better way to accomplish that but here is a patch that adds an urldecode() step in MassageFormValues() in LinkWidget.

Steps to reproduce:

install Linkit 6.1.x-dev
Upload a file/media with a space in the name
Edit the basic page content type, add a link field with default settings but change the form display to use the linkit widget, change the display to use a non-linkit formatter like Separate link text and URL
Create a page using the basic page content type and link to the file/media with the link field.
On the edit page the link will appear like this: /sites/default/files/2023-03/name%20with%20space.pdf
When the page is saved and viewed the link will appear like this: /sites/default/files/2023-03/name%2520with%2520space.pdf

🇨🇦Canada laura.j.johnson@gmail.com Toronto

@thejimbirch I tried your suggestion and that doesn't work even to append it. It threw the exceptions you see in the action for mapping/definitions checks, but even if I comment those it doesn't seem like chaining them the way you describe works in this case. It would be cool if it did.

I also tried

simple_config_add:
        third_party_settings.field_group.group_content.children: field_content

Thanks @wim-leers, This suggests that it will be more complicated... probably a separate config action if we want to keep this one 'simple'!

🇨🇦Canada laura.j.johnson@gmail.com Toronto

I opened a MR so I could try it out as a patch. I agree with @sonfd's thoughts on this, I wonder if with #1 and #2 the normal config save event will take care of sorting.

I also wonder about adding something to a particular subkey, eg.

    core.entity_form_display.node.page.default:
      simple_config_add:
        third_party_settings:
          field_group:
            group_content:
              children:
                <strong>- field_content</strong>
                - field_text

Is there a way we can specify that we want to add an item to the children here?

Right now I'm using simple_config_update to replace the entire third_party_settings for this config just to get that child in there.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

I have tested this and confirm it works both for setComponent() and setComponents(), the settings and third party settings are applied properly.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

This works:

core.entity_view_display.node.page.default:
  setComponent:
    name: field_content
    options:
      type: entity_reference_revisions_entity_view
      label: hidden
      settings:
        view_mode: default
        link: ''
      third_party_settings: {  }
      weight: 10
      region: content

This works with setComponents(): from here

core.entity_form_display.user.user.default:
      setComponents:
        -
          name: field_last_password_reset
          options:
            type: datetime_default
            weight: 4
            region: content
            settings: {  }
            third_party_settings: {  }
        -
          name: field_password_expiration
          options:
            type: boolean_checkbox
            weight: 3
            region: content
            settings:
              display_label: true
            third_party_settings: {  }
🇨🇦Canada laura.j.johnson@gmail.com Toronto

This adds the field, but it strips out all of the settings and third party settings. I'm wondering if there's another function I can use to add those...

https://git.drupalcode.org/project/distributions_recipes/-/blob/11.x/cor...

🇨🇦Canada laura.j.johnson@gmail.com Toronto

Also, the machine name of the field has to be in quotations.

    core.entity_view_display.node.page.default:
      setComponent:
        'field_content'
        -
          type: entity_reference_label
          label: above
          settings:
            link: true
          third_party_settings: {  }
          weight: 10
          region: content
🇨🇦Canada laura.j.johnson@gmail.com Toronto

I'm trying to use this to add a field to existing form and view displays using the sample action here, but I get this error:

In YamlSymfony.php line 40:

  Mapping values are not allowed in multi-line blocks
🇨🇦Canada laura.j.johnson@gmail.com Toronto

I notice that Drush GenerateCommands uses the Symfony Console component. Maybe it could be used here?

🇨🇦Canada laura.j.johnson@gmail.com Toronto

In my case there was a broken sort handler in the view. If you take a look at the view in the UI you may be able to see the problem.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

I'm having the same issue. You can reproduce it by adding a block type that references a paragraph that includes a sub-paragraph (multivalue).

I rerolled the patch.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

For anyone looking to suppress this warning until the related issue lands, this is the patch that's working for me. Similar to the one posted except it needs the null coalescing operator:

$element[$name]['#weight'] = $options['weight'] ?? 0

🇨🇦Canada laura.j.johnson@gmail.com Toronto

@bluegeek9

Sorry for the confusion! I just didn't have the most recent version of 1.0.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

@bluegeek9

Sorry for the confusion! I just didn't have the most recent version of 1.0.

So, make sure your authorization is updated and you should not see these warnings/errors.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

Over at the authorization module, they have a patch for these errors but they have not created a new release.

See: https://www.drupal.org/project/authorization/issues/3327917 📌 Drupal 10 patch (rector) Fixed

You can get the updates by using the dev version:

composer require 'drupal/authorization:1.x-dev@dev'

🇨🇦Canada laura.j.johnson@gmail.com Toronto

+1 request for a new release. Some of us are trying to update authorization_group for D10 compatibility and are seeing the authorization errors:

https://www.drupal.org/project/authorization_group/issues/3386268 💬 Drupal 10 working version? Active

Thanks!

🇨🇦Canada laura.j.johnson@gmail.com Toronto

See the fork, we have the sous_base recipe.

🇨🇦Canada laura.j.johnson@gmail.com Toronto

This works for me using focal_point 2.0.

Production build 0.71.5 2024