Account created on 3 August 2005, over 19 years ago
#

Merge Requests

Recent comments

🇳🇿New Zealand jonathan_hunt

In the meantime, composer require drupal/field_group:"4.0.0 as 3.6.0" seems to have worked ok.

🇳🇿New Zealand jonathan_hunt

Existing tests are now passing, but there are not specific tests for ignore tags AFAIK.

🇳🇿New Zealand jonathan_hunt

MR needs a re-roll to resolve test failures arising from a change to the function signature for parseTooltipMatch().

🇳🇿New Zealand jonathan_hunt

@hughworm No I had to put this work to one side, so haven't progressed it. I'd like to make progress eventually but it won't be for a little while. I'd like to see a way for Drupal to cope with unsigned bigint.

🇳🇿New Zealand jonathan_hunt

This patch works for me and I can send Drupal logs via Alloy to Grafana Cloud. It would be good to have HTTP_RESPONSE_STATUS_CODE in the data. Should that be added here? If not, what's the best way to augment the log record with additional attributes?

🇳🇿New Zealand jonathan_hunt

Ah, needed to update "open-telemetry/sem-conv": "^1.30", all good.

🇳🇿New Zealand jonathan_hunt

I've applied this patch to latest commit bcf6219c for drupal/opentelemetry:1.0.x-dev but I get a fatal error Error: Undefined constant OpenTelemetry\SemConv\TraceAttributes::HTTP_REQUEST_HEADER in Drupal\opentelemetry_logs\Logger\OpentelemetryLogs->buildAttributesFromContext() (line 91 of modules/contrib/opentelemetry/modules/opentelemetry_logs/src/Logger/OpentelemetryLogs.php).. What am I missing?

🇳🇿New Zealand jonathan_hunt

Thanks for working on OpenTelemetry for Drupal. I'm new to the OTel world, but have your module working providing Request trace and database traces. Is it possible to get Attribute-based hooking working, per https://github.com/open-telemetry/opentelemetry-php-instrumentation?tab=... ?
I have configured php.ini with opentelemetry.attr_hooks_enabled=On and added attribute #[WithSpan] attribute to a arbitrary function execute() within views Page class. The OpenTelemetry\API\Instrumentation\WithSpanHandler::pre function is invoked, but I get no additional span data propagated to Grafana Tempo, just the Request span. Am I missing something?

🇳🇿New Zealand jonathan_hunt

This patch applies to Drupal 10.4.2 ok, but I want to use a link field to store links to files such as public:///interactive/zoomify/mytiles and I get "The URI 'public:///interactive/zoomify/mytiles' is invalid. You must use a valid URI scheme. Use base: for a path, e.g., to a Drupal file that needs the base path. Do not use this for internal paths controlled by Drupal."

Should I be able to set Allowed protocols to public, private? If so, there may be more work required. If not, this should be made clear in the issue and UI?

🇳🇿New Zealand jonathan_hunt

I had https://www.drupal.org/project/webprofiler installed and that relies upon https://www.drupal.org/project/tracer . If I uninstall both then /admin/config/development/opentelemetry serves ok...

🇳🇿New Zealand jonathan_hunt

The Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service is mentioned in the code at https://git.drupalcode.org/project/opentelemetry/-/blob/1.0.x/src/EventS...

🇳🇿New Zealand jonathan_hunt

I have the same issue. The option was first introduced at https://www.drupal.org/project/bootstrap_barrio/issues/3037643 but in 5.x all messages include bootstrap_barrio:alert => alert.twig that wraps messages in <div class="alert-wrapper"></div> that is then referenced in alerts.scss that has:

.alert-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;

A workaround is to apply

.alert-wrapper {
  position: unset !important;
}
🇳🇿New Zealand jonathan_hunt

fwiw, I needed to amend https://git.drupalcode.org/project/flysystem/-/merge_requests/57/diffs#2... to be
'required_derivative_scheme' => $scheme ?? 'fedora',
because when running phpunit on other code this function would be invoked with no $scheme defined.
My intervention is a work-around; someone more familiar with the code may have a better approach.

🇳🇿New Zealand jonathan_hunt

It would be good to have notes, but you can get some idea based on the diff between release tags https://git.drupalcode.org/project/eva/-/compare/3.1.0...3.1.1

🇳🇿New Zealand jonathan_hunt

