Skip to content

[Bug]: Old snippets typed as text instead of plain text #632

Closed

Description

@Mralexandresys

Describe the bug

Some snippets created with older versions of massCode have their language field set to text instead of plain text.
When this happens, the language selector button is not visible in the editor.

Image

To reproduce

  1. Open the local massCode database file (masscode.db).
  2. Find a snippet record.
  3. Manually edit the language field to the value text.
  4. Notice that the language selector does not appear in the editor.

App Version and Architecture

v4.2.2

System info

Windows 11

Validations

Activity

  1. antonreshetov commented on Nov 5, 2025

    @antonreshetov
    Member

    Which version did you upgrade from?

  2. github-actions commented on Nov 5, 2025

    @github-actions

    Hello @Mralexandresys. Please describe in detail the sequence of actions that leads to the bug (skip it if it's already there). Add screenshots of errors from the console. If possible add a video. Issues marked with need reproduction will be closed if they have no activity within 3 days.

  3. antonreshetov commented on Nov 5, 2025

    @antonreshetov
    Member

    Manual database editing is not reproduction.

  4. Mralexandresys commented on Nov 6, 2025

    @Mralexandresys
    Author

    I forgot to mention earlier that the application needs to be restarted between steps 3 and 4.

    I’m also attaching a short video to demonstrate the test.

    test.mp4

    I’ve been using massCode for quite a while, and my snippet database dates back to when it was still using the JSON format (I was on version 3.x before upgrading to 4.2.2).

    This might explain why, in my database, the defaultLanguage field in the folders table was stored as text.

    Because of that, even after recreating a page, I couldn’t see the option to change the snippet language.

  5. antonreshetov commented on Nov 7, 2025

    @antonreshetov
    Member

    As I mentioned earlier, editing the database is a direct intervention in the application's operation and is not a valid way to reproduce an issue.

    Version 4 uses the same list of supported languages as Version 3, which did not include text but rather used plain_text.

    To resolve your issue, you can either manually set the required language or edit the database directly, since you have the ability to do so.

    So I don't consider this a bug and am closing the issue.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions