Account created on 22 January 2007, over 18 years ago
#

Merge Requests

More

Recent comments

🇧🇪Belgium swentel

Also, I can confirm, CWSmith@hybridized-concepts.com can be found on mastodon.

🇧🇪Belgium swentel

Moving to webfinger module, it would be great indeed to have documentation what can or can not be in an Nginx configuration file!

🇧🇪Belgium swentel

The folder doesn't even have to exist, path is defined by the webfinger module, cf https://git.drupalcode.org/project/webfinger/-/blob/2.0.x/webfinger.rout...

It is served by Drupal.

🇧🇪Belgium swentel

.htaccess is only apache afaik, so yeah, that would be a bad pointer.

I see this in the nginx though, which, If I understand, will block calls to it and not redirect to drupal.

location ~ /.well-known/webfinger {
add_header 'Access-Control-Allow-Origin' '*';
if ($arg_resource = "") {
return 400;
}
try_files /profiles/$arg_resource.json =404;
}

Maybe the block with try_files line could be removed completely?

🇧🇪Belgium swentel

More info can be added in ActivityPubUtility::alterNodeInfo

Question is of course: how do we define MAU: unique users who have posted something? That could work for me.

While we're at it: maybe we should change the name of the software and the version too (but not the Drupal version, I don't want to expose any Drupal version which might be vulnerable).

🇧🇪Belgium swentel

This looks like a problem with the .well-known directory. Normally this should work:

https://hybridized-concepts.com/.well-known/webfinger?resource=cwsmith@h...

But it returns a 404. There is an issue at 📌 An existing .well-known directory (as for Let's Encrypt) can prevent ActivityPub module's webfinger from working Active where people change something to .htaccess which existed in their .well-known directory, so that's maybe a pointer? Or maybe an nginx configuration issue?

e.g, for my server (running apache), this call to the webfinger to find my resource works fine and returns a json response:

https://realize.be/.well-known/webfinger?resource=swentel@realize.be

I do have an existing webfinger directory, so it doesn't sit in the way if it exists.

🇧🇪Belgium swentel

swentel made their first commit to this issue’s fork.

🇧🇪Belgium swentel

Hmm, tests are failing with 2.0.3 webfinger too, but maybe it's a bot thing?
Will run then locally to double check.

🇧🇪Belgium swentel

Can you tell me your handle? (user@domain) .. then I can have a look.

🇧🇪Belgium swentel

Wow, what a template! :)

Not a fan of the duplication of the microsub function, will look at that one of the following evenings to remove references of microsub at this place, since that's more of an indieweb thing.

🇧🇪Belgium swentel

right, makes sense. I guess we can use str_contains instead of the strpos call (and replace the rest as well)

🇧🇪Belgium swentel

Alright, new release out, triggered ci for the tests.

🇧🇪Belgium swentel

Interesting although I can't reproduce it at this point, but fair enough to fix it of course :)
I've changed it to use !empty() call instead of casting it to a string.

Thanks for the report!

🇧🇪Belgium swentel

Regarding different templates: maybe it's better to have one template with a lot of if statements which is able to render urls, content, video images etc and then add suggestions based on $activity->getType(). cf Reader::buildMicrosubItem for inspiration.

🇧🇪Belgium swentel

Do you think that will be useful, a way to render non comment inbox (like "Create") activities? Or in this use case a new plugin to process inbox activities to nodes will make more sense ?

I think it's very useful to have rendering of this out of the box!
Currently, I'm using the reader module to view all incoming activities, but this should be possible with this module too.

Not a fan to create nodes from these though. I think we can use a viewBuilder class and than use inspiration from Reader::buildMicrosubItem to render inbox activities, and maybe have different templates depending on some logic: e.g. Inbox -> like template, Inbox -> Create template, Inbox -> Announce template, Inbox -> Follow template and a 'default' one which does something clever with the payload although I have no idea what yet :)

The view builder class should split rendering between inbox and outbox, especially when 📌 Allow like/announce not having to map to entities Active is resolved. (I briefly had the idea to maybe use bundles for inbox and outbox, but view builder classes can't be split in core for now).

🇧🇪Belgium swentel

That looks very, very, very cool! I wonder whether we can create our own ckeditor plugin instead of having to rely on getting that merged into ckeditor itself. That's just a thought because I have not dived into Ckeditor plugins yet, a bit too scared :)

🇧🇪Belgium swentel

Maybe the escape isn't that necessary, but maybe wildcards are?

🇧🇪Belgium swentel

Merged Make endpoints unlocalized Active - would the tests pass (in case you use dev require of webfinger?)

🇧🇪Belgium swentel

swentel made their first commit to this issue’s fork.

🇧🇪Belgium swentel

Hmm, I wonder if we also should escape the query as done in the 'search' part in baseQuery, or is it good enough for your use case?

🇧🇪Belgium swentel

I need this as part of 📌 Allow like/announce not having to map to entities Active - working on that one now, marking this duplicate.

🇧🇪Belgium swentel

Merged, thanks! Simplified the patch a little, no need for inline twig template.

🇧🇪Belgium swentel

These are not necessarily linked indeed to AP, and are not a problem in itself. Marking duplicate of #3174746: Add more responses for various crawlers - which has a link to a Github issue where I was tracking all potential calls which start to come in once a site is connected with the fediverse.

🇧🇪Belgium swentel

swentel made their first commit to this issue’s fork.

🇧🇪Belgium swentel

Even better message indicating this needs to be configured in settings.php

🇧🇪Belgium swentel

So third time it worked, so probably some issue on the mastodon side (username ending with underscore)

🇧🇪Belgium swentel

Ok using aliases makes this work as far as I can see, finally!

🇧🇪Belgium swentel

Not needed anymore at this point.

🇧🇪Belgium swentel

nvm, was able to create a merge request myself

🇧🇪Belgium swentel

Ha, funny! Could you create a merge request from that, the fix is working indeed!

🇧🇪Belgium swentel

Display Suite relies on the core plugin since a very long time now, and no issues are reported on that integration. I'm fairly sure the others are fine as well, so this can be closed imo.

🇧🇪Belgium swentel

indielogin.com seems to work for me with patch 3

getting a notice though: Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in Drupal\indieweb_indieauth\Entity\IndieAuthAuthorizationCode->getScopes, so will fix that while we're at it

🇧🇪Belgium swentel

Hmm the invalid state is on indielogin.com? Haven't tested that patch yet, but I'll double check somewhere next week!

🇧🇪Belgium swentel

New patch, suble change where the 'me' optional, but, in case it's there muse validate. Fixes the tests as well.

🇧🇪Belgium swentel

Thanks for the detailed report! I'm pretty sure I've tested this at some point in time where it probably worked, but indeed, now it doesn't. I did a quick test with https://micropublish.net/ too for instance, and nothing, so either the spec has been changed, or it's more relaxed, hard to say.

However, attached is a patch which made me able to authenticate on indielogin.com and micropublish.net. From a security point of view, it doesn't seem to be less secure not validating me, so I think it's fine.

Tests will probably fail, need to look at this (locally, they don't run anymore on the DA test infrastructure due to https://www.drupal.org/project/drupalci_environments/issues/3387737#comm... 📌 Split PHP image into php(cli/apache) and yarn(node/nightwatch) Needs review ), but it would be great if you could verify the login works now.

🇧🇪Belgium swentel

Thanks for all the maintenance love too! :)

I'm amazed the module usage is still so low, because it really is wonderful, so thank you for all the fantastic work!

🇧🇪Belgium swentel

Pushed! (sorry, needed patches file for composer.patches for a couple of projects quickly, so did that first :)

🇧🇪Belgium swentel

Also, those validations area introduced in 10.2.0, so it's fine no?

🇧🇪Belgium swentel

10.2.x is EOL, so just up the constraint of the module to 10.3 - that's good enough imo. A new branch seems way overkill for that.

🇧🇪Belgium swentel

Ah crap, that was stupid sorry :) New patch.

🇧🇪Belgium swentel

There's actually no guarantee there is a translation too for the entity. If not, it will crash

This is the current fix I have for now, but I'm not sure if it's the proper one. But at least it doesn't crash for now.

(which reminds me I should make a follow up for the formatter_settings crash, but close on a deadline atm)

