Redirect dosn't work

Created on 5 December 2023, 12 months ago
Updated 14 December 2023, 11 months ago

Problem/Motivation

Redirect dosnt' work return dosn't work in form_alter

 * Implements hook_form_alter().
 *
 * Permit posting of content.
 */
function readonlymode_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  $settings = \Drupal::config('readonlymode.settings');
  if (!_readonlymode_form_check($form, $form_id, FALSE)) {
    // If a redirect URL is set, then we redirect to it.
    if ($url = $settings->get('url')) {
      return new RedirectResponse($url);
    }
    else {

Steps to reproduce

setup link in redirect settings, go to see form.

🐛 Bug report
Status

Needs review

Version

1.2

Component

Code

Created by

🇵🇱Poland Pawelgorski87

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

Comments & Activities

Production build 0.71.5 2024