coderedcorp / coderedcorp/coderedcms

Some of my pages won't preview in the editor

Abierto
#575 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Type: Question
Lenguaje dominante
Python
Estrellas
765
Forks
154
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

This might not be related directly to coderedcms, but I've subclassed one of the base pages from that project so maybe.

Anyhow, this is my page model:
```
class ArticleIndexPage(CoderedArticleIndexPage):
"""
Shows a list of article sub-pages.
"""

show_cover = models.BooleanField(default=False)

class Meta:
verbose_name = "Article Landing Page"

index_query_pagemodel = "cms.ArticlePage"
template = "coderedcms/pages/article_index_page.html"

body = StreamField(
LOCAL_LAYOUT_STREAMBLOCKS,
null=True,
blank=True,
use_json_field=True,
)

content_panels = CoderedArticleIndexPage.content_panels + [FieldPanel("show_cover")]
```
This page is similar to lots of other pages I've subclassed from coderedcms base pages, but this one won't generate a preview while editing in the Wagtail admin. It says there's a validation error, but there are no red dots indicating anything wrong on the page. I've tried to comment out LOCAL_LAYOUT_STREAMBLOCKS to see if that caused the issues, but it didn't change anything.

Appreciate any tips on how to solve this.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start with the ArticleIndexPage definition shown in the issue and reproduce its validation error while editing in the Wagtail admin. Compare this subclass with the other subclassed pages that preview successfully, then trace the validation path to determine why no field indicators appear. Done means the cause is documented and this page produces a usable editor preview.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
django, python
Área
backend, content
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.