Skip to content

Inconsistent journal block/name format after upgrade to 20260508 #884

Open

Description

@0w0miki

Search first

  • I searched and no similar issues were found

What Happened?

I have date format as "yyyy-MM-dd".

I did upgrade at April 30th, May 9th, May 10th, May 18th.

Now I find my journal before May 9th has block/name like "2026-05-09", while the journal since May 10th is "may 10th, 2026".
The block/title keeps in the same format as my setting.

This seems break plugin API like getPage() and pushState() when the journal date "2026-05-18" is input parameter. And my plugin fails to work.

Reproduce the Bug

  1. Install 2.0.1-alpha+nightly.20260429 62eac11 and create a journal page.
  2. Upgrade to new version and create another journal page.
  3. Check the page data of both journals. The block/name is in different format.

Expected Behavior

No response

Screenshots

Image

Files

No response

Browser, Desktop or Mobile Platform Information

  • April 30th: 2.0.1-alpha+nightly.20260429 62eac11
  • May 9th: 2.0.1-alpha+nightly.20260508 427dbe3
  • May 10th: 2.0.1-alpha+nightly.20260510 1f9c017
  • May 18th: 2.0.1-alpha+nightly.20260515 ⁠302f798

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

Activity

  1. changed the title [-]Inconsistent journal `block/name` format after 20260510[/-] [+]Inconsistent journal `block/name` format after upgrade to 20260508[/+] on May 18, 2026
  2. mentho-mh commented on May 19, 2026

    @mentho-mh

    Commit 69c4d36 fix db/test issue #830 pushed at 2026/4/29.
    After that, block/name default also changed to (def ^:api default-journal-title-formatter "MMM do, yyyy")

    Maybe we can have that batch-updates all existing journal blocks/names to the latest format, ensuring that APIs and date references function properly.

  3. silicht commented on Jun 1, 2026

    @silicht

    I think the batch-update is required.

    I have some journal pages, which where created before the fix, and these pages I cannot reference in other pages. I can select the page (e.g. with "Today" selection), but when I leave the line the content gets removed.

    Developer tools report following error:

    Request:

    {
        [
            "~#list",
            [
                "logseq_db_Work",
                [
                    [
                        "~:save-block",
                        [
                            [
                                "^ ",
                                "~:block/tx-id",
                                537084654,
                                "~:block/uuid",
                                "~u6a1d116e-2f6c-4468-a304-6101286c8d9a",
                                "~:block/updated-at",
                                1780289902516,
                                "~:block/refs",
                                [
                                    "^0",
                                    [
                                        [
                                            "^ ",
                                            "~:block/name",
                                            "jun 1st, 2026",
                                            "~:block/title",
                                            "2026-06-01 Monday",
                                            "^3",
                                            "~u00000001-2026-0601-0000-000000000000",
                                            "~:block/journal-day",
                                            20260601,
                                            "~:block/tags",
                                            [
                                                "~:logseq.class/Journal"
                                            ]
                                        ]
                                    ]
                                ],
                                "~:block/created-at",
                                1780289902516,
                                "~:logseq.property/created-by-ref",
                                [
                                    "~#datascript/Entity",
                                    [
                                        "^ ",
                                        "~:db/id",
                                        13206
                                    ]
                                ],
                                "^9",
                                [
                                    "^0",
                                    []
                                ],
                                "^7",
                                "[[00000001-2026-0601-0000-000000000000]]",
                                "~:block.temp/load-status",
                                "~:self",
                                "~:block/parent",
                                [
                                    "^=",
                                    [
                                        "^ ",
                                        "^>",
                                        24135
                                    ]
                                ],
                                "~:block/order",
                                "a0",
                                "~:block/page",
                                [
                                    "^=",
                                    [
                                        "^ ",
                                        "^>",
                                        24132
                                    ]
                                ]
                            ],
                            null
                        ]
                    ]
                ],
                [
                    "^ ",
                    "~:skip-properties?",
                    true,
                    "~:outliner-op",
                    "^1",
                    "~:db-sync/tx-id",
                    "~ua42b83fa-8f6c-435b-84e4-c82c047603cb",
                    "~:client-id",
                    "4d5bcc2a-e9e6-4da3-93bd-6db74b4c1ac8",
                    "~:local-tx?",
                    true
                ]
            ]
        ]
    }

    Response:

    {
      "ok": false,
      "error": {
        "code": "exception",
        "message": "journal page protected attr updated"
      }
    }

    dev data of the not working page:

    {:block/tx-id 537084754,
     :block/uuid #uuid "00000001-2026-0601-0000-000000000000",
     :block/updated-at 1780291293422,
     :block/refs [{:db/id 23} {:db/id 140}],
     :block.temp/has-children? true,
     :block.debug/properties
     {:logseq.property/created-by-ref "silicht", :block/tags #{"Journal"}},
     :block/created-at 1773726057179,
     :block/journal-day 20260601,
     :block.debug/refs ["Tags" "Journal"],
     :logseq.property/created-by-ref {:db/id 13206},
     :block/tags [{:db/id 140}],
     :block/title "2026-06-01 Monday",
     :db/id 20442,
     :block.temp/load-status :self, 
     :block/name "2026-06-01 monday"}
    

    dev data of a working page:

    {:block/tx-id 537084722,
     :block/uuid #uuid "00000001-2026-0531-0000-000000000000",
     :block/updated-at 1780291334293,
     :block/refs [{:db/id 23} {:db/id 140}],
     :block.temp/has-children? true,
     :block.debug/properties
     {:logseq.property/created-by-ref "silicht", :block/tags #{"Journal"}},
     :block/created-at 1780291334293,
     :block/journal-day 20260531,
     :block.debug/refs ["Tags" "Journal"],
     :logseq.property/created-by-ref {:db/id 13206},
     :block/tags [{:db/id 140}],
     :block/title "2026-05-31 Sunday",
     :db/id 24160,
     :block.temp/load-status :children, 
     :block/name "may 31st, 2026"}
    

    I hope this helps.

  4. self-assigned this
    on Jun 2, 2026
  5. yuxi-liu-wired commented on Oct 27, 2026

    @yuxi-liu-wired

    Still on current master (d06ded9971): journals created before 69c4d36 keep a :block/name in the user's date format, while newer ones get the default MMM do, yyyy name, so a lookup by formatted title finds one kind or the other.

    logseq/logseq#13883 moves the app's own journal lookups (date-property links, prev/next/tomorrow journal, Quick Add, the mobile calendar, the date search) to :block/journal-day, so those no longer depend on the name. What it leaves is any ldb/get-page call with a formatted journal title, including the plugin API case in this issue (getPage("2026-05-18")). That needs a choice:

    • resolve a title that parses as a journal date by its journal day inside get-page, or
    • migrate the old journals' :block/name to the default format.

    Happy to implement either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions