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
advanced_topics missing quotation, not that it matters 2018-09-13 13:00:57 +01:00
contributing
editor_manual
getting_started
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
Makefile
README.md
autobuild.sh
conf.py
favicon.ico
index.rst
logo.png
readthedocs.yml
requirements.txt
spelling_wordlist.txt
support.rst

README.md

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.