Skip to content

AJAX method 'replace' causing DOM issues and CacheTag revalidator lacks configuration #886

@senemhartung

Description

@senemhartung

Package

next (Drupal module)

Describe the feature request

Problem

The NextEntityTypeConfigForm is using the AJAX method 'replace' which can cause DOM replacement issues. The correct method should be 'replaceWith' for proper
element replacement.

Current Behavior

  • AJAX callbacks in NextEntityTypeConfigForm use 'method' => 'replace'
  • This affects form interactions and dynamic content updates

Expected Behavior

  • AJAX callbacks should use 'method' => 'replaceWith' for proper DOM element replacement

Additional Enhancement

The CacheTag revalidator currently has no configuration options, making it less flexible for different caching strategies. Adding configuration options would
allow users to:

  • Choose which cache tags to revalidate (entity tags, list tags)
  • Add custom cache tags
  • Better control cache invalidation behavior

Files Affected

  • modules/next/src/Form/NextEntityTypeConfigForm.php
  • modules/next/src/Plugin/Next/Revalidator/CacheTag.php

Proposed Solution

  1. Update AJAX method from 'replace' to 'replaceWith' in form callbacks
  2. Add configuration form to CacheTag revalidator with options for:
    - Individual entity cache tags
    - Entity list cache tags
    - Additional custom cache tags
  3. Improve user experience with contextual help text and examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageA new issue that needs triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions