• Resolved cdets

    (@cdets)


    I am mostly trying to confirm if this is just a new way the List block works or if it is something broken that we are missing. While testing our theme against the WP6.1 RC 3 we ran into some confusion regarding lists. When creating a list we cannot create more than one list item at each level. It will allow a nesting of other lists within but if you create a list you cannot add more than the initial list item to that list. Initially I though it was something wrong with our build but upon switching to several of the provided themes such as Twenty Twenty-One and Twenty Twenty-Two the same issue occurs.

Viewing 15 replies - 1 through 15 (of 27 total)
  • In the Gutenberg version that will be released in 6.1, the list block has been changed. Previously it was a block in which the list items were arranged. What is new is that each list item is a separate block that lies within the surrounding list block.

    What you describe, however, I can not understand. Here is an example of how I proceed:

    1. insert list block as usual
    2. write “First” at the first point.
    3. then press enter to create a 2nd point.
    4. write there “Second”.
    5. press enter to create a third point.
    6. write here now “Sub 1
    Then indent this third point in the options for the block.
    8. press enter again.
    9. write another point Sub 2.

    Result is:

    View post on imgur.com

    Can you reproduce this for yourself? Or do you do it in a different way?

    By the way, I have tested this in a WordPress installation 6.1 RC5. No plugins are installed and the Twenty Twenty One theme.

    Thread Starter cdets

    (@cdets)

    So I can do up to step 3 with no issue, but hitting enter does nothing. In order to create another list item at that level I can only do it by creating another list similar to how I created it in the below image. The only other option while in the list is to create a block inside which will let me create a nested list like “sub1.” Additionally the outdent does not function it wont let me make the sub1 outdent to create another list item.

    List View

    That sounds strange. Just to be sure, you don’t have any plugin enabled? And 6.1 RC5 installed?

    <!-- wp:list -->
    <ul><!-- wp:list-item -->
    <li>First</li>
    <!-- /wp:list-item -->
    
    <!-- wp:list-item -->
    <li>Second</li>
    <!-- /wp:list-item -->
    
    <!-- wp:list-item -->
    <li>Third<!-- wp:list -->
    <ul><!-- wp:list-item -->
    <li>Sub 1</li>
    <!-- /wp:list-item -->
    
    <!-- wp:list-item -->
    <li>Sub 2</li>
    <!-- /wp:list-item --></ul>
    <!-- /wp:list --></li>
    <!-- /wp:list-item --></ul>
    <!-- /wp:list -->
    Thread Starter cdets

    (@cdets)

    I was on RC3, but have since downloaded and tested on RC5. Did a fresh install and didnt install any plugins, still getting the same issue. Cant create a second list item and cant outdent a nested list item.

    <li>First</li>

    <li>Second<!-- wp:list -->
    <ul><!-- wp:list-item -->
    <li>Sub 1<!-- wp:list -->
    <ul><!-- wp:list-item -->
    <li></li>
    <!-- /wp:list-item --></ul>
    <!-- /wp:list --></li>
    <!-- /wp:list-item --></ul>
    <!-- /wp:list --><!-- wp:list -->
    <ul><!-- wp:list-item -->
    <li>Sub 1<!-- wp:list -->
    <ul><!-- wp:list-item -->
    <li></li>
    <!-- /wp:list-item --></ul>
    <!-- /wp:list --></li>
    <!-- /wp:list-item --></ul>
    <!-- /wp:list --></li>

    The HTML code from your editor is different from mine. Normally this should all start with an HTML comment:

    <!-- wp:list -->

    Have you also tried it with a completely new page? That is, without legacy code from previous versions.

    Maybe it would be good if you describe your procedure step by step, like I did above, also as a video if possible.

    Thread Starter cdets

    (@cdets)

    For this last one I downloaded RC5, ran the installation for a fresh site, clicked add new page so it is a completely new page on a new install, with no plugins.

    As for step by step I will outline below.

    1. Create new page
    2. Type /list where it says “Type / to choose a block”,
    3. Hit enter when it autoselects the List block
    4. Type in First
    5. Hit enter to see if it creates a new list item, nothing happens, it looks like this causes the toolbar to go away and no new list item is created.
    6. Click the + icon to create a subitem
    7. Attempt to outdent the sublist, by clicking the outdent button in the toolbar, to make another list item, nothing happens.

    There are no errors going to the browser console and I checked my php-error log and nothing is occurring when this happens either. If there is anywhere else that might be help to diagnose let me know.

    • This reply was modified 1 year, 11 months ago by cdets.

    I did the exact same thing myself and still can’t figure it out.

    Therefore I have now still 2 assumptions:
    You have something in the browser cache from previous versions. Have you ever cleared the cache?
    Which browser do you use at all? I did it with Firefox and Chrome, both the latest versions.

    Thread Starter cdets

    (@cdets)

    Clearing the browser cache seems to have fixed it for the wordpress themes. Unfortunately it seems when I add our custom theme it comes back, so it looks like something that was cached from our theme was what was causing this. Appreciate your help, and good luck with the 6.1 release.

    Hello,

    Sorry to reopen the thread. That exact problem happen to me and just found out it was because I’m using ‘allowed_block_types_all’ filter with ‘core/list’ in it, in my custom theme. Had to add ‘core/list-item’ to make it work.

    Same for ‘core/video’, had to add ‘core/embed’ so url integration works too.

    @threadi I already fixed my own issue and just wanted to help @cdets about his custom theme

    Kasia

    (@kasia_codeword)

    Thank you @juliengemaddis, this helped me. You’re a star.

    @juliengemaddis you are a lagend… I was stuck few hours with it. Thanks.

    Thank you?@juliengemaddis, you’re wonderful !
    ??

    rocquett

    (@delwinholeman)

    This helped me as well @juliengemaddis! Thankfully you replied to this instead of opening a new topic as was suggested.

    • This reply was modified 1 year, 9 months ago by rocquett.
Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Unable to make more than one list item per list’ is closed to new replies.