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

AttributeError 'NoneType' object has no attribute 'json_string' #38

Closed
lucaswatterson opened this issue Feb 10, 2021 · 12 comments
Closed

Comments

@lucaswatterson
Copy link

lucaswatterson commented Feb 10, 2021

Initialized a new project this evening and installed django-quill-editor as per usual. When I open the associated CreateView template, I get...

issue

Funny thing is, the quill editor loads correctly in the UpdateView template. The following text is strangely already in the editor...

issue_2

I've double and triple checked that the model, view, and template are set-up correctly.

EDIT

Realized it might help to add that I am also using django-crispy-forms.

@afd57
Copy link

afd57 commented Feb 13, 2021

Initialized a new project this evening and installed django-quill-editor as per usual. When I open the associated CreateView template, I get...

issue

Funny thing is, the quill editor loads correctly in the UpdateView template. The following text is strangely already in the editor...

issue_2

I've double and triple checked that the model, view, and template are set-up correctly.

EDIT

Realized it might help to add that I am also using django-crispy-forms.

Hello, I faced same error message. I downgraded to 0.1.16 version. It works well.

pip install django-quill-editor==0.1.16

@lucaswatterson
Copy link
Author

@afd57 Thanks, I came to that solution as well. I'll leave this open for @LeeHanYeong to see.

I was able to remove the .json in forms.py to get the most recent version working, but obviously that may have unintended consequences. Thanks again.

@afd57
Copy link

afd57 commented Feb 14, 2021

@afd57 Thanks, I came to that solution as well. I'll leave this open for @LeeHanYeong to see.

I was able to remove the .json in forms.py to get the most recent version working, but obviously that may have unintended consequences. Thanks again.

I got you. :) You are welcome.

@cdesch
Copy link
Contributor

cdesch commented Feb 17, 2021

@void-witch Can you take a look at this? I'm hitting the same error with version 0.1.19 on it appears to be this line on this commit

I think this issue may be related to the work that was merged recently and PR#36.

@ghost
Copy link

ghost commented Feb 17, 2021

yup, this was an issue i missed, my bad. you have two ways to fix this:

  1. change line 17 of forms.py to be something like return value.json_string if value else None

  2. install the json-field branch from @cobang's fork

i recommend option 2, until the pull request is merged. the fork fixes a lot of things i missed

@cdesch
Copy link
Contributor

cdesch commented Feb 17, 2021

that fork in PR#35 was pulled into the master but the PR is still open. Can you make a new PR to fix the line?

@LeeHanYeong can you close the PR requests?

@cdesch
Copy link
Contributor

cdesch commented Feb 19, 2021

@void-witch any luck?

@ghost
Copy link

ghost commented Feb 20, 2021

@cdesch nothing i can do on my end. you can either edit the file, or point your dependencies to the fork

@cdesch
Copy link
Contributor

cdesch commented Feb 24, 2021

I made the change and I'll submit a PR#41

The JSONField was introduced in Django 3.1 and makes this addition a breaking change for Django project versions < 3.1.x

LeeHanYeong pushed a commit that referenced this issue Feb 27, 2021
…son_string' (#41)

* Bump to Quill Version 1.3.7

Bump to Quill Version 1.3.7 - This version of Quill fixes Quill Vuln slab/quill#2438

Here is the change commit to fix the vuln in Quill slab/quill#2439

The Vuln is described here: https://ossindex.sonatype.org/vuln/d96c07dd-81f9-41f6-b2bd-531143bcaeab

* Adding JS/CSS include instructions from README.md

Resolves issue [#33](#33)

* adding None return for json_string
@cdesch
Copy link
Contributor

cdesch commented Mar 1, 2021

@lucaswatterson This issue can be resolved and closed with the recent release of 0.1.21.

@lucaswatterson
Copy link
Author

Thank you!

@cdesch
Copy link
Contributor

cdesch commented Mar 2, 2021

@lucaswatterson You're welcome. Please close the issue.

LeeHanYeong pushed a commit that referenced this issue Dec 8, 2021
…son_string' (#41)

* Bump to Quill Version 1.3.7

Bump to Quill Version 1.3.7 - This version of Quill fixes Quill Vuln slab/quill#2438

Here is the change commit to fix the vuln in Quill slab/quill#2439

The Vuln is described here: https://ossindex.sonatype.org/vuln/d96c07dd-81f9-41f6-b2bd-531143bcaeab

* Adding JS/CSS include instructions from README.md

Resolves issue [#33](#33)

* adding None return for json_string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants