acquia_contenthub_subscriber module does not work correctly as the form element is disabled to show

Created on 27 February 2023, over 1 year ago
Updated 22 June 2023, about 1 year ago

Problem/Motivation

I want to disable the entity sync from UI, but the form element is disabled to accessed, I'm wondering why we add this element but disable is from render.

  $form['acquia_contenthub_unsubscriber_sync'] = [
    '#type' => 'checkbox',
    '#title' => t("Disable auto updating of this entity"),
    '#description' => t("Disabling auto updating will prevent this entity from being updated by Acquia ContentHub in the future."),
    '#default_value' => $default,
    '#weight' => 1000,
    '#access' => FALSE,
  ];

As we can see from the above code, this "#access" is false, and we can't see it from every from.

🐛 Bug report
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

🇨🇳China guaneagler

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @guaneagler
  • Status changed to Closed: works as designed about 1 year ago
  • 🇮🇳India amangrover90 Pune

    @guaneagler you can write a form alter in a custom module and turn access to TRUE.
    If you see the comment in acquia_contenthub_unsubscribe.module

    /**
    * @file
    * Drupal Module: Acquia Content Hub unsubscribe.
    *
    * The experimental module provides form elements for disconnecting local
    * entities from remote updates. The form elements are not accessible by
    * default. Custom code is required to determine when to expose these form
    * elements.
    */

    it says by default form elements are not accessible by default.

Production build 0.69.0 2024