Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Values for WYSIWYG not saving for MariaDB #15587

Open
Rar9 opened this issue Sep 15, 2022 · 10 comments
Open

Default Values for WYSIWYG not saving for MariaDB #15587

Rar9 opened this issue Sep 15, 2022 · 10 comments
Labels

Comments

@Rar9
Copy link

Rar9 commented Sep 15, 2022

Describe the Bug

Defining a Default VALUE in a WYSIWYG Field is not saved on Directus 9.17.4

Is HTML Supported ?

How to add Tokens related to the given content?
How to generate multiple default values if this WYSIWYG Collection is used in Relation to content?

To Reproduce

Create content with WYSIWYG field.

Errors Shown

no error is saves an empty field

What version of Directus are you using?

9.17.4

What version of Node.js are you using?

16.7

What database are you using?

Mariad 10.6

What browser are you using?

Fire

How are you deploying Directus?

locally

@licitdev
Copy link
Member

licitdev commented Sep 15, 2022

@Rar9 I am unable to reproduce your issue. Please assist to attach a screenshot of the schema tab for your wysiwyg field in the data model. It would be nice if you could attach a screen recording demonstrating the issue.

Here's a screen recording of my quick test.

Screen.Recording.2022-09-15.at.4.35.43.PM.mov

To answer your questions...

Is HTML Supported ?

Yes, shown in my screen recording

How to add Tokens related to the given content?

You should be able to use conditions for different static access tokens.

How to generate multiple default values if this WYSIWYG Collection is used in Relation to content?

This isn't possible as the default value is on the database level. However, you may make use of the filter event hook in Flows to set different values. Ref: https://docs.directus.io/configuration/flows/triggers.html#event-hook

@Rar9
Copy link
Author

Rar9 commented Sep 15, 2022

``
Screenshot-15-09-22-10-56-27
Screenshot-15-09-22-10-58-30
Screenshot-15-09-22-10-58-47

@Rar9
Copy link
Author

Rar9 commented Sep 15, 2022

My test is with MariaDB 10.6.7 Default value is even overwritten when it is defined in phpmyadmin once saved

If I compare with fresh install sqlite3 the default value works

I also notice that on your video the Length is undefined. in Mariadb its set to max 65k

It feels like the DEFAULT value will overwrite all once the default value is set.
EG Unticked NULLABLE is re-ticked oncce devault value is saved.

@licitdev
Copy link
Member

In the quick test earlier, it was tested in a different database.
Just tested in a MariaDB instance and the issue can be replicated.

This issue may be related to knex/knex#2649 or knex-schema-inspector.

Further investigation is needed to pinpoint the root cause.

@Rar9 Thanks for reporting! 👍

@licitdev licitdev changed the title Defining Default Values for WYSIWYG not saveing - Directus 9.17.4 Default Values for WYSIWYG not saving for MariaDB Sep 15, 2022
@Rar9
Copy link
Author

Rar9 commented Sep 19, 2022

So an issue from 2018, so I believe there is very little hope to get this working anytime soon if its still not fixed after 4 years.

@benhaynes
Copy link
Sponsor Member

So an issue from 2018, so I believe there is very little hope to get this working anytime soon if its still not fixed after 4 years.

I mean, it's OSS, so anyone can take a stab at fixing it at any time. What @licitdev dev said is that it might be related... not completely sure. Also, this isn't in our codebase, so it's hard for us to track resolution.

@Rar9
Copy link
Author

Rar9 commented Sep 25, 2022

Any findings?

@rijkvanzanten
Copy link
Member

Any findings?

Did you make a PR for knex/knex#2649 or this issue?

@rijkvanzanten
Copy link
Member

Linear: ENG-188

@Rar9 Rar9 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2023
@azrikahar
Copy link
Contributor

I believe this is not resolved as of 9.22.1, keeping this open to make sure it is still tracked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

5 participants