Embedded Bases Codeblocks: Code changes / corruption when dragging to resize columns

Once you’ve done the above, delete everything above this line.

Steps to reproduce

  1. Create a base in a note with ```base code with one empty line between
  2. Click outside the code box to render the base.
  3. Add filters and properties
  4. Drag columns to resize
  5. Click on a line outside the base
    The base no longer renders because the code for column sizing has been duplicated

Did you follow the troubleshooting guide? [Y/N]

Yes, I did this in a vault with no community plugins or CSS Snippets in the default theme.

Expected result

A base that is rendered correctly.

Actual result

The base does not render at all.

Environment

SYSTEM INFO:
Obsidian version: v1.9.2
Installer version: v1.8.9
Operating system: Windows 11 Home 10.0.26100
Login status: logged in
Language: en
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

What the code looks like after I have resized columns:

This is in a note where I have added two bases:

1 Like

I have encountered similar bugs where resizing columns in embedded-Bases (through Code-Blocks) cause either:

  • Duplication of entries in code-block → in my case the sorting order-lines was duplicated multiple times causing the base to not render anymore
  • Text-Removal/Overwriting below the base-block → Text below the code-block of the base was overwritten/removed by the expanding base-block causing potential data-loss

This is definitely something that still needs to be fixed, but other than that I really like them!

1 Like

thank you

Looks like the same issue I reported here Bases - sorting a column after expanding width of other columns results in duplicate columnSize entries in YAML and causes Uncaught YAMLParseError: Map keys must be unique at line 22, column 5

Steps to reproduce

Use the following base in the sandbox vault

views:
  - type: table
    name: Table
    order:
      - file.name
      - count
      - formula.price
      - formula.percent
      - contexts
      - file.ctime
      - file.ext
    sort:
      - column: property.contexts
        direction: DESC
      - column: formula.price
        direction: DESC
      - column: formula.percent
        direction: DESC

Follow instructions in the GIF. Essentially, extend the right most column enough to create a horizontal scroll bar, then extend the second last column so that the last column goes out of visibility, then sort the third last column. This somehow results in duplicate columnSize entries in the YAML as shown in the stacktrace on the right side. If I go to the source view and remove this duplication, the base comes back.

base_sort_after_width_expansion_duplicate_bug_clean

Did you follow the troubleshooting guide? [Y/N]

Yes

Expected result

No crash when sorting

Actual result

Crash

Environment

SYSTEM INFO:
Obsidian version: v1.9.1
Installer version: v1.7.7
Operating system: Windows 11 Home 10.0.26100
Login status: logged in
Language: en
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

I don’t know if there is a second issue or not, but sometimes, this causes the whole base code to disappear, essentially corrupting the note.

Here is the first stack trace when this crash happens. This is from a second attempt after I recorded the GIF

app.js:1 Uncaught YAMLParseError: Map keys must be unique at line 22, column 5:

      file.ctime: 220
    columnSize:
    ^

    at constructor.onError (app.js:1:768265)
    at app.js:1:752692
    at iy (app.js:1:753701)
    at app.js:1:766193
    at dy (app.js:1:766737)
    at app.js:1:754292
    at iy (app.js:1:754423)
    at app.js:1:766193
    at dy (app.js:1:766737)
    at app.js:1:753214

Will be fixed 1.9.3. No ETAs