The block/add path is not redirecting

Created on 15 July 2024, 9 months ago

Problem/Motivation

The block/add path should redirect when there is only 1 block type available. Similarly as node/add route works.

Steps to reproduce

1. Install standard profile.
2. Visit block/add
The page should redirect to block/add/basic

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component
Block contentย  โ†’

Last updated 6 days ago

Created by

๐Ÿ‡ญ๐Ÿ‡บHungary pasqualle ๐Ÿ‡ญ๐Ÿ‡บ Budapest

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

Merge Requests

Comments & Activities

  • Issue created by @pasqualle
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand quietone
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia amanbtr72

    amanmansuri72 โ†’ made their first commit to this issueโ€™s fork.

  • Status changed to Needs review 9 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia amanbtr72

    I added redirection to the Available block type "Add Block Content" page.

    For Example:

    If the "Basic" block type is available in the block types list then the URL will look like "/block/add/basic"

    If the "Test" block type is available in the block types list then the URL will look like "/block/add/test"

    Kindly review

    Thanks

  • Pipeline finished with Failed
    9 months ago
    Total: 1290s
    #225720
  • Status changed to Needs work 9 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    MR appears to have test failures

  • Pipeline finished with Failed
    9 months ago
    Total: 586s
    #226291
  • Pipeline finished with Failed
    9 months ago
    #226353
  • Pipeline finished with Failed
    9 months ago
    Total: 155s
    #226361
  • Pipeline finished with Failed
    9 months ago
    Total: 450s
    #226381
  • Pipeline finished with Failed
    9 months ago
    Total: 452s
    #226487
  • Pipeline finished with Failed
    9 months ago
    Total: 4172s
    #226564
  • First commit to issue fork.
  • Pipeline finished with Failed
    25 days ago
    Total: 514s
    #461231
  • Pipeline finished with Failed
    24 days ago
    Total: 192s
    #462047
  • Pipeline finished with Failed
    24 days ago
    Total: 192s
    #462048
  • Pipeline finished with Success
    24 days ago
    Total: 649s
    #462049
  • Pipeline finished with Failed
    24 days ago
    Total: 388s
    #462071
  • Pipeline finished with Success
    24 days ago
    Total: 548s
    #462079
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dcam

    I added a dedicated test case. I also fixed the other test failures. The cause of those failures was a destination query parameter on the "Add content block" local action link. It resulted in a redirect loop when trying to use the action link. I expected to reply here saying "This seems like a feature request to me." Except then this business with the destination happened and it does seem like a bit of a bug. The destination is used for forms. So it's no wonder that it behaved strangely when combined with another redirect on an ordinary page.

    So I think it's ok to simply remove the destination. The existing tests agree with me as they're all still passing. Or at least there's no coverage for this anomaly. It's worth noting that the node/add action link (which this issue is trying to emulate) does not have a destination.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Small nitpicky comment

    But NW for the issue summary.

    Also not 100% I see the issue?

  • Pipeline finished with Success
    9 days ago
    Total: 431s
    #474150
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dcam

    Small nitpicky comment

    Applied suggestion

    But NW for the issue summary.

    Updated.

    Also not 100% I see the issue?

    Like I said in my last comment, this is a feature request. Nothing is broken. I'd call it a UX improvement.

    That said, I did uncover what seems like a minor bug while fixing the tests. There's an unnecessary destination parameter on the action link, but I'm reclassifying the issue as a Feature Request anyway so it won't cause more confusion.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dcam
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dcam

    I realized that $request property isn't even used. Maybe it was from early draft of the MR or something.

  • Pipeline finished with Success
    9 days ago
    Total: 466s
    #474170
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dcam

    In fact, let's add the Usability tag too.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley

    Looking good, thanks!

Production build 0.71.5 2024