Account created on 8 July 2011, almost 14 years ago
#

Recent comments

🇬🇧United Kingdom dahousecat

$context['resource_type'] is set in entity_share/modules/entity_share_client/src/Service/JsonapiHelper.php from the return value of ResourceTypeRepository->getByTypeName()

This will return null if a resource type is not found with that name.

Just showing the user which name returned null, and possibly a list of valid names, would go a long way to helping debug what the underlying issue is.

E.g.

if (!$resourceType instanceof ResourceType) {
  $allTypes = $this->resourceTypeRepository->all();
  $args = [$data['type'], implode(', ', array_keys($allTypes))];
  throw new \InvalidArgumentException(vsprintf('ResourceType with name %s not found. Valid names are: %s', $args));
}

After I added this code when when syncing entities that fail I now get an error like:

ResourceType with name node--region not found. Valid names are: batch_plugin_entity--batch_plugin_entity, block--block...
🇬🇧United Kingdom dahousecat

This patch is against the 2.1.x branch as I had issues running the dev branch.

🇬🇧United Kingdom dahousecat

Patch #6 applies and lets me set the from address 👍

🇬🇧United Kingdom dahousecat

Patch applied cleanly and fixed the error, but the then I got this error upon enabling the module:

PHP Fatal error:  Trait "Symfony\Component\DependencyInjection\ContainerAwareTrait" not found in /var/www/html/web/modules/contrib/queue_stats/src/Plugin/QueueStatistic/EstimatedTimeToFinish.php on line 22

I replaced

use Symfony\Component\DependencyInjection\ContainerAwareTrait;

with

use League\Container\ContainerAwareTrait;

in EstimatedTimeToFinish.php and now it works.

🇬🇧United Kingdom dahousecat

That default value for options is still not correct.

🇬🇧United Kingdom dahousecat

Updated last patch to fix bug with missing default value on options in schema, and updated js to not reuse mapbox_renderer namespace and make map object available to custom modules.

🇬🇧United Kingdom dahousecat

I see, the ID was already there as the key, but it's just mapbox_field was not setting the key.

Updated the patch to use the ID from the settings key.

🇬🇧United Kingdom dahousecat

To ensure that renderMap() is only called once per mapbox_renderer settings instance I have introduced a requirement where an id property must be set on the settings object.

E.g. mapbox_renderer[0].id

This id matches the id of the field wrapper.

This allows targeting that element using once, to ensure settings are only bound once.

As a result of this MapboxFormatter from the mapbox_field module will also need to be updated.

I'm working on patching a number of issues in that module so will include that update there.

🇬🇧United Kingdom dahousecat

I agree with dawehner, if a view is missing a warning should be logged.

I was also getting undefined index due to these lines in getTokenArgument:

return [
  'type' => $match['type'],
  'id' => $match['id'],
];

So this patch addresses that issue too.

🇬🇧United Kingdom dahousecat

Huh, actually the exception was thrown via trackUpdateOnEdition, not trackUpdateOnDeletion.
Updated patch to try catch that method too.

🇬🇧United Kingdom dahousecat

Patch 3 would not apply for me due to the "Information added by Drupal.org" bit so I've created a version with that it in.

🇬🇧United Kingdom dahousecat

I think that approach sounds very wise.
The patch I have will solve my use case for now, but once this feature gets added I can delete my patch :)

🇬🇧United Kingdom dahousecat

Example data-disabled-dates attribute:

data-disabled-dates="2024-12-17,2024-12-18,2024-12-19,2024-12-25,2024-12-26"

🇬🇧United Kingdom dahousecat

Sorry, wrong thread. Please ignore me.

🇬🇧United Kingdom dahousecat

My bad, I was still using vs 10.0.0 not 11 simplewebauthn/browser.
Now a load of other things are broken instead but I assume once I fix bugs those I'll have some base64 encoded ids!

🇬🇧United Kingdom dahousecat

Hi, thanks for the swift reply :)

The MR looks good to me, better than my patch as simpler.

Yes, it's a shame this update has so many breaking changes but thanks for the pointer - I'll review the updated documentation.

🇬🇧United Kingdom dahousecat

I did try and create an MR but I'm having some issues with permissions when pushing and it's late so will just attach a patch for now.

🇬🇧United Kingdom dahousecat

The last patch fails on 10.2.7 as LinkItem now provides it's config via annotation.

🇬🇧United Kingdom dahousecat

Could serializePublicKeyCredential() be updated to also accept PublicKeyCredentialCreationOptions?

🇬🇧United Kingdom dahousecat

Updated patch to append "action" on end of the input url to the end of the iframe src.
For example if url ends with /interaction this is kept.

🇬🇧United Kingdom dahousecat

I think creating a new provider for Vimeo Event might be a better solution here as there would be no need to modify the existing Vimeo provider, and certainly not the ProviderPluginBase.

This also comes with the added benefit of allowing users to toggle event functionality.

🇬🇧United Kingdom dahousecat

I've just installed 2.0.2 and I can see commit ff1433c4f36758359cbc6816bd940ffc203d7562 changed the src fields from textfields to textareas (yay), but also added:

'#attributes' => [
        'rows' => 1,
      ],

to all the src fields.

As a result of this I used to be able to see all the rules, as by default the textarea with patch #2 was 5 rows, however now I can only see the first row and have to manually extend all the fields.

This patch fixes that by just removing the rows => 1 bit.

🇬🇧United Kingdom dahousecat

This patch adds a "Allowed empty languages" field to the config form that is only shown if "Remove links if no translation is detected" is ticket.
It then doesn't remove any of the languages selected.

🇬🇧United Kingdom dahousecat

@skaught certainly.

In my case all child pages belong to properties.
Properties can enable and disable languages manually via a field.
Translations may get added for child pages at any point, however until we want to enable a language for a property none of the translations for child pages should show.

This means I need to apply custom logic specific to my application to alter the available links.

Also there are certain languages that we always want to show even if translations don't exist.

This patch alone will not achieve that as link will have already been unset by the time the alter hooks runs - so I think I'll create another issue for this too.

🇬🇧United Kingdom dahousecat

Patch to:
- Add call to moduleHandler->invokeAll for new hook_dropdown_language_alter_links hook.
- Add dropdown_language.api.php to document new hook.

🇬🇧United Kingdom dahousecat

As I was writing this patch I realized that this module only supported protecting one node and I need to protect multiple nodes so I ended up adding that to this patch too.

Sorry it's not in a separate issue but I just need to move really fast on this.

Hope it's useful.

🇬🇧United Kingdom dahousecat

This is the patch I'm using as I know I will only 1 have instance per page.
This patch won't work if you have multiple views on the same page all using this sorting plugin.

🇬🇧United Kingdom dahousecat

Module already has this.
I had a patch to remove it :(

🇬🇧United Kingdom dahousecat

I can confirm using the devel config editor to manually update the plugin to 'entity:delete_action:message' worked for me too.

🇬🇧United Kingdom dahousecat

This should do it:

$profile = Profile::load(123123);
$address1 = $profile->get('address');
$profile->set('field_address2', $address1->first()->getValue());
$profile->save();

Of course if this is multi cardinality replace first() with a loop.

🇬🇧United Kingdom dahousecat

Passing the preferredCountries to intlTelInput only works if countrySearch is turned off.
This is documented on this page under the preferredCountries section.

This is a simple 1 line change in js/webform.element.telephone.js to disable countrySearch when preferred countries are set.

I've attached a patch which is against 6.1.x.

🇬🇧United Kingdom dahousecat

Here is a patch to allow float values in the Slides to show field against the 8.x-2.x version.

Production build 0.71.5 2024