Node preview button generates useless menu link in multistep form

Created on 18 October 2023, 8 months ago
Updated 21 October 2023, 8 months ago

Problem/Motivation

We are getting useless menu link while creating a node via the mutlistep form.

Steps to reproduce

1. make node form mutlistep.
2. click on next and then click on preview button.
3. Now, it will create a useless menu automatically.

Proposed resolution

There are three option:

if (str_contains($form_state->getTriggeringElement()['#id'], 'edit-preview')) {
   return;
}
if (preg_match('/\bedit-preview\b/', $form_state->getTriggeringElement()['#id'])) {
   return;
}
if (strpos($form_state->getTriggeringElement()['#id'], 'edit-preview') !== false) { 
  return; 
}

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India shashank5563 New Delhi

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

Comments & Activities

Production build 0.69.0 2024