Skip to content

Feature: switch between template editor modes #442

Closed

Description

@bilogic
"error": "cannot change editor mode: template was created in 'code' mode"
  • I can't switch editor mode, so I delete the template
  • Then I try to create again and get the same error
  1. Overall notifuse is unclear and too rigid in many of its processes
  2. If templates are only soft deleted, make it clear
  3. And explain if there are relational reasons for not allowing deletes
  4. If I truncate the database, I have to re-setup the system SMTP again, which should be configured in .env

Activity

  1. bilogic commented on Sep 27, 2026

    @bilogic
    Author

    I think a balanced solution is to allow changing editor mode, it is easier rather than changing deleting/versioning

  2. pierre-b commented on Oct 15, 2026

    @pierre-b
    Contributor

    Hi @bilogic , I'll check the side-effects of switching between modes, if none I'll allow it.
    Otherwise regarding the soft-deletion, the reason has been explained in previous issues, I'll improve docs to make it clear.

  3. changed the title [-]Templates are not really deleted[/-] [+]Feature: switch between template editor modes[/+] on Oct 15, 2026
  4. self-assigned this
    on Oct 15, 2026
  5. bilogic commented on Oct 15, 2026

    @bilogic
    Author
    1. Thanks, I believe you are referring to "Template ID already exists" after deleting #30
    2. Sure, if you want to have soft delete, then please don't let us specify the ID
    3. It is much simpler and scalable for notifuse to decide and return a numeric ID
    4. And when notifuse let us specify the ID, we don't take it too well when notifuse rejects us
    5. A piece of code what was already working, now suddenly can't work because of a conflicting ID, make sense?
  6. pierre-b commented on Oct 15, 2026

    @pierre-b
    Contributor

    The upcoming version will give hints on the template form, and improve API response message.
    Choosing the template ID is important for API-based notifications (much less for broadcasts).

  7. bilogic commented on Oct 15, 2026

    @bilogic
    Author
    Choosing the template ID is important for API-based notifications (much less for broadcasts).
    
    • For clarity of communication, let's refer to the existing unique reference as slug
    • And my proposal of a notifuse issued unique integer as index
    1. Can explain what function slug fulfils that is so important that index cannot replace it?
    2. My main problem is, API ask for something, I gave it something, then it threw me an unexpected error, this complicates my code and makes me perform redundant work that in my view should be taken care of by the database (Every database supports auto-incrementing IDs, why not use it?)
    3. Or can we at least make slug optional?
  8. pierre-b commented on Oct 15, 2026

    @pierre-b
    Contributor

    Changing the API signature will break integrations of existing Notifuse deployments... I don't think we should go that way. Lets see if the upcoming improvements still generate frustration.

  9. bilogic commented on Oct 16, 2026

    @bilogic
    Author

    Which improvment solves the main problem I mentioned?

    Can version API /v2/... then? Otherwise there is no room to maneuver here

    v2 should generate a slug for us instead of letting us guess

  10. pierre-b commented on Oct 23, 2026

    @pierre-b
    Contributor

    This issue has been improved in https://github.com/Notifuse/notifuse/releases/tag/v42.0
    An API v2 is not on the roadmap for now.

  11. bilogic commented on Nov 20, 2026

    @bilogic
    Author
    • And my proposal of a notifuse issued unique integer as index

    Sorry, can we revisit this?

    It is really quite a curve ball to have to deal with an "Template ID already exists" error...

    It would be so much more easier and elegant if the server can just return the unique ID of the database record

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