Recent comments

🇦🇺Australia roxflame Melbourne

We also need to be able to use domain_simple_sitemap without domain_access

We have a site which uses domain module and domain source, also domain contexts. We use domain source to redirect to correct domain on content when needed, and otherwise allow access to the content from each domain. Leaving domain_access disabled for the scale of the site has simplified our domain setup significantly and enabling it breaks a lot of access on the site.

We would love to see a working release that does not need the domain_access module.
We tried taking out the dependency and get this in our logs when attempting to generate a sitemap:

Error: Class "Drupal\domain_access\DomainAccessManagerInterface" not found in Drupal\domain_simple_sitemap\Plugin\simple_sitemap\UrlGenerator\DomainEntityUrlGenerator->getDataSets() (line 80 of /var/www/html/docroot/modules/contrib/domain_simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/DomainEntityUrlGenerator.php).

🇦🇺Australia roxflame Melbourne

Note to say that we ended up resolving our performance issues, with a combination of things, primarily ensuring that all nested views with contextual filters could be cached using this: https://www.drupal.org/project/drupal/issues/3092715 📌 Views relying on contextual filter defaults always get the url cache context Active

🇦🇺Australia roxflame Melbourne

I'll also note, that twig here is super useful for manipulating the rendering of lists in ECA in general without having to make complex loops

{% for item in my_array %}
    <div>{{ item }}</div>
{% endfor %}

Or grab your random item and wrap it in the html you might want in the same twig action, etc

<div>{{ random([your-list]) }}</div>

🇦🇺Australia roxflame Melbourne

For anyone else looking to use random numbers you can leverage the flexibility of twig

https://twig.symfony.com/doc/2.x/functions/random.html

Use the "Render: Twig" action with {{ random("min", "max") }}
(replace min and max with range you want, you can include tokens)

You can also get random items from lists
{{ random([your-list]) }}

{{ random(['apple', 'orange', 'citrus']) }} {# example output: orange #}

🇦🇺Australia roxflame Melbourne

Trying again, accidentally generated patch 02 from the already patched state...

🇦🇺Australia roxflame Melbourne

Reroll as I forgot to set as an array

🇦🇺Australia roxflame Melbourne

I found a similar issue with another module:

https://www.drupal.org/project/responsive_menu/issues/3212699

public function getCacheContexts() {
$menu_name = $this->getDerivativeId();
return Cache::mergeContexts(parent::getCacheContexts(), ['route.menu_active_trails:' . $menu_name]);

"This effectively caches a unique entry for the menu per every menu link, which to some extent defeats the purpose of caching."

With that in mind, I've rolled a patch here that uses just the menu name as the context, and ignores the menu active trails. This appears to be fine if active-menu-trails are not used in the theme for anything.

🇦🇺Australia roxflame Melbourne

Not sure if this is related, but I get errors importing nodes in feeds if they would return multiple values when calculated.

"Keywords (computed_keywords): Keywords: this field cannot hold more than 1 values."

This field doe hold more than one value just fine, and displays as multiple throughout the site, but, it breaks my feeds from importing...

🇦🇺Australia roxflame Melbourne

I know I could

🇦🇺Australia roxflame Melbourne

@dchaffin, I suggest using this other module while we wait for this to be integrated here
https://www.drupal.org/project/recaptcha_v3

You can use it as the primary captcha, and have it fall back to this module if it fails validation.

🇦🇺Australia roxflame Melbourne

Cheers for this fix, applying

🇦🇺Australia roxflame Melbourne

I'd love to see an inverse of this.
When a sync hasn't happened in a while, but changes are being added to export, sometimes you want to export everything in the list *except for* the last things you already selected and exported.

🇦🇺Australia roxflame Melbourne

Updated patch, had some incorrect formatting for patch paths, apologies, this is the first patch I've ever uploaded to drupal.org, doing some learning today :)

🇦🇺Australia roxflame Melbourne

Patch attached here cleared things up for me

Production build 0.71.5 2024