diff --git a/src/Plugin/CustomFieldWidgetBase.php b/src/Plugin/CustomFieldWidgetBase.php
index 51e544cdf..00e5b26ea 100755
--- a/src/Plugin/CustomFieldWidgetBase.php
+++ b/src/Plugin/CustomFieldWidgetBase.php
@@ -112,7 +112,7 @@ public function widget(FieldItemListInterface $items, int $delta, array $element
       $langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId();
       $is_default_translation = TRUE;
       $is_translatable = $field_definition->isTranslatable() && $field->getWidgetSetting('translatable');
-      if (!$entity->isNew()) {
+      if (!$entity->isNew() && $entity->hasTranslation($langcode)) {
         $entity = $entity->getTranslation($langcode);
         $is_default_translation = $entity->isDefaultTranslation();
       }
🇧🇪Belgium swentel

New release will install. It means the testbot won't be able to run anymore, but that's ok for now. See 📌 Allow lcobucci/jwt 4.3.0 for PHP 8.3 support Active

🇧🇪Belgium swentel

Remove the sodium replace and compat, but that means the testbot will fail always now

🇧🇪Belgium swentel

Actually, I've released 8.x-1.25 :)

Let's meet in 📌 Allow lcobucci/jwt 4.3.0 for PHP 8.3 support Active for the sodium extension.

🇧🇪Belgium swentel

Laste update: it's actually another commit that is still in dev that updated composer.json, that one is not in a release yet. Sorry for the noise!

🇧🇪Belgium swentel

Note: dev release indeed has support for D11 (added in 📌 Automated Drupal 11 compatibility fixes for indieweb Needs review ), but not release yet, need to fix the sodium stuff :)

🇧🇪Belgium swentel

More or less duplicate of 📌 Allow lcobucci/jwt 4.3.0 for PHP 8.3 support Active - I thought the sodium polyfill could work, but I have to double check again.
I /think/ it should work locally, but the testbot has a problem installing it, so it's kind of a chicken/egg problem.

🇧🇪Belgium swentel

Sorry for the delay, last commit, or attached patch should do it! Test (which I can only run locally for some reason) has a subtle change which indeed failed, but with the changes in Expert.php then passes!

🇧🇪Belgium swentel

yes, running 3.1.3

Using the debugger, it happens on the formatter settings for a file, using the file_default formatter.

Looking at the code, it looks like this line is the problem: https://git.drupalcode.org/project/custom_field/-/blob/3.1.x/src/Plugin/...

It's totally possible that $settings[$name] does not contain the formatter_settings key, which happens in this case for a file.

🇧🇪Belgium swentel

Getting an error which is related:

TypeError: Drupal\custom_field\Plugin\Field\FieldFormatter\BaseFormatter::createOptionsForInstance(): Argument #3 ($formatter_settings) must be of type array, null given, called in /home/drupal/web/modules/contrib/custom_field/src/Plugin/Field/FieldFormatter/BaseFormatter.php on line 463 in Drupal\custom_field\Plugin\Field\FieldFormatter\BaseFormatter->createOptionsForInstance() (line 101 of modules/contrib/custom_field/src/Plugin/Field/FieldFormatter/BaseFormatter.php).
diff --git a//src/Plugin/Field/FieldFormatter/BaseFormatter.php b//src/Plugin/Field/FieldFormatter/BaseFormatter.php
index 4cd0936e5..0e351ac0f 100755
--- a//src/Plugin/Field/FieldFormatter/BaseFormatter.php
+++ b//src/Plugin/Field/FieldFormatter/BaseFormatter.php
@@ -460,7 +460,7 @@ protected function getFormattedValues(FieldItemInterface $item, string $langcode
         $format_type = $formatter_settings['format_type'];
       }

-      $options = $this->createOptionsForInstance($custom_item, $format_type, $formatter_settings['formatter_settings']);
+      $options = $this->createOptionsForInstance($custom_item, $format_type, $formatter_settings['formatter_settings'] ?? []);
       $plugin = $this->customFieldFormatterManager->getInstance($options);
       $value = $plugin->formatValue($item, $value);
       if ($value === '' || $value === NULL) {
🇧🇪Belgium swentel

Been bitten by this one too, this makes it work indeed!

🇧🇪Belgium swentel

Bitten by this one as well, the patch makes sense, and it works at the moment. Would be great to have some security eyes on this one!

🇧🇪Belgium swentel

Been bitten by this one too, patch seems to resolve the issue, so RTBC for now!

(I wonder if bcc might have the same problem?)

🇧🇪Belgium swentel

Hmm there's already the concept of a 'Site wide actor' in the module, but that still means an entity of course. The activity entity currently has an owner field, but having no owner (basically, anonymous) could work. Sounds like a good feature request which could live in its own dedicated issue. Question is, as always, time of course :)

🇧🇪Belgium swentel

Ok, confirmed that it doesn't work when the node that is being deleted had a path alias, makes sense!

Production build 0.71.5 2024