@danflanagan8 Yes, the issue seems to be with Drupal 10.3.8 and the new symfony/http-foundation 6.4.14 that is less forgiving of URLs with leading or trailing spaces. It seems viewfield is an innocent conduit here and not the root cause.

🇳🇿New Zealand jonathan_hunt

I had a similar issue after updating to Drupal 10.3.8 and viewfield was implicated as removing the viewfield from the node display allowed the node to display without error. I tracked the problem down to a view field that used a twig value in "Output this field as a custom link" and the twig value {{ view_node }} had a trailing space. Removing the space and saving the view fixed the Client error issue.

🇳🇿New Zealand jonathan_hunt

I get the same "client error" reports in dblog. A client is requesting GET for the URL https://www.xxxxxx.xxx/simpleads/impression/7 when as you have found the simplead js is configured to use POST. See also the REST API config at /admin/config/services/rest. The GET request appears to come from a Facebook IP. It appears simpleads is working ok.

🇳🇿New Zealand jonathan_hunt

Patch applies ok, passes Upgrade Status report. Please merge and release a new version. Thank you in advance.

🇳🇿New Zealand jonathan_hunt

I applied patch #14 on 3.0.1 and updated league/commonmark to 2.5.3, but unfortunately I immediately get a fatal error on any site page: Fatal error: Could not check compatibility between League\CommonMark\CommonMarkConverter::getEnvironment(): League\CommonMark\Environment\Environment and League\CommonMark\MarkdownConverter::getEnvironment(): League\CommonMark\Environment\EnvironmentInterface, because class League\CommonMark\Environment\Environment is not available in /app/vendor/league/commonmark/src/CommonMarkConverter.php on line 40

🇳🇿New Zealand jonathan_hunt

The patch in MR !29 works for me with Markdown 3.0.1. on Drupal 10.3.6. It would be great to get it merged, thanks.

🇳🇿New Zealand jonathan_hunt

Further to #3100732: Allow specifying metadata on JSON:API objects, there doesn't seem to be a method to inject a meta member (https://jsonapi.org/format/#document-meta) at the top level of an API response. Should there be a new issue to address that? My use case is to expose overall content licence and site api version data, independent of the jsonapi version.

🇳🇿New Zealand jonathan_hunt

Typo at L43 core/modules/jsonapi/tests/modules/jsonapi_test_meta_events/src/EventSubscriber/MetaEventSubscriber.php, also L87, "// Only continue if the recourse type is enabled.", presumably recourse should be resource.
https://git.drupalcode.org/project/drupal/-/merge_requests/7828/diffs#3e...

🇳🇿New Zealand jonathan_hunt

Ah, thanks, I think I checked the 2.x branch that is 1.0 only and not the 2.0.x branch that supports >=1.0.

🇳🇿New Zealand jonathan_hunt

The patch in #48 works for me on Search API 8.x-1.35 but since my use case is to avoid indexing unpublished media entities referenced from a node, I needed to alter shouldExtractReference() to check for EntityAdapter, not just EntityReferenceItemInterface, e.g.:

  public function shouldExtractReference(TypedDataInterface $reference_item, ?IndexInterface $index = NULL): bool {
    if ($index?->isValidProcessor('entity_status')) {
      if ($reference_item instanceof EntityAdapter) {
        $referenced_entity = $reference_item->getEntity();
      }
      elseif ($reference_item instanceof EntityReferenceItemInterface) {
        $referenced_entity = $reference_item->get('entity')
          ->getTarget()
          ->getValue();
      }
      if ($referenced_entity instanceof EntityPublishedInterface) {
        return $referenced_entity->isPublished();
      }
      elseif ($referenced_entity instanceof UserInterface) {
        return $referenced_entity->isActive();
      }
    }
    return TRUE;
  }
🇳🇿New Zealand jonathan_hunt

Here's a patch for discussion, that aims to avoid generating a translation if the field value is empty.
1. In addLanguageElements() when a new language field is added, the value is defaulted to null (perhaps this should look at the default value for the field rather than defaulting in value from site default language).
2. entityBuilder() is refactored a little to attempt to detect a non-empty field value and only add a translation if field value is non-empty. This means I can have a site with 8 possible languages, but if the user only submits values for 3 languages, only 3 translations are generated. It allows an empty value to be saved when editing a translated value, but a translation needs to be manually deleted if no values exist.

