0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
wagtail/docs
Matt Westcott bf870cecd3 Gracefully handle document links with missing ID attributes in rich text
Fixes #4791
Previously, our rich text conversion functions handled the case where a document link specified an ID which is not found in the database. However, they failed with a KeyError when the id attribute was missing completely; links of this second type would occur whenever a link of the first type was re-saved from the Draftail editor. The fix is two-fold:

1) Catch the "missing ID attribute" case - in this case, the resulting link will be missing both the href and id attributes
2) Update the handling of the "ID present but document not found" case so that the id attribute survives the round-trip to the editor and back. The final link as rendered on the front-end will still be an attribute-less <a> element, but the id will be retained in the database (and in the versions rendered within rich text editors) which may be useful for troubleshooting.
2018-10-10 12:54:52 +01:00
..
_static Update editor guide for embeds and documents in rich text, fix #4558 (#4632) 2018-07-09 10:07:03 +03:00
advanced_topics missing quotation, not that it matters 2018-09-13 13:00:57 +01:00
contributing Add guideline on the use of British vs American English 2018-06-27 20:39:08 +01:00
editor_manual Update editor guide for embeds and documents in rich text, fix #4558 (#4632) 2018-07-09 10:07:03 +03:00
getting_started Update documentation to indicate Django 2.1 support 2018-08-09 00:34:38 +01:00
reference Fix note about update_index not being required for the db backend 2018-09-21 10:59:52 +01:00
releases Gracefully handle document links with missing ID attributes in rich text 2018-10-10 12:54:52 +01:00
topics Specify Elasticsearch <6.3.1 2018-08-10 14:27:07 +01:00
autobuild.sh [skip ci] added commment about autobuild inside vms (#3379) 2017-02-16 21:29:10 +00:00
conf.py Removes the temporary Kickstarter banner. 2018-04-16 17:16:05 +02:00
favicon.ico add favicon to documentation 2018-03-08 12:24:13 +00:00
index.rst Added Divio Cloud notes to documentation 2018-06-16 15:51:06 -04:00
logo.png
Makefile add way of autocompile documentation 2017-02-20 20:24:17 +00:00
README.md Eliminate reference to requirements-dev.txt 2016-02-05 15:48:01 +00:00
readthedocs.yml see if requirements_file: null makes readthedocs happy 2018-07-30 22:29:06 +01:00
requirements.txt readthedocs needs a requirements.txt, apparently 2017-10-09 19:45:07 +01:00
spelling_wordlist.txt Added more words to the spelling wordlist 2018-04-05 12:13:05 +01:00
support.rst Add note about not asking support questions in multiple places 2018-07-11 11:09:45 +01:00

Wagtail docs

These are Sphinx docs, automatically built at http://docs.wagtail.io when the master branch is committed to Github. To build them locally, install Wagtail's development requirements (in the root Wagtail directory):

pip install -e .[testing,docs]

To build the documentation for browsing, from this directory run:

make html 

then open _build/html/index.html in a browser.

To rebuild automatically while editing the documentation, from this directory run:

sphinx-autobuild . _build

The online editor at http://rst.ninjs.org/ is a helpful tool for checking reStructuredText syntax.