- Issue created by @codebymikey
- Status changed to Needs review
about 1 year ago 11:47am 21 September 2023 - @codebymikey opened merge request.
- 🇮🇳India shiv_yadav
Hi codebymikey,
increase the length of two input field.
added patch. - Status changed to Needs work
about 1 year ago 7:35am 20 October 2023 - 🇫🇮Finland heikkiy Oulu
I cannot make the above patch work.
Tested by applying the patch and I can see the maxlength changes in the PHP code to:
$form['selectors'] = [ '#type' => 'textfield', '#title' => $this->t('Selectors'), '#description' => $this->t('Elements to use as headings. Each element separated by comma.'), '#default_value' => $this->configuration['selectors'], '#maxlength' => 2048, ];
But when I open the ToC.js settings in the admin, it still limits the maxlength to 128. Tested with Firefox and Chrome browser and tried clearing both Drupal and browser caches multiple times.
The input HTML is still:
<input data-drupal-selector="edit-selectors" aria-describedby="edit-selectors--description" type="text" id="edit-selectors" name="selectors" value=".text-long h2:not(.accordion__content h2), .text-long h3:not(.accordion__content h3), .field-section-title h2:not(.accordion__content h2), .content-bottom h2:not(.accordion__content h2)" size="60" maxlength="128" class="form-text form-element form-element--type-text form-element--api-textfield" data-drupal-states="{"visible":{":input[name=\u0022toc_js_active\u0022]":{"checked":true}}}">
- Status changed to Needs review
about 1 year ago 8:03am 20 October 2023 - 🇮🇳India shiv_yadav
Hello HeikkiY, I verify on chrome & firebox. It's working fine maxlength show 2048. Attached screenshot as well.
Thanks. - 🇫🇮Finland heikkiy Oulu
Very weird. I tried to apply the patch to our main branch and the patch applies fine but the maxlength doesn't change. I first suspected it might be because of Gin theme but I get the same result with Claro.
What admin theme are you using when the maxlength value changes?
The patch definitely applies fine against 2.1.0 but I don't see the relevant change in the actual produced HTML element.
- 🇮🇳India shiv_yadav
Hello HeikkiY ,
- I verify same both browser.
- drupal 10.1.5 & drupal -9.5.11
- admin theme- Claro
- theme - Olivero - 🇫🇷France flocondetoile Lyon
patch #5 is wrong. It handle only the TocJs Block. You should use patch #4
- Status changed to RTBC
about 1 year ago 12:07pm 20 October 2023 - 🇫🇮Finland heikkiy Oulu
Thanks @flocondetoile.
Tested patch from #4 and it applies fine and fixes my issue. I did think about if there was another solution to remove the 255 limit except giving a new arbitrary number like removing the maxlength limititation completely but maybe this is good enough.
Marking this as RTBC now.
- 🇫🇷France mably
@flocondetoile should we add this fix to the 3.0.x-dev branch?
- 🇫🇷France flocondetoile Lyon
But need to be updated with the new TocJsPerNodeBlock too, added in 3.x
- Assigned to mably
- Merge request !15Issue #3388836 by codebymikey, shiv_yadav, mably: Increase the #maxlength of... → (Merged) created by mably
- Status changed to Fixed
4 months ago 9:27am 17 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.
- Issue was unassigned.