Perhaps an improvement would be to delete a translation if no values are different to the original language entity.

This patch works for a translated textarea field; that is sufficient for my use-case. It hasn't been tested on other field types.

🇳🇿New Zealand jonathan_hunt

fwiw, I attach js like the following, to a specific text area (Description) field to add/remove a class indicating content is present.

/**
 * Indicate whether Description tabs have content.
 */
(function (Drupal, once) {
  Drupal.behaviors.multilingual_form = {
    attach: function () {

      once('multilingual-form', 'html').forEach(function () {

        // Set initial indicator state, and add change listener.
        jQuery('.field--name-field-description.horizontal-tabs-panes details textarea').each(function(){
          const tab_details = jQuery(this).closest('details');
          const tab_details_id = '#' + tab_details.attr('id');
          setNavItemForTextArea(tab_details_id);
        }).on('change',function(){
          const tab_details = jQuery(this).closest('details');
          const tab_details_id = '#' + tab_details.attr('id');
          setNavItemForTextArea(tab_details_id);
        });

        // Set has-content class based on contents of tab textarea.
        function setNavItemForTextArea(tab_details_id) {
          const navItemSelector = 'a[href="' + tab_details_id + '"]';
          const hasContent = jQuery(tab_details_id + ' textarea').val() !== '';
          if (hasContent) {
            jQuery(navItemSelector).addClass('has-content');
          }
          else {
            jQuery(navItemSelector).removeClass('has-content');
          }
        }

      });
    }
  };
})(Drupal, once);
🇳🇿New Zealand jonathan_hunt

Thanks for the feedback. I added Language (with fallback) (language_with_fallback) to the index, and also the search results view is now filtered by, either
1. "Language (with fallback)" filtered by Site's default language:
1.1 returns 0 results for a keyword that exists only in non-default translation
1.2 returns 1 result for keyword present in 2 translations
2. "Language (with fallback)" filtered by each of the available languages:
2.1 returns 1 match for keyword present in non-default translation
2.2 returns 2 results for keyword present in 2 translations

However, the desired result is that users get:
a. 1 result for a keyword that exists only in non-default translation
b. 1 result for keyword present in 2 translations (since once they visit the node they will see what non-default language field values exist).
At this stage the {!collapse field=ss_nid_string} avoids the 2 results for same node issue.

This site may differ from others in that we don't offer a user language switcher since 99% of site is in english, with sparse translations available.

🇳🇿New Zealand jonathan_hunt

Patch works for me (allows HTML tag usage report to load in the presence of invalid HTML).

🇳🇿New Zealand jonathan_hunt

Issue appears to arise from dependency on Field Group, see https://www.drupal.org/project/field_group/issues/3395375 🐛 Duplicated required marks in field tabs with GIn admin theme Active

🇳🇿New Zealand jonathan_hunt

Patch #6 worked for me on Field Group 8.x-3.6, Drupal 10.3.3, Gin 3.0.0-rc13.

🇳🇿New Zealand jonathan_hunt

Resolved config issue in extractOrGetFromCache() by fetching config in the same way as already done in addFieldValues. Not sure if that's how it should be, but it is working for me on Drupal 10.3.2 and Search API attachments 9.0.3.

🇳🇿New Zealand jonathan_hunt

Patch #17 works for me on Search API attachments 9.0.3, but looks like it needs work. I added a field to extract text from a media file and set "Get contents of text attachments directly using file_get_contents." to true, but when the content (and file) are indexed ExtractedFileFieldItemList plugin is invoked and calls $files_extractor_processor FilesExtractor and the configuration is empty. If I force the the test for read_text_files_directly to pass, the text is extracted and indexed ok, but there is a problem with the config not propagating.

🇳🇿New Zealand jonathan_hunt

Patch applies, module is assessed by Upgrade Status as compatible with Drupal 11.

🇳🇿New Zealand jonathan_hunt

Issue occurs, and patch still applies, on 4.2.7.

🇳🇿New Zealand jonathan_hunt

+1, please merge and release a version compatible with Drupal 11.

🇳🇿New Zealand jonathan_hunt

I think this patch needs work as it places invocation of roleMatchSync() inside the condition for new account, so role sync will only be evaluated for newly provisioned accounts and not for subsequent logins.

