Created on 23 January 2024, 5 months ago
Updated 7 February 2024, 5 months ago

\src\Plugin\Condition\BlockExcludePagesRequestPath.php

  public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
    $paths = array_map('trim', explode("\n", $form_state->getValue('pages')));
    foreach ($paths as $path) {
      // Added extra condition to if statement to allow for '!/' to be used.
      if (empty($path) || $path === '<front>' || str_starts_with($path, '/') || str_starts_with($path, '!/') ) {
        continue;
      }
/*WT+: enable !<front>*/ if( /*str_contains($path, '<front>')*/ $path = '!<front>' ) continue;
      $form_state->setErrorByName('pages', $this->t("The path %path requires a leading forward slash or exclamation point when used with the Pages setting.", ['%path' => $path]));
    }
  }
✨ Feature request
Status

Fixed

Version

2.1

Component

Code

Created by

🇮🇱Israel Promo-IL

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024