v5.0.0.rst 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. v5.0.0 release notes
  2. ====================
  3. Note: 5.0.0 is identical to the 5.0.0b1 beta released a few weeks prior. Support for Wagtail's new block previews will be coming in a later release due to time needed to update the hundreds of Bootstrap blocks CRX provides.
  4. New features
  5. ------------
  6. * Support Wagtail 6.4.
  7. * Support Python 3.9 to 3.13.
  8. * NEW: SEO preview on each page. Read more on our blog post `SEO Previews in Wagtail <https://www.coderedcorp.com/blog/seo-previews-in-wagtail/>`_.
  9. * NEW: spam protection with Google reCAPTCHA v2 and v3 on forms. See: :doc:`/features/spam-protection`
  10. Maintenance
  11. -----------
  12. * ``wagtail_flexible_forms`` module has been split out into its own package. No action is required. See `wagtail-flexible-forms <https://docs.coderedcorp.com/wagtail-flexible-forms/>`_.
  13. * Large cleanup of deprecated code. See upgrade considerations below.
  14. Upgrade considerations
  15. ----------------------
  16. In addition to the changes below, be sure to read the `Wagtail 6.4 upgrade considerations <https://docs.wagtail.org/en/stable/releases/6.4.html#upgrade-considerations-changes-affecting-all-projects>`_.
  17. SEO fields have moved
  18. ~~~~~~~~~~~~~~~~~~~~~
  19. Structured data about the organization was previously available on every page (under the **SEO** tab in the page editor). Now, organization data has been moved into the site settings under **Settings > SEO**.
  20. For most sites, no action is required, as the organization data is automatically copied from each site's Home Page to these settings.
  21. However, if you were previously using custom organization data on many separate pages, you'll need to follow the `wagtail-seo 3 upgrade instructions <https://docs.coderedcorp.com/wagtail-seo/getting-started/migration-3.html>`_
  22. Form template has changed
  23. ~~~~~~~~~~~~~~~~~~~~~~~~~
  24. If you have any custom form page templates, they will need updated. Form page template and miniview templates have changed to support new reCAPTCHA fields.
  25. * Form ID changed to: ``<form id={{ page.get_form_id }}>``.
  26. * Removed ``{% block captcha %}`` and ``form_honeypot.html``.
  27. * Replace submit button with ``{% include "coderedcms/includes/form_button.html" %}``.
  28. See diff below:
  29. .. code-block:: diff
  30. {{ block.super }}
  31. {% if page.form_live %}
  32. <div class="container my-5">
  33. - <form class="{{ page.form_css_class }}" id="{{ page.form_id }}" action="{% pageurl self %}" method="POST" {% if form|is_file_form %}enctype="multipart/form-data"{% endif %}>
  34. + <form class="{{ page.form_css_class }}" id="{{ page.get_form_id }}" action="{% pageurl self %}" method="POST" {% if form|is_file_form %}enctype="multipart/form-data"{% endif %}>
  35. {% csrf_token %}
  36. {% bootstrap_form form layout="horizontal" %}
  37. -
  38. - {% block captcha %}
  39. - {% if page.spam_protection %}
  40. - {% include "coderedcms/includes/form_honeypot.html" %}
  41. - {% endif %}
  42. - {% endblock %}
  43. -
  44. <div class="row">
  45. <div class="{{'horizontal_label_class'|bootstrap_settings}}"></div>
  46. <div class="{{'horizontal_field_class'|bootstrap_settings}}">
  47. - <button type="submit" class="btn {{page.button_size}} {{page.button_style}} {{page.button_css_class}}">
  48. - {{ page.button_text }}
  49. - </button>
  50. + {% include "coderedcms/includes/form_button.html" %}
  51. </div>
  52. </div>
  53. </form>
  54. ``show_*`` options removed from Pages and Blocks
  55. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  56. For most sites, no action is required as these have been deprecated and replaced by miniview templates back in :doc:`version 2.1 <v2.1.0>`.
  57. However, if you have any custom code using these deprecated fields or templates, replace them with custom miniview templates on relevant page models instead.
  58. * ``PagePreviewBlock`` fields removed:
  59. * show_previews
  60. * ``CoderedArticleIndexPage`` fields removed:
  61. * show_images
  62. * show_captions
  63. * show_meta
  64. * show_preview_text
  65. * Template options (in block Advanced Settings) have been removed from ``PageListBlock`` and ``PagePreviewBlock``.
  66. * If you have ``CRX_FRONTEND_TEMPLATES_BLOCKS`` in your Django settings, remove the ``pagelistblock`` and ``pagepreviewblock`` entries from that dictionary.
  67. * Corresponding ``pagelist_*.html`` and ``pagepreview_*.html`` templates have been removed from the project.
  68. Migrations
  69. ~~~~~~~~~~
  70. After upgrading, be sure to generate and apply new migrations as so:
  71. .. code-block:: console
  72. $ python manage.py makemigrations
  73. $ python manage.py migrate
  74. Thank you!
  75. ----------
  76. Thanks to everyone who contributed to `5.0.0 on GitHub <https://github.com/coderedcorp/coderedcms/milestone/54?closed=1>`_.