🇳🇿New Zealand jonathan_hunt

fwiw, this change has stopped the bots smashing our facet links. It would be great if this patch could be committed.

🇳🇿New Zealand jonathan_hunt

Patch #9 applies cleanly and allows the module to be used on Drupal 10.2.5. Can this be committed and a new release made please?

🇳🇿New Zealand jonathan_hunt

The patch applies for me ok on Facets 2.0.7. This patch is very useful as I have several sites where bots are aggressively indexing all search facet links. I hope that changing the facets to genuine form checkboxes will reduce the bot impacts.

🇳🇿New Zealand jonathan_hunt

Thanks for the patch. I have VBO on a large taxonomy and found that if an error occurred "No items selected" when choosing term merge action, the VBO checkboxes would disappear. With this patch the error doesn't even occur...

🇳🇿New Zealand jonathan_hunt

I've dug further into the site where this is occurring and the underlying challenge is OCRed text being rendered into a field modelled as `basic_html`. When html_tag_usage analyses the site, it picks up this content and processes it, but in the subsequent report it is is trying to generate routes for html tags that are not valid tags, e.g. <..:><code><..gt:> causing errors in the route generation.

The root cause is mine to resolve but this module could check whether the "tag" encountered is a..z, A..Z etc. characters before attempting to build a route.

🇳🇿New Zealand jonathan_hunt

Is this module abandoned? Perhaps the module status could be updated to reflect the availability of maintenance? It would be good to have this module updated to Drupal 10 by committing these changes and updating the info.yml file, thanks.

🇳🇿New Zealand jonathan_hunt

Please create a release so that this module doesn't list as unsupported for D10...

🇳🇿New Zealand jonathan_hunt

I was not able to reproduce this using Chunker formatter alone, as output format for basic page body. However, with Sector ToC the `` present in the body text area is not rendered. This is on a text area that is not using CKEditor5. So it's either Sector ToC or toc_api at issue...

🇳🇿New Zealand jonathan_hunt

Patch works for me, thank you, but the change hasn't been applied to the module code so status "Finished" is premature.

🇳🇿New Zealand jonathan_hunt

Unfortunately the change in patch #11 as released in 2.0.0-beta3 fails in the case of drupal/facets_range_dropdowns since $build['0']['#facet'] is not set. For now, I am using

if (isset($build['0']['#facet'])) {
  $title = $build['0']['#facet']->getName();
}
else {
  $title = $block_plugin->label();
}

$facets[] = [
  '#block_plugin' => $block_plugin,
  'title' => $title,
  'content' => $build,
  'attributes' => new Attribute($build['#attributes']),
];
🇳🇿New Zealand jonathan_hunt

The form is invoked a second time and $form_state->isRebuilding() is true.

Appears to work if I add at L69

if (!isset($index)) {
  $index = $this->getEntity();
}

This could possibly be added as part of the isRebuilding() == true code path.

🇳🇿New Zealand jonathan_hunt

* PHP 7.433
* Drupal 9.5.11
* Drush 11.0.2
* Migrate devel 2.2 The "--migrate-debug" option does not exist.

Downgraded to Migrate devel 2.1, "--migrate-debug" works as expected.

🇳🇿New Zealand jonathan_hunt

The 'core_version_requirement' constraint (^9 || ^10) requires the 'core' key not be set in modules/contrib/http_auth/http_auth.info.yml

🇳🇿New Zealand jonathan_hunt

views-view-field-* is singular, replace "fields" with "field"

🇳🇿New Zealand jonathan_hunt

I can confirm this issue. Path becomes available if Devel module is uninstalled.

🇳🇿New Zealand jonathan_hunt

Applying patch allows this module to pass Upgrade Status Drupal 10 compatibility check.

🇳🇿New Zealand jonathan_hunt

@wxman I simply ran composer require "drupal/fivestar:dev-1.x" with no specific references in composer.json. composer.patches.json:

    "drupal/fivestar": {
      "#3287600 Automated Drupal 10 compatibility fixes": "https://www.drupal.org/files/issues/2023-09-01/fivestar-3287600-72.patch"
    },
🇳🇿New Zealand jonathan_hunt

fwiw, applying patch from #72 allows FiveStar to pass the Upgrade Status Drupal 10 readiness checks.

Production build 0.71.